nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Tearing and Composite (http://www.nvnews.net/vbulletin/showthread.php?t=132074)

DrSuSE 04-26-09 11:06 PM

Tearing and Composite
1 Attachment(s)
Hi there. I sort of feel like a solution might be out there somewhere already, but the results of searching were so all over the place (chronologically, and all those goes with it) and I just couldn't seem to work it out. Thanks in advance for the help!

Mplayer is my video player of choice, but the issue is present in xine-based players and VLC as well.

When watching video, there are horizontal lines/tears (top to bottom) during fast paced motion. I've played with all the vblank/sync stuff I could find to no avail. I found posts that indicated it was an issue with the Composite extension. Desktop effects/etc are fun, but I was ok without having them... so I disabled the extension in xorg.conf.

I was pleased to see that it did indeed fix the problem... no more tearing. However, it brought along a nasty side effect. If (in any of these players) I go to full screen, then come out of it, the video is gone/all black. This happens with both the current stable and beta driver and with both the normal Mplayer and a VDPAU enabled build. It seems to be completely related to turning off Composite (obviously when re-enabling it, the black video issue is gone but the tearing comes back).

So... any idea on how to get the best of both worlds? lol No tearing AND the ability to move in and out of full screen?

Thanks in advance.

thefirstm 04-27-09 04:36 AM

Re: Tearing and Composite
Which driver version are you using? If you use 185.19 or later (this includes 185.18.04), Vsync should be supported even with Composite on. You also need to make sure that whatever your compositing manager is is also Vsync-ing. You can do this in the Desktop Settings area of System Settings from Kwin, or in the CCSM for Compiz.

DrSuSE 04-27-09 05:53 AM

Re: Tearing and Composite
Both 180.51 & 185.18.04. Did try the vsync settings in nvidia-settings and in KDE System Settings for Desktop Effects.

Stephen Warren 04-27-09 11:11 AM

Re: Tearing and Composite
Just so I'm clear:
* You see tearing when X composite extension is enabled with only 180.*, not 185.*
* You see the problem coming out of full screen mode in 180.* and 185.*, or does this happen in just 185.*?

* After you get the black screen, does moving/resizing the window (or re-entering full screen) bring back video?
* Are there any error messages in MPlayer's stdout/stderr? Perhaps full-screen mode is inducing a mode-switch. VDPAU sessions don't survive across a mode-switch.

DrSuSE 04-27-09 12:56 PM

Re: Tearing and Composite
Hi Stephen, thanks for the reply. Sorry for the lack of clarity,

I see tearing w/ Composite enabled on BOTH the current stable and beta releases (180.* AND 185.*).

The issue coming out of full screen is on both drivers as well. (But only when Composite is disabled, it works fine when enabled)

Moving, resizing, re-entering fs had no effect, closing and reopening mplayer fixes it (temporarily, of course).

I want to say no, but the truth is I don't 100% remember. I'll have to retest it out when I get home tonight to be sure.

I've read so many posts about tearing and composite/etc... could you clarify what my expectations should be right now? I am ok with suffering through some progress, but I didn't want to just deal if it can/should work better. Should I be able to have Composite enabled and still be tear-free? And use VDPAU at the same time?


Stephen Warren 04-27-09 01:11 PM

Re: Tearing and Composite
* The black screen issue you see exiting full-screen mode is a bug *unless* your GUI application also performs a resolution or refresh rate change whilst entering/exiting full-screen mode. However, I don't think resolution/refresh changes are your problem, because that'd trigger when entering full-screen mode. I have to suspect an application bug here though, at least initially.

* When using the overlay-based presentation queue, you should never see tearing ever. See the README for full details on when overlay v.s. blit-based presentation queues are used. The main factor is whether the X composite extension is enabled (if it is, then blit is used).

* With the blit-based presentation queue, you will see tearing with 180.* drivers. The position of the tearing will probably vary across time, clips played, other GPU activity, etc.

* With the blit-based presentation queue, you should not see tearing with 185.* drivers. However, there has been at least one report at the URL below. Are your symptoms similar? The tearing will probably be in a constant place on the screen, and not vary.

DrSuSE 04-27-09 01:17 PM

Re: Tearing and Composite
Re: Black screen. Ok, I'll mess around with mplayer some more.

Re: Tearing. No, that sounds different. I feel like I might be misunderstanding (and thus misrepresenting) the issue inadvertently...

What is happening is, when watching videos (and usually just during periods of fast movement), I have a horizontal tear line that starts at the top of the video and moves down to the bottom of the video. The tear is always the entire width of the video, there is never more than one tear/line at a time.

Stephen Warren 04-27-09 01:23 PM

Re: Tearing and Composite
I see some "SaX*" options in your xorg.conf. I'm not familiar with those options and what they do... Can you describe your dual-monitor setup? The blit-based presentation queue can only sync to a single display at a time (e.g. if you're using TwinView) See the 185.* README for an environment variable to select which display to sync to in TwinView.

DrSuSE 04-27-09 01:37 PM

Re: Tearing and Composite
Sure, basically my PC is a laptop with an LCD monitor attached via HDMI. I hardly ever use the laptop's built-in screen (and then, only when traveling... never at the same time). Originally my xorg.conf file was the OpenSuSE created default + changes from the nvidia-settings app. This worked, but the VTs didn't display anywhere and the display switch button on the laptop hard-locked the system.

On the OpenSuSE boards, someone recommended renaming my xorg.conf file and creating a new one via the Dual Head part of Sax2. Doing so fixed my issues. No more hard locks and the VTs show up on the built-in screen. All I really wanted was to be able to see VTs somewhere, no have hardlocks, and otherwise... pretend the built-in screen doesn't exist... all I really use (99.9% of the time) is the external LCD monitor.

For reference, if you want to see the previous problematic xorg.conf it is here: http://landlordhat.com/xorg.conf.txt

Stephen Warren 04-27-09 01:40 PM

Re: Tearing and Composite
OK, I think with 185.* you need to do the following to prevent tearing:


in the shell/script you use to run MPlayer, before running MPlayer.

DrSuSE 04-27-09 01:52 PM

Re: Tearing and Composite
Stephen, thank you a ton for the helpful and fast responses. I'll try it as soon as I get home this afternoon and post the results here either way.

GraveR 04-27-09 02:33 PM

Re: Tearing and Composite
1 Attachment(s)
I can confirm the black screen issue with compositing disabled on Ubuntu 9.04 with at least 185.18.04 and 180.53.

Sometimes the video becomes a black screen when entering fullscreen (hitting F when using mplayer, today's snapshot) and always when leaving fullscreen. You have to restart mplayer to get it to work again.

All times are GMT -5. The time now is 07:07 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.