nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Nvidia Ion, Ubuntu Karmic and Composite (http://www.nvnews.net/vbulletin/showthread.php?t=149276)

rossmoore 03-24-10 09:44 AM

Nvidia Ion, Ubuntu Karmic and Composite

I've tried posting in forums and searching on google, and even posting a bug to Nvidia. All to no avail so far - maybe YOU can help? ;o)

I have an Nvidia ION machine, running Karmic. I have the 195 drivers installed. I'm trying to watch 720p video in H264 encoding. If I turn off composite in xorg.conf, all is good. It looks fantastic, and I'm very happy.

However, I'd like to use composite, and the various docks and effects that it allows. There's lots of graphics power sitting untapped in my ION because I can't use composite. What happens if I turn on composite in xorg.conf? I get a tear in videos about an inch down my 720p TV screen, and nothing I've tried can get rid of it. [Yes, I have VBlank set in Compiz, and in gl and xv in nvidia-settings]

Now, I've read up about this, and it seems to be caused by the switch from "overlay" presentation (used when composite is off) to "blit" presentation (used when composite is on). Overlay cannot tear, but blit can. But this "tearing in blit mode" was meant to be fixed in the 185 drivers. So why do I, and a few other people I've read about on the web, get a constant tear 30-50 pixels down the screen with the 190 and 195 drivers still?

I'm happy to post anything you think will help debug this. Or if you know it is still an unfixed bug in the latest drivers, then let me know so I can just track the bug and wait 'til it's fixed (or go get some hardware that can do it). But not knowing what's causing it is driving me crazy.


AaronP 03-24-10 12:42 PM

Re: Nvidia Ion, Ubuntu Karmic and Composite
VDPAU's tear-free blit mode can only work when the window it's rendering to is not redirected (i.e. you're not running a composite manager, or the window is full-screen and you've enabled Compiz's "unredirect fullscreen windows" option).

When a composite manager is enabled, it's up to it to perform the vblank syncing. Please make sure that Compiz's "detect refresh rate" option is disabled and that the refresh rate slider is set to twice your screen's actual refresh rate.

rossmoore 03-24-10 07:04 PM

Re: Nvidia Ion, Ubuntu Karmic and Composite
Hi AaronP,

Thanks for the detailed response. I can confirm that I have "unredirect fullscreen windows" set, "detect refresh rate" disabled and refresh rate set to 120. Technically this isn't twice my TV's refresh rate. If I type:

nvidia-settings -q RefreshRate
Then I get:

  Attribute 'RefreshRate' (rossmoore-server:0.0; display device: DFP-1): 59.80
    'RefreshRate' is an integer attribute.
    'RefreshRate' is a read-only attribute.
    'RefreshRate' is display device specific.
    'RefreshRate' can use the following target types: X Screen, GPU.

But I can't set the refresh rate in compiz to a fractional number. Is this the source of the problem? Or is it related to the fps of the material I'm playing?

rossmoore 03-25-10 06:04 AM

Re: Nvidia Ion, Ubuntu Karmic and Composite
And to just to clarify, I'm using mplayer with the ffh264vdpau codec and vdpau as the output module.

rossmoore 03-29-10 09:54 AM

Re: Nvidia Ion, Ubuntu Karmic and Composite

Hi Aaron - sorry your first reply didn't help, but I'm happy to help you debug this and get to the bottom of it. I think there are lots of users in a similar situation that would really appreciate the help.


AaronP 03-29-10 04:38 PM

Re: Nvidia Ion, Ubuntu Karmic and Composite
I'm sorry, I don't have any more suggestions. I would suggest contacting the Compiz community since when Compiz is running, it's out of the driver's hands.

rossmoore 03-29-10 06:55 PM

Re: Nvidia Ion, Ubuntu Karmic and Composite
OK, thanks for now AaronP. Two thoughts:
1. In that case perhaps Kubuntu should work since it uses KWin by default? I'll give it a shot.
2. I'll head over to the Compiz forums / bug tracker and see if I can get any sense out of them.

I'll be back!

rossmoore 05-14-10 05:08 AM

Re: Nvidia Ion, Ubuntu Karmic and Composite
OK, I'm back.

AaronP, you seem to be giving contradictory advice. I've had a reply from AdamK over at Compiz. Here's the thread:

He picks out posts by you stating that it's an X limitation, not a Compiz bug - Compiz can't possibly perform the VBlank in this situation. So you've suggested an upgrade to X to improve the situation:

So who should I be hassling to get this fixed, or offering my money / testing services towards? Nvidia? X? Compiz?

Stephen Warren 05-14-10 10:28 AM

Re: Nvidia Ion, Ubuntu Karmic and Composite
To get the overlay-based presentation queue (which will guarantee tear-free presentation), you need to disable the X composite extension. It's not enough to just unredirect the window.

rossmoore 05-14-10 10:52 AM

Re: Nvidia Ion, Ubuntu Karmic and Composite
I understand that I need to disable composite to get tear-free video. The point is that I don't want to, because I like the benefits of composite (compiz, pretty effects, clever docks, etc). So my question is: who needs to improve to enable tear-free video in linux with composite. Is it X, or Nvidia, or Compiz?

AaronP has indicated that Nvidia could implement functionality in their linux driver to enable tear-free VDPAU video playback with composite enabled in X, provided no composite manager was running. This would be a great step forward, meaning that a simple script to disable compiz could be run before watching a video rather than having to restart X.

So what can I do to help?

dk75 05-15-10 04:41 AM

Re: Nvidia Ion, Ubuntu Karmic and Composite
you could open VDPAU video at separate X screen without composite extension, at least with MPlayer

rossmoore 05-20-10 03:08 AM

Re: Nvidia Ion, Ubuntu Karmic and Composite
Thanks dk75, interesting idea. I did some research on the back of what you said, and have figured out how to switch to vt1, startx with a different xorg.conf (with composite disabled) onto vt8 and then start mplayer on vt8. On Ubuntu, vt7 is the normal vt.

It works, but it's a pretty lengthy a difficult procedure every time I want to watch a tear-free video. Is there a way of automating all that with a bash script? I know chvt changes the vt, but then you need to log in to that vt, and you need to disable anything that autostarts (like the cairo dock which needs composite) in the new X session.

That only solves half the problem of course - you then have to switch back when you're done. It works for me, but it doesn't pass the "wife" test...

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

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