You are not logged in.

#1 2012-05-19 18:47:17

M4he
Member
Registered: 2011-08-11
Posts: 75

Nvidia, compositors, tearing - the old story

This problem is frequently driving me insane since years ago:

If you: 1. have a nvidia card 2. use the proprietary driver and 3. use a non-OpenGL compositor
-> you WILL get tearing no matter what (at least for videos in mplayer).

Over the months/years I tried my best to find any solution I can. Here are the solutions I collected:

  • Compiz with very specific settings (see my second post here: https://bbs.archlinux.org/viewtopic.php?id=137893 )

  • Gnome Shell (Mutter compositor) with the following line in /etc/environment

    CLUTTER_PAINT=disable-clipped-redraws:disable-culling
  • Any WM (i.e. Openbox) with "dcompmgr --gl" as compositor

EDIT: If tearing is still present with above methods, add the following to your autostart:

nvidia-settings -l

As I grew to like Openbox standalone, the only option left for me is dcompmgr now.
The problem: dcompmgr is not in active development as it seems and I got some issues with it.

Why is dcompmgr the only standalone compositor which has a working OpenGL mode and why is precisely this compositor not in active development?

dcompmgr seems like THE solution, despite the bugs. I simply don't understand why so many other compositors ignore this issue and still can't get rid of tearing. I think many linux users have nvidia cards nowadays and this issue should be quite widespread or am I wrong?

Wayland looks like the holy grail to me but is far from being stable let alone nvidia's driver doesn't even support KMS...

Last edited by M4he (2012-05-20 17:11:00)


Arch - makes me feel right at /home

Offline

#2 2012-05-19 22:57:48

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Nvidia, compositors, tearing - the old story

It's not that the xrender based compositors "ignore" the issue. It's *impossible* to do anything about it. xrender simply doesn't provide vsync. There's nothing deeper behind it, it's just that. And it has nothing to do with the nvidia driver, you'll get that with *any* driver, as the problem is xrender itself.

As to why isn't there any standalone pure gl compositor (as opposed to a combined compositor/wm, like Compiz)... good question. I would very much welcome it. Even better would be gl compositing being built directly into openbox.

Offline

#3 2012-05-19 23:59:42

Teho
Member
Registered: 2010-01-30
Posts: 200

Re: Nvidia, compositors, tearing - the old story

Is there anything that can be done with KWin?

EDIT: I tried "dcompmgr --gl" with Openbox and no luck there.

Last edited by Teho (2012-05-20 00:29:55)

Offline

#4 2012-05-20 06:54:07

M4he
Member
Registered: 2011-08-11
Posts: 75

Re: Nvidia, compositors, tearing - the old story

Teho wrote:

Is there anything that can be done with KWin?

Didn't play around with KDE myself for long, didn't have any luck either.

Teho wrote:

EDIT: I tried "dcompmgr --gl" with Openbox and no luck there.

Does the desktop still have tearing or just mplayer? If the latter, which video output are you using?
I needed to activate "Sync to VBlank" in both the OpenGL and the XVideo section within nvidia-settings for it to work.
I also got the following lines within the "Device" section of my xorg.conf:

    Option         "RenderAccel" "True"
    Option         "TripleBuffer" "True"

Honestly dunno if those lines are still necessary; I remember putting them in there for compiz to properly vsync.

Last edited by M4he (2012-05-20 06:55:06)


Arch - makes me feel right at /home

Offline

#5 2012-05-20 08:24:12

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Nvidia, compositors, tearing - the old story

RenderAccel is the default, so you can remove that. TripleBuffer is not default, and yeah, it's possible it helps. It introduces latency, but if it gives a smoother experience, that's possibly an acceptable trade-off.

Offline

#6 2012-05-20 10:21:05

Teho
Member
Registered: 2010-01-30
Posts: 200

Re: Nvidia, compositors, tearing - the old story

M4he wrote:
Teho wrote:

Is there anything that can be done with KWin?

Does the desktop still have tearing or just mplayer? If the latter, which video output are you using?

Actually I think that I have never had desktop tearing. It has been only noticeable with videos and pictures (if quickly changed). I added " Option         "TripleBuffer" "True" " but it didn't seem to have any effect and I have had VSync always on.

Todays findings: If I disable compositing (or use non compositing window manager) I don't have tearing with VDPAU backend on SMPlayer. The no difference if I Use XV backend or VLC media player.

Last edited by Teho (2012-05-20 10:21:33)

Offline

#7 2012-05-20 11:53:50

M4he
Member
Registered: 2011-08-11
Posts: 75

Re: Nvidia, compositors, tearing - the old story

Teho wrote:

Actually I think that I have never had desktop tearing. It has been only noticeable with videos and pictures (if quickly changed). I added " Option         "TripleBuffer" "True" " but it didn't seem to have any effect and I have had VSync always on.

Todays findings: If I disable compositing (or use non compositing window manager) I don't have tearing with VDPAU backend on SMPlayer. The no difference if I Use XV backend or VLC media player.

Try using only mplayer (no GUI like SMPlayer) after putting the following into /etc/mplayer/mplayer.conf

vo="xv"
double="yes"
ao="pulse"

spualign=-1
ass=yes
embeddedfonts=yes

(The latter three are only important if playing mkv with softsubs)

This works for my desktop (GTX 470) and my netbook (nvidia ION) when using one of the three tearing solutions mentioned in my first post.


Arch - makes me feel right at /home

Offline

#8 2012-05-20 14:15:20

Teho
Member
Registered: 2010-01-30
Posts: 200

Re: Nvidia, compositors, tearing - the old story

M4he wrote:

Try using only mplayer (no GUI like SMPlayer) after putting the following into /etc/mplayer/mplayer.conf.

Didn't work for me.

Offline

#9 2012-05-20 14:16:13

M4he
Member
Registered: 2011-08-11
Posts: 75

Re: Nvidia, compositors, tearing - the old story

Teho wrote:
M4he wrote:

Try using only mplayer (no GUI like SMPlayer) after putting the following into /etc/mplayer/mplayer.conf.

Didn't work for me.

What GPU are you using?
Are you trying this on Openbox with dcompmgr or which method?

Last edited by M4he (2012-05-20 14:18:48)


Arch - makes me feel right at /home

Offline

#10 2012-05-20 14:28:09

Teho
Member
Registered: 2010-01-30
Posts: 200

Re: Nvidia, compositors, tearing - the old story

M4he wrote:

What GPU are you using?

NVIDIA Quadro 1000M

M4he wrote:

Are you trying this on Openbox with dcompmgr or which method?

Yes.

Offline

#11 2012-05-20 14:46:04

M4he
Member
Registered: 2011-08-11
Posts: 75

Re: Nvidia, compositors, tearing - the old story

That's strange I must be missing something. Are you using the proprietary nvidia driver?
You can also try adding the following line to ~/.config/openbox/autostart

nvidia-settings -l

and then restarting Openbox and running "dcompmgr --gl --no-fade"


Arch - makes me feel right at /home

Offline

#12 2012-05-20 15:16:31

Teho
Member
Registered: 2010-01-30
Posts: 200

Re: Nvidia, compositors, tearing - the old story

Well.. now it seems to work just fine. Thanks.

Offline

#13 2012-05-20 17:06:38

M4he
Member
Registered: 2011-08-11
Posts: 75

Re: Nvidia, compositors, tearing - the old story

Teho wrote:

Well.. now it seems to work just fine. Thanks.

You're welcome! Thanks for testing this all out, I will note that down regarding the autostart line.


Arch - makes me feel right at /home

Offline

Board footer

Powered by FluxBB