You are not logged in.
Hi all,
I have a very persistent problem which affects many people apparently, but after extensive searching I haven't found a conclusive fix that works for me. I have a nice Nvidia GeForce GTX 660 Ti graphics card, and I'm using the proprietary Nvidia driver (I'm using the latest version available in the official repositories).
My desktop environment is KDE 4, and with compositing enabled (and I do want compositing enabled), the top third of my screen suffers significant tearing when there's movement, whether that be moving windows around, playing videos in mplayer, VLC or Chromium, or playing 3D games (fullscreen 3D games I've tested don't even seem to work with compositing disabled, fyi).
In nvidia-settings, I've set the resolution and frequency of my monitor to 1680x1050 and 60Hz manually, instead of just using 'Auto' for those settings. 'Sync to VBlank' and 'Allow Flipping' are checked in the OpenGL Settings section, and the 'Image Settings' slider is set to 'High Performance'. My PowerMizer settings are set to 'Prefer Maximum Performance' for obvious reasons, but this doesn't stay set when I reboot (even with a custom line in xorg.conf added).
This tearing is incredibly frustrating, and annoyingly I'm sure Nvidia could have fixed it by now. The issue has been discussed on forums Internet-wide for at least three years now.
Anyway, have my xorg.conf, if it's any help. The line with 'PowerMizer' in it was found on some other forum, and it's intended to keep my PowerMizer settings on maximum performance, but that doesn't happen either. You can also see that I have TripleBuffer enabled.
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 313.26 (buildmeister@swio-display-x86-rhel47-05) Wed Feb 27 13:56:11 PST 2013
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 313.26 (buildmeister@swio-display-x86-rhel47-05) Wed Feb 27 13:55:59 PST 2013
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Samsung SyncMaster"
HorizSync 30.0 - 81.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce GTX 660 Ti"
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TripleBuffer" "True"
Option "Stereo" "0"
Option "metamodes" "1680x1050_60 +0+0"
SubSection "Display"
Depth 24
EndSubSection
EndSection
The history of this issue means there's unlikely to be a comprehensive fix any time soon, but I'm really hoping. This is driving me closer and closer to Windows.
Last edited by Archimaredes (2013-04-03 16:36:40)
Offline
I'm just going to bring this up again to note that there was just an update to the Nvidia driver and the problem still isn't resolved. I'm wondering if this counts as a bug in the driver software, but it's hard to know whether it's related to the driver or the compositing software. Any advice is appreciated. Thanks in advance.
Offline
I have the same issue in KDE with intel (just the top part of the screen tears). Its a kwin bug and according to the comments it also effects nvidia. The good news is that the KDE developers are aware of it and have a fix. The bad news is that unfortunately, you need to wait for kde 4.11 for said fix. This is the reason I'm still using gnome-shell instead of KDE (gnome-shell/mutter actually has the same bug, but there's an easy workaround for it by adding CLUTTER_PAINT=disable-clipped-redraws:disable-culling to /etc/environment, but kwin has no such workaround)
https://bugs.kde.org/show_bug.cgi?id=307965
Last edited by bwat47 (2013-04-04 19:42:51)
Offline
I have the same issue in KDE with intel (just the top part of the screen tears). Its a kwin bug and according to the comments it also effects nvidia. The good news is that the KDE developers are aware of it and have a fix. The bad news is that unfortunately, you need to wait for kde 4.11 for said fix. This is the reason I'm still using gnome-shell instead of KDE (gnome-shell/mutter actually has the same bug, but there's an easy workaround for it by adding CLUTTER_PAINT=disable-clipped-redraws:disable-culling to /etc/environment, but kwin has no such workaround)
Thanks, that's actually great to hear. I'm relieved that it's been noticed by developers. Can't wait for 4.11 now.
Offline
Please report it to nvidia.
Composite just doesn't work well
Offline
I always have vsync not forced in nvidia driver, but checked in kde.
that way performance are better, and i've got no tearing at all.
This is on 9500gt and 9800gt
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
That is weird. I'm using KDE because it's the ONLY DE that doesn't have any screen tearing for me on 460GTX on 1680x1050@60hz.
Can't show my xorg.conf as I'm not using one.
Do you have enabled OpenGL, OpenGL 2 shaders and Native Qt enabled in System Settings/Desktop Effects/Advanced?
Are you using VDPAU for video playback?
It's a long shot and maybe unrelated, but I've added "options nvidia NVreg_EnableMSI=1" to /etc/modprobe.d/modprobe.conf too.
Whatever happens, happens.
Offline
I repeat:
https://devtalk.nvidia.com/default/topi … =8#3718582
If you enable kwin compositing AND vsync in its settings you will get image tear. Just _one_ horizontal tear.
..or wait for kde 4.11, like said.
Last edited by kokoko3k (2013-04-05 09:53:52)
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
I always have vsync not forced in nvidia driver, but checked in kde.
that way performance are better, and i've got no tearing at all.
This is on 9500gt and 9800gt
That is weird. I'm using KDE because it's the ONLY DE that doesn't have any screen tearing for me on 460GTX on 1680x1050@60hz.
Can't show my xorg.conf as I'm not using one.
Do you have enabled OpenGL, OpenGL 2 shaders and Native Qt enabled in System Settings/Desktop Effects/Advanced?
Are you using VDPAU for video playback?
It's a long shot and maybe unrelated, but I've added "options nvidia NVreg_EnableMSI=1" to /etc/modprobe.d/modprobe.conf too.
Well, I combined your two replies and now I have:
"Sync to VBlank" disabled in nvidia-settings;
Native Qt graphics system, "Use OpenGL 2 Shaders", and "Use VSync" enabled in KDE's system settings.
Hm. No change. I haven't added the modprobe option, though.
EDIT: I have VDPAU installed, but it's kind of irrelevant because this tearing occurs everywhere (as said, it's a kwin bug).
Last edited by Archimaredes (2013-04-05 19:04:19)
Offline
Please report it to nvidia.
Composite just doesn't work well
I'm not just gonna disable compositing, though, I can live without them but I like things to be pretty, as I use this computer all the time. Also I won't report to nvidia until KDE 4.11 comes out, so I can see if there's a change.
Offline
Well, I combined your two replies and now I have:
"Sync to VBlank" disabled in nvidia-settings;
Native Qt graphics system, "Use OpenGL 2 Shaders", and "Use VSync" enabled in KDE's system settings.Hm. No change. I haven't added the modprobe option, though.
EDIT: I have VDPAU installed, but it's kind of irrelevant because this tearing occurs everywhere (as said, it's a kwin bug).
Did you restarted kwin after the change in nvidia-settings, right?
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Archimaredes wrote:Well, I combined your two replies and now I have:
"Sync to VBlank" disabled in nvidia-settings;
Native Qt graphics system, "Use OpenGL 2 Shaders", and "Use VSync" enabled in KDE's system settings.Hm. No change. I haven't added the modprobe option, though.
EDIT: I have VDPAU installed, but it's kind of irrelevant because this tearing occurs everywhere (as said, it's a kwin bug).
Did you restarted kwin after the change in nvidia-settings, right?
Yes, I restarted X entirely.
Offline
You should be able to remove tearing in fullscreen videos at least, if you enable "unredirect fullscreen windows" in kwin and enable vsync in the nvidia driver, (and make sure you use opengl or vdpau output in the video player) because doing this makes the fullscreen window bypass kwin's composting and only use the nvidia driver's vsync, therefore not hitting the bug. Still less than ideal because it has little issues like the tearing coming back while you use the video players floating controls and some video players are just glitchy with unredirect fullscreen windows enabled. If that works for you, you could even get tear-free flash video if you use google chrome's pepper flash since it uses opengl rendering.
Last edited by bwat47 (2013-04-06 15:34:02)
Offline
You should be able to remove tearing in fullscreen videos at least, if you enable "unredirect fullscreen windows" in kwin and enable vsync in the nvidia driver, (and make sure you use opengl or vdpau output in the video player) because doing this makes the fullscreen window bypass kwin's composting and only use the nvidia driver's vsync
My experience (with nvidia, vdpau, composite, vsync, tearing and all that crap) is that the window manager must support un-redirecting fullscreen windows AND vsync. If the (compositing) WM doesn't support vsync then even un-redirected windows are not vsync'ed and you get tearing (nvidia settings make no difference).
For example, when I was using the xfce window manager (which supports un-redirecting fullscreen windows but not vsync) I still got tearing. It was only when I switched to compiz (with vsync and un-redirect FS-windows enabled) that I could get tearing free video.
I have also found that, for smooth video playback, refresh rates do matter. This has something to do with inter-frame modulation that the video player has to do, because it has to compensate for the difference between the frame rate of the video and the refresh rate of the display. So - If you get micro stuttering (slow moving scenes do not appear like moving smooth) try switching your display refresh rates (try something like 50Hz, 59Hz and 60Hz).
Currently I happily use gnome 3 with CLUTTER_PAINT=disable-clipped-redraws:disable-culling in /etc/environment and mplayer2 with vdpau for tearing free video. I use a script to quickly switch monitor refresh rates (since gnome doesn"t allow me to switch refresh rates - they probably never watch videos...).
Edit: I use nvidia's High Quality settings and the adaptive (default) powermizer. Also, triple buffering is not needed for smooth video playback and it adds input latency on a vsynced composite desktop.
Last edited by vvd (2013-04-06 18:01:13)
I am an evil patriARCH, peach!
Offline
bwat47 wrote:You should be able to remove tearing in fullscreen videos at least, if you enable "unredirect fullscreen windows" in kwin and enable vsync in the nvidia driver, (and make sure you use opengl or vdpau output in the video player) because doing this makes the fullscreen window bypass kwin's composting and only use the nvidia driver's vsync
My experience (with nvidia, vdpau, composite, vsync, tearing and all that crap) is that the window manager must support un-redirecting fullscreen windows AND vsync. If the (compositing) WM doesn't support vsync then even un-redirected windows are not vsync'ed and you get tearing (nvidia settings make no difference).
For example, when I was using the xfce window manager (which supports un-redirecting fullscreen windows but not vsync) I still got tearing. It was only when I switched to compiz (with vsync and un-redirect FS-windows enabled) that I could get tearing free video.I have also found that, for smooth video playback, refresh rates do matter. This has something to do with inter-frame modulation that the video player has to do, because it has to compensate for the difference between the frame rate of the video and the refresh rate of the display. So - If you get micro stuttering (slow moving scenes do not appear like moving smooth) try switching your display refresh rates (try something like 50Hz, 59Hz and 60Hz).
Currently I happily use gnome 3 with CLUTTER_PAINT=disable-clipped-redraws:disable-culling in /etc/environment and mplayer2 with vdpau for tearing free video. I use a script to quickly switch monitor refresh rates (since gnome doesn"t allow me to switch refresh rates - they probably never watch videos...).
Edit: I use nvidia's High Quality settings and the adaptive (default) powermizer. Also, triple buffering is not needed for smooth video playback and it adds input latency on a vsynced composite desktop.
With undirected fullscreen windows enabled the compositor's vsync support is irrelevant, because the whole purpose of that option is to allow the window to completely bypass the compositor. At that point it is down to the driver and the video players opengl implementation. If the compositor's vsync works properly with your driver then you don't want undirected fullscreen windows enabled for your video players anyway.
Last edited by bwat47 (2013-04-06 18:32:11)
Offline
With undirected fullscreen windows enabled the compositor's vsync support is irrelevant, because the whole purpose of that option is to allow the window to completely bypass the compositor. At that point it is down to the driver and the video players opengl implementation. If the compositor's vsync works properly with your driver then you don't want undirected fullscreen windows enabled for your video players anyway.
It would be all cool and dandy if it would work like that - and in a perfect world it would make sense - but my experience shows that it does not. All I can tell you, and I'm sure you'll understand, is that you have to look into all kinds of things to get the expected result, sometimes even into not-so-obvious things.
I am an evil patriARCH, peach!
Offline
kokoko3k wrote:Archimaredes wrote:Well, I combined your two replies and now I have:
"Sync to VBlank" disabled in nvidia-settings;
Native Qt graphics system, "Use OpenGL 2 Shaders", and "Use VSync" enabled in KDE's system settings.Hm. No change. I haven't added the modprobe option, though.
EDIT: I have VDPAU installed, but it's kind of irrelevant because this tearing occurs everywhere (as said, it's a kwin bug).
Did you restarted kwin after the change in nvidia-settings, right?
Yes, I restarted X entirely.
...and you have something that loads nvidia settings (nvidia-settings -l) in a kde autostart script that runs before kwin?
If unsure, run by konsole:
# nvidia-settings -q SyncToVBlank
Attribute 'SyncToVBlank' (Gozer:0.0): 0.
'SyncToVBlank' is a boolean attribute; valid values are: 1 (on/true) and 0 (off/false).
'SyncToVBlank' can use the following target types: X Screen.
and if it says That the attribute is 0, i'd try frome the same konsole:
kwin --replace
...and see if it still 'tears'
This is my last shot, i promise.
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Did you figure out how to make the PowerMizer default to something higher than 0 on Adaptive? I have a 9600M GT and Kwin stutters wildly during normal use unless I go and select "Prefer Maximum Performance" after every reboot. Sucks for battery life too.
I was using the following line in my xorg.conf, but it seems to have no effect anymore.
Option "RegistryDwords" "PowerMizerEnable=0x1; PerfLevelSrc=0x3322; PowerMizerDefaultAC=0x1"
Last edited by BasioMeusPuga (2013-04-07 12:53:38)
Offline
Prefer Maximum Performance
Put this in a script:
nvidia-settings -a [gpu:0]/GPUPowerMizerMode=1 > /dev/null
As an interesting aside, here's *why* it's the top of the screen that tears.
Offline
Hey guys !
I dual boot Kubuntu and Arch (hoping to switch to Arch full time one day :-) and, for some reason, using, if I'm not mistaken, the same nvidia drivers & KDE versions, I have this infamous tearing in Arch only, display being perfect in Kubuntu.
Do you have any idea why ?
Cheers !
Offline
Different driver version?
Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !
Offline
Thanks for the reply !
I'll double check with different drivers versions and get back to you, but as far as I remember, this is a problem I've encountered for quite a long time (rather years than months) already (that is to say : no tearing under Kubuntu, tearing under Arch / Chakra..).
Strange.
well, to be more accurate : under Kubuntu, I cannot this this tearing at the top of the screen when moving windows, or watching moving. I can see it though in fullscreen games (except, of course, when I ask to disable kwin for fullscreen apps).
Last edited by torturedutopian (2013-05-27 07:48:36)
Offline