Ubuntu

Screen tearing when dragging window, in videos and other large screen redraws (on nVidia GPU)

Reported by Tommi Ahonen on 2010-06-30
386
This bug affects 80 people
Affects Status Importance Assigned to Milestone
Compiz
Undecided
Unassigned
NVIDIA Drivers Ubuntu
Undecided
Unassigned
Nouveau Xorg driver
Confirmed
High
Release Notes for Ubuntu
Undecided
Unassigned
Precise
Medium
Unassigned
kde-workspace (Ubuntu)
Undecided
Unassigned
nvidia-graphics-drivers (Ubuntu)
Undecided
Unassigned

Bug Description

I have installed Ubuntu and the latest proprietary graphics drivers on my laptop and when I drag a window around the screen or watch a video with lots of movement I see screen tearing.

The same problem persists even if I enable "Sync to VBlank" in the NVIDIA X Server settings, and with nouveau video driver,

description: updated
description: updated
description: updated
summary: - Screen tearing when dragging window
+ Screen tearing when dragging window, in videos and other large screen
+ redraws
Tommi Ahonen (tommi-t-ahonen) wrote :
Tommi Ahonen (tommi-t-ahonen) wrote :
Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: New → Confirmed
Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: Confirmed → New
Bryce Harrington (bryce) on 2010-07-03
tags: added: hardy

The same with GT230M adapter and KWin. Apport report is needed?

Bryce Harrington (bryce) on 2010-07-10
tags: added: lucid
Changed in nouveau:
status: New → Confirmed
tags: removed: 9400m geforce hardy lucid
description: updated
tags: added: lucid maverick

Additional information available in duplicates desription and commentaries.

Mahendra Tallur (mahen) wrote :

I'm not sure my comment will be relevant, but I've just noticed some tearing *at the top of the screen only* (that's barely noticeable -- in openGL 2D games like SMC for instance), when using nvidia proprietary drivers + compiz.

Please note I'm doing the following which usually gives a flawless output but not now as of Ubuntu 10.10 :
- Option "DynamicTwinView" "false" in /etc/Xorg.conf so that the right refresh rate is given by the driver (I hope nvidia will fix it one day, so that it's not necessary anymore)
- nvidia-settings : I tick sync to VBL everywhere
- CCSM : I tick : autodetect vsync + sync to VBL

This bug was definitely not there *before* Lucid. Was probably there in Lucid though. It's very noticeable in SMC or Steelstorm for instance but not much in regular 3D apps with no "2D scrolling".

Cheers !

summary: Screen tearing when dragging window, in videos and other large screen
- redraws
+ redraws (on nVidia GPU)
bugbot (bugbot) wrote :

Hey Tommi,

Thanks for testing maverick during its development period. Unfortunately it looks like this bug report didn't get attention during the maverick development period. But I see there's not been more comments on the bug since the release, which makes me wonder if this is still an issue for you?

If you've not seen this issue since maverick's release yourself, it may have been solved by kernel or X or other updates that occurred late in the release; if so, would you mind please closing the bug for us? Go to the URL mentioned in this bug report, click the yellow icon(s) in the status column and set to 'Fix Released'.

If you no longer have the hardware needed to reproduce the problem, or otherwise feel the bug no longer needs tracked in Launchpad, you can set the status to 'Invalid'.

If you are the original reporter and still have this issue, just reply to this email saying so. (Or set the bug status to Confirmed.) If you are able to re-test this against 11.04 Natty Narwhal (our current development focus) and find the issue still affects Natty, please also run 'apport-collect <bug-number>' while running natty, which will add fresh logs and debug data, and flag it for the Ubuntu-X development team to look at.

Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: New → Incomplete

Still issue in Maverick and Natty.
Please change package name from nvidia-graphics-drivers-180 to nvidia-current.

Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: Incomplete → Confirmed
affects: nvidia-graphics-drivers-180 (Ubuntu) → nvidia-graphics-drivers (Ubuntu)
Tommi Ahonen (tommi-t-ahonen) wrote :

Still issue in Maverick with NVIDIA driver version 260.19.06 (Linux-x86_64).

Tommi Ahonen (tommi-t-ahonen) wrote :

I would test this in Ubuntu 11.04 Natty Narwhal but after upgrading to the 11.04 development realease and upgrading to the proprietary drivers Ubuntu freezes after reboot once it reaches the place where there is a Ubuntu logo in the center and 5 small circles under it.

So for the time being I don't reccomend testing anything.

Apparently there is some inconsistency between the latest version of xserver 1.10 and the Nvidia drivers. http://ubuntuforums.org/showthread.php?t=1687285

Geert Jan Alsem (gj-alsem) wrote :

For me the situation in Natty got worse. On Maverick (and before) I couldn't get vsync to work properly when using Compiz, but when using Metacity vsync was fine. On Natty (beta) vsync doesn't work properly with both Compiz and Metacity. So right now on Natty, no matter which settings I use or what I do, I can't get full screen video to play without screen tearing.

Using an Nvidia Geforce 9500 GT with the latest Nvidia drivers from the Ubuntu repos.

With my 8400m gs I could solve everything on 10.10 by turning all vsync options (nvidia-settings & compiz (manually set rate to 60)) on. This still works for me in Natty in classic mode with compiz ON, but NOT in unity which also uses compiz. I find this pretty strange.

Alex Gogolev (moonstormraven) wrote :

I was able to solve the tearing on 10.10 also. But not now. Very annoying bug. Makes video and gaming experience terrible.

Geert Jan Alsem (gj-alsem) wrote :

I did find one way to get vsync to work in Natty, but it involves editing xorg.conf. I followed these instructions to disable composite extension: https://wiki.archlinux.org/index.php/Composite

Of course if you do that then all desktop effects and Unity stop working.

What is strange to me that disabling composite makes a difference when using Metacity. I mean, in gconf I have the key "/apps/metacity/general/compositing_manager" set to False, so it shouldn't be using compositing in the first place.

In Natty, I get close to no tearing with VDPAU on my Nvidia GT240 by setting ccsm to enable "unredirect fullscreen", enable "vsync", and forcing compiz's refresh rate to 120. But, it's still hit or miss sometimes. Vdpau will still sometimes either be slow, or have searious tearing. I found that by restarting compiz a few times and enabling/disabling "copy to texture" plugin can temporarily fix the video tearing. It's not consistent, and I have no idea why it even works when it does. When it does work, it eliminates 90% of the tearing issues, but they still sometimes occur on very rapid screen movement/changes.

Nadav (nadav74) wrote :

It happens to me regardless of whether compsiting is enabled or not. I'm using nvidia-current with nVidia 250GT. I enabled vsync of the nVidia panel, which solved it under Lucid, but didn't help with Natty.

HannesB (hannesb) wrote :

Thanks to Taylor (#16), i got my screen tearing-free for fullscreen OpenGL(9800 GT, Natty):
-enable "unredirect fullscreen" + "vsync"
-set refresh-rate to 60
-uncheck automatic detection of refresh rates (detection fails: ccsm says 50, xrandr says 50 too, nvidia-settings 60, OSD of my screen 60 )
The only regression is that this way there is no preview of the fullscreen window if I hit Alt-Tab Window switching - Its OK for me.
Nevertheless I hoped with the "X Sync Fences" in X 1.10 everything would work out of the box.

Jebus Beler (my-masq) wrote :

Sorry can you say a little more about how you managed to get rid of the tearing? I don't see a "vsync" option in cccm. Do you mean "sync to vblank" (in OpenGL) or maybe "Don't wait for video sync" in "Workarounds"? I also don't see a vsync in the nvidia panel (only a "sync to vblank") either. Also do I need to restart compiz or X for this to work or should it work immediately?

Do you only get this problem if you've run videos for a while or while running videos? I ran some videos but the problem appeared much later and the tearing happens when moving any windows. Now when I try to run videos its very choppy. I'm running the natty with a Gtx 560 and the 270.41.06 nvidia driver. Actually its not just dragging windows its most graphical interactions -- even drop down menus and typing in a terminal is slow. And this has nothing to do with system load as the system is mostly idle with lots of unused ram.

It seems impossible to have tear-free video playback in Natty.
I tried pretty everithing in nvidia-setting and in compiz. I also set some enviromental variable in .bashrc as suggested in some wikis.
But using Mutter instead of Compiz, it doesn't tear videos. So, I tried to downgrade compiz to 0.8.6, but even this version presents tear. I installed nvidia-173 but tear was still here.

p.s. dragging windows, they don't tear.

tags: added: natty
jukka76 (jukka76) wrote :

I think only way to play full screen video with no tearing in Natty, is to disable composite extension (see comment #15)
Then you need to use classic mode without visual effects (select in login screen).
I'm using nvidia 9400M with driver nvidia-current (270.41.06).
I tried also nvidia-173, but I could not get vdpau working on it.
Can any other nvidia driver to be get working with nutty? I tried several from NVIDIA, but seems those can't compiled or does not work with current X version.

In 10.04 with these settings enabled I had no tearing with full screen video:

Workarounds:
Legacy fullscreen support

General options:
Unredirect Fullscreen Windows

> I think only way to play full screen video with no tearing in Natty, is to disable composite extension (see comment #15)

But with mutter (and compositing) there is no tear.

But with mutter (and compositing enabled) there is no tear.

jukka76 (jukka76) wrote :

When enabling these:

Workarounds plugin:
Legacy fullscreen support

Composite plugin:
Unredirect Fullscreen Windows

And then disabling "Window Decoration plugin", and restarting gdm, Full Screen videos plays smooth without tearing.

And then disabling "Window Decoration plugin"

but how do you us windows without dcorator???

jukka76 (jukka76) wrote :

You can't, so it can't be used as a workaround.

Maybe the plugin has something what should be checked for? Maybe it prevents compiz to recognize full screen windows, and then full screen workarounds are not used?
I tried also to change the command to gtk-window-decorator in the plugin settings, but no help.

Please see also the thread http://ubuntuforums.org/showthread.php?t=1742643

Suspecting something in gtk-window-decorator I tried merald but tearing is still here

jukka76 (jukka76) wrote :

Did you try to disable window decorator plugin and then restart gdm, did tearing disappear for you?

I did more: I killed any decorator but the problem is still here.

I have a laptop with a geforce 8400m g nvidia graphic card and I always had this tearing problem. In Maverick I've managed to partially solve it enabling Sync to VBlank both in the nvidia settings and compiz then ,always in compiz, i enbled the undirect fullscreen windows (I think it's called like this), installed the compiz-fusion icon and set it to start at boot with indirect rendering disabled. With all this I didn't have tearing with moving windows or compiz cube. There was also no tearing when watching videos at full screen. I tryed all this on natty ( with 270.41.06 nvidia drivers) but tearing on videos was still there, the only thing I found out that solves the problem is to enable the "Force full screen redraw (buffer swap) on repaint" option in the workaround settings ( always in compiz). Probably it's not the best solutions since the description tells: "Forces the entire screen to redraw every repaint. Use with care, this will cause a massive increase in GPU and CPU usage.". I just want to know what you think about it.

May I help anyway to solve this bug?, i mean, i'm not a developer, but this bug affects me. May i upload some logs or my system configuration?

I've tried all vsync configuration proposed here but with no results... In my case i see 'realy-fast-magnetic-like-distorsion' when opening many times dash menu. When i get first time this 'distortion' then it appears more often. If i stop clicking and moving windows or whatever, then it may stop until i start to click things.

It doesnt seem to happen when watching movies (at least for me). In my opinion bug #687738 fit better with mine (althoug it's marked as duplicated).
[Sorry for english]

I have this issue with nvidia hardware and the nvidia driver since 8.04
Always only while using compiz. But since compiz is now also unitys problem, it's fair to say it's also an important one finally.

Tried severall workaround and some bring good performance but aspecially videos will always tear a little bit with compiz and since alpha 2 from natty also unde unity - of course.

nvidia gforce 8400gs and latest nvidia
pentium 4

link to german ubuntuusers thread about this issue http://forum.ubuntuusers.de/topic/tearing-bzw.-streifen-in-videos-nvidia/3/

Hopefully some highly skilled and canonical programmers build from pure fire and stars will smack the s$%§ out of this bug ... pls

jukka76 (jukka76) wrote :

Seems that option "Unredirect Fullscreen Windows" does not work at all if unity-window-decorator or gtk-window-decorator is running.

If "Unredirect Fullscreen Windows" is enabled and I kill the process, fullscreen videos does not have tearing.

psypher (psypher246) wrote :

Hi All,

This issue also affects me, Nvidia 450
Please describe to me where in compiz is the "unredirect fullscreen" and "screen refresh rate" options. I do not find either of them anywhere. refresh rate used to be there in maverick.

Not that this solves the issue, aparently, but I am confused as to why i do not see this option

Thanks

dack (dack) wrote :

I have this issue as well. Very bad tearing with compiz (unity or classic). "Unredirect fullscreen" only works if you kill the decorator (in both unity and classic). Currently using nouveau drivers.

dack (dack) wrote :

Things I've tried:

- Run under classic or unity - Very bad tearing. Unredirect fullscreen has no effect unless decorators are killed, in which case it behaves the same as classic (no effects).
- Run under classic (no effects) - One tear instead of multiple tears. The vertical position of the tear changes, sometimes it moves off the screen for a while but then comes back later.
- Disable C1E in bios - C1E is known to cause timing issues (messes with HPET somehow). When C1E is enabled, the tearing is definitely worse. As I'm not concerned about the power saving, I left C1E off.
- Disable other bios power management features - no effect.
- Use "mplayer -rtc" - Similar effect to disabling C1E.
- Different players - totem, vlc, mplayer, etc. All behave the same.
- Proprietary driver vs nouveau - no difference. tried all vsync/vblank settings.
- mplayer -vo gl2 (with proprietary driver) - tearing changes slightly, but is still present.
- lowlatency kernel (https://launchpad.net/~abogani/+archive/ppa) - no difference.

My conclusions:
- Tearing effects both nouveau and proprietary drivers, all players, and both opengl and xv
- None of the workarounds so far have solved it completely
- Disabling C1E makes a significant improvement
- Unredirect fullscreen doesn't work unless decorators are killed
- classic (no effects) is also effected, although not as bad

At this point my best guess is that it is either a kernel or xorg bug.

dack (dack) wrote :

This is a simple test clip for tearing issues I've made. Any tearing will be very obvious with this clip (the vertical bar should be smooth with no jagged disconnects).

dack (dack) wrote :

Disabling compositing in xorg.conf seems to stop the tearing (so far, anyway):

Section "Extensions"
 Option "Composite" "Disable"
EndSection

That seems to point to an xorg bug of some sort.

michal.gregor (michal.gregor) wrote :

This is release is a joke... :D I have even tried to downgrade the xserver and the nvidia driver to those present in maverick but that didn't seem to work at all (which is surprising to say the least as this worked for me on maverick). Disabling compositing does not work either. I have tried the xorg-edgers versions of the xserver and nvidia driver, I've tried the 2.6.39 kernel in case that made any difference, which it didn't. If anybody has further ideas, please share.

"Unredirect fullscreen doesn't work unless decorators are killed"

but it seems work a for me. Now I have the 275 nvidia driver, a configured .bashrc, /etc/init.d/gdm and /etc/init/gdm.cof adding export __GL_SYNC_TO_VBLANK=1
export XV_SYNC_TO_VBLANK=1
export __GL_SYNC_DISPLAY_DEVICE=DFP-0
export __VDPAU_NVIDIA_SYNC_DISPLAY_DEVICE=DFP-0

(DFP-0 is my display name).

But note I use compiz 0.8.6 in natty.

Well, this is not a "xorg" bug, because all is fine using Intel driver, and also with nvidia driver using mutter.

michal.gregor (michal.gregor) wrote :

Are you sure that it does not happen with mutter? As far as I can see it happens in any type of session – unity, classic, classic with no effects, unity 2D, even if I explicitly call mutter --replace. It is true that it is nvidia-specific though.

It might be interesting to find out whether this issue is present in other distros – Fedora 15 has just been released, perhaps it uses xserver 1.10 and the current nvidia driver.

Yes, with mutter there is no tearing in my configration. Ok, testing with the video linked here I see a very very little tearing on the top of the streen only for 1-2 second after I totem goes full screen, I think it depend by visible gtk widget.

See Ubuntu bug report for more details: https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/600178

There is extremely bad tearing with both nouveau and nvidia proprietary driver. Tearing is present even without using a compositing window manager. The only way I've been able to stop the tearing is to do something like:

Section "Extensions"
 Option "Composite" "Disable"
EndSection

I'm not sure which component is at fault (XGL, composite, nouveau?).

I have tested both nvidia driver and nouveau under unity, classic, and classic (no effects). Changing driver makes no difference. Single or dual display makes no difference.

dack (dack) wrote :

I have tested both nvidia driver and nouveau under unity, classic, and classic (no effects). Changing driver makes no difference. Single or dual display makes no difference. Tearing is less with classic (no effects), but still present. The only thing that solves it for me is disabling the composite extension in xorg.conf.

Seems to me like we have either bugs in both nouveau and nvidia or a bug in xorg somewhere (composite extension? GL libs?).

I've filed a bug report with xorg/nouveau as well: https://bugs.freedesktop.org/show_bug.cgi?id=37681

michal.gregor (michal.gregor) wrote :

For some reason the attached workaround seems to work for some people (see http://ubuntuforums.org/showthread.php?t=1742643&page=4) including me. I do not fancy having the whole screen redrawn on every repaint, but it seems rather interesting that it works.

Also – the solution proposed in comment 41 (https://bugs.launchpad.net/nvidia-drivers-ubuntu/+bug/600178/comments/41) seems to indicate that vsync for OpenGL works even though the one for x-server does not. Unfortunately in dual-screen setup it only affects the main screen (DFP-0), while the secondary screen continues to show tearing.

--- The mentioned workaround ---

Open CompizConfig-settings manager (if you don't find it, just install it from Ubuntu Software Center).

    Enable Workarounds -> Force full screen redrews (buffer swap) on repaint
    Disable Workarounds -> Don't wait for video sync

Open NVIDIA X Server Settings

    Enable X Server XVideo Settings -> Sync to VBlanck
    Enable OpenGL Settings -> Sync to VBlank
    Disable DFP...(name of your screen) -> Force Full Gpu Scaling

Open Startup Applications and add a new program:

    Name: antitearing
    Command: bash -c "sleep 2; compiz --replace"

Reboot

RégisC (regis-caspar) wrote :

Hi guys,

I tested the workaround as stated in #45, but I still see some tearing in windows on my main desktop (seen with chrome for example).

As I wrote here on comment #31 I was able to remove tearing enabling the Force full screen redraws (buffer swap) on repaint, the Sync to Vblank options on nvidia server settings and setting the compiz fusion icon to start at boot with indirect rendering disabled ( I think this works as the compiz --replace comand suggested in the workaround on comment #45). I don't know what side-effects could the "Force full screen redraws (buffer swap) on repaint" option have though.

I just tried the Fedora 15 LiveCD, which also exhibits tearing. With the 2 most popular Desktop distributions exhibiting such a major video issue, I would think this would be getting more attention.

dack (dack) wrote :

I tested again with the latest (275.09.07) proprietary drivers today (compiled on 11.04 from the 11.10 source packages). They exhibit exactly the same tearing problem. None of the usual workarounds solve it completely. The only thing that does work is disabling the composite extension in xorg.conf (which obviously rules out any compiz/unity stuff).

I'm surprised this isn't getting more attention from the Ubuntu/Nouveau/Xorg teams, it's a pretty major issue affecting a lot of people. Does anyone know if other distributions are affected?

dack (dack) wrote :

Just tried the Fedora 15 LiveCD, it also exhibits tearing when playing the test clip from post #38. If the cause is the same, then Ubuntu is not the only distribution affected.

Markus (doits) wrote :

for me this from #45 did the trick:

    Enable Workarounds -> Force full screen redrews (buffer swap) on repaint
    bash -c "sleep 2; compiz --replace"

Triggering the compiz redraw option immediately triggers tearing.

dack (dack) wrote :

Markus - have you tested with the video I posted? If the composite extension is enabled, I get tearing even when compiz is not running. Depending on the video, you may not always see it. That's why I made the test clip.

michal.gregor (michal.gregor) wrote :

I can as well confirm that I do not get tearing with compiz when I enable Force full screen redraws. I've used the video you posted to test – thank you very much for the link by the way.

I first started to experience tearing in 10.10. Although back then once I enabled vsync to be forced for OpenGL the problem disappeared for as long as I used compiz. In the new version of compiz (0.9.x) though, there are obviously some bugs concerning redraws – some regions of the screen often seem not to redraw properly as if they were wrongly marked as unchanged. This issue causes a multitude of problems one of which probably is that the tearing is now visible in OpenGL mode as well. At least the fact that the tearing disappears once we force full screen redraws seems to indicate this...

So I basically think we might be facing two issues here – one in the nvidia driver/x server that causes the tearing in the first place and then another one that now makes it happen in OpenGL mode with vsync enabled as well.

dack (dack) wrote :

I still have not been able to get video without tearing with composite enabled. Can someone who has this working post all of their details?

- compiz settings: unredirect fullscreen, force independant output painting, refresh rate detection, workarounds, etc
- nouveau or nvidia driver? version?
- which video card? single or dual output?
- which video player and output type (xv, opengl, etc)

Gareth Hart (tghe-retford) wrote :

The workaround "Disable DFP...(name of your screen) -> Force Full Gpu Scaling" as mentioned by michael.gregor in post #45 worked for me, but I must add to this bug report that this bug also occurs when using KWin (I use Kubuntu and KDE 4.7 Oneiric), so it's not restricted to Compiz + NVidia.

Gareth Hart (tghe-retford) wrote :

To add to my last comment, screen tearing is apparent using both Chrome and Firefox, in window or full-screen HTML5 and Flash video. So, whilst video played in VLC doesn't tear, it does tear in other applications. So the work-around isn't working for me in some cases.

have been annoyed by this for a while, but #45 fixed it for me, in particular it seems to be the option

Enable Workarounds -> Force full screen redrews (buffer swap) on repaint

in CCSM. Fixed tearing on the desktop and in OpenGL, didn't notice any in videos in the first place.

Changed in kde-workspace (Ubuntu):
status: New → Invalid

I have noticed that in 10.10, having Metacity set to do compositing causes video tearing (tested apps: SMPLayer, XBMC; both using VDPAU) whereas using Compiz does not (once refresh rates and "Sync to VBlank" are set via correctly CCSM and in the X Server settings).

This is on a system with a GT240 and using the proprietary drivers (version: 280.13).

dack (dack) wrote :

The situation has not improved in 11.10. Still massive tearing problems unless you add 'Option "Composite" "Disable"' to xorg.conf. Very sad as all the nice Unity stuff is useless until this bug is fixed. I would be more than happy to work with any developers interested in solving this. I'm just not familiar enough with xorg internals to know how to track it down.

Geert Jan Alsem (gj-alsem) wrote :

Same for me. It just seems that X.org in combination with any kind of hardware acceleration and/or compositing will result in vsync problems, at least on NVIDIA hardware.

I've been testing 11.10 with Unity, GNOME Shell and Xfce (with compositing effects enabled), with different NVIDIA/X.org settings, but I can never get rid of tearing. GNOME Shell does a pretty good job actually, vsync is almost perfect, but there is still a little tearing visible, for example when watching the test video in comment #38.

Here's hoping that Wayland will be the vsync miracle people are saying it will be...

eZFlow (breakdevize) wrote :

All my tearing issues on nvidia are fixed when enabling "force full screen
redraws on repaint" in workarounds section of compizconfig. No need to
disable composite. Ubuntu should have some smart hardware detection and
apply the right tweaks automagically.

On Sun, Oct 16, 2011 at 7:19 PM, Geert Jan Alsem <email address hidden> wrote:

> Same for me. It just seems that X.org in combination with any kind of
> hardware acceleration and/or compositing will result in vsync problems,
> at least on NVIDIA hardware.
>
> I've been testing 11.10 with Unity, GNOME Shell and Xfce (with
> compositing effects enabled), with different NVIDIA/X.org settings, but
> I can never get rid of tearing. GNOME Shell does a pretty good job
> actually, vsync is almost perfect, but there is still a little tearing
> visible, for example when watching the test video in comment #38.
>
> Here's hoping that Wayland will be the vsync miracle people are saying
> it will be...
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/600178
>
> Title:
> Screen tearing when dragging window, in videos and other large screen
> redraws (on nVidia GPU)
>
> Status in Compiz:
> New
> Status in Accelerated Xorg driver for nVidia cards:
> Confirmed
> Status in NVIDIA Drivers Ubuntu:
> New
> Status in Release Notes for Ubuntu:
> New
> Status in “kde-workspace” package in Ubuntu:
> Invalid
> Status in “nvidia-graphics-drivers” package in Ubuntu:
> Confirmed
>
> Bug description:
> I have installed Ubuntu and the latest proprietary graphics drivers on
> my laptop and when I drag a window around the screen or watch a video
> with lots of movement I see screen tearing.
>
> The same problem persists even if I enable "Sync to VBlank" in the
> NVIDIA X Server settings, and with nouveau video driver,
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/compiz/+bug/600178/+subscriptions
>

eZFlow (breakdevize) wrote :

btw. for smoother compiz effects, in opengl plugin disable sync to vblank. Also under composite disable detect refresh rate and set it to 60.

As you can see the default settings are poor and for some reason developers are not improving it.

psarhjinian (psarhjinian) wrote :

@eZFlow: That option didn't help me (QuadroFX 570M). I still get definite tearing. Going without compositing seems to be the only solution. It's gotten better and and worse between versions, but tearing is at an all-time worst in 11.10.

I'd agree with the poster above that Mutter does not have this problem, and it's plainly obvious (in it's absence) in Fedora 15. If I play the attached sample movie it's perfectly smooth in F15, but tears like mad in 11.10.

Tommi Ahonen (tommi-t-ahonen) wrote :

My tearing stopped when I disabled compositing.

I did this by running the following command in the terminal:
sudo nvidia-xconfig -no-composite

After that I rebooted and the tearing was gone.

Matt Pharoah (mr-exuberant) wrote :

I was able to remove almost all screen tearing by doing the following:
Disable flipping (aka. double buffering) in nvidia-settings
Enable vsync in nvidia-settings
Enable 'sync to vblank' in Compiz (under the OpenGL section)
DISABLE 'detect refresh rate' in Compiz (under Compositing section)
Set refresh rate in Compiz to 60Hz (or whatever your monitor's frequency is) (under Compositing section)
DISABLE 'undirect fullscreen windows' in compiz (under Compositing)
Enable legacy fullscreen support in Compiz (under the workarounds section)
DISABLE 'don't wait for video sync' in Compiz workarounds
DISABLE 'force buffer swap on repaint' in Compiz workarounds (it won't change tearing but it will make everything slow)

The 'force synchronization between X and GLX' does not seem to make any difference.

I say it removes "almost" all tearing because there is still screen tearing at the very top of my screen, but never anywhere else. The top 85 lines of my screen still tear quite frequently, but the rest of the screen is fine. I've tried switching between version-current and version-current-updates for my graphics driver, I've tried using X updates from the x-swat ppa, I've tried enabling forced sync between X and GLX, but none of those things seem to make any difference at all.

Still issue on Kubuntu 12.04 with 7200/7300 Go, 8600M GT, 9600 GT, GT 220M, and so on.

z (eye-zak-devel) wrote :

For everyone's benefit, there is away around this (and maybe works with other wms?):
    bash -c "sleep 2; compiz --replace"

put this into /etc/X11/Xsession.d/44x11-nvidia-settings

# This file is sourced by Xsession(5), not executed.
# Setup nvidia settings

NVIDIASETTINGSRC="$HOME/.nvidia-settings-rc"
NVIDIASETTINGS=/usr/bin/nvidia-settings
NVIDIAMODULE="$(grep nvidia /proc/modules | cut -d ' ' -f 1)"

if [ "x$NVIDIAMODULE" == "xnvidia" -a \
     -x "$NVIDIASETTINGS" -a \
     -r "$NVIDIASETTINGSRC" ] ; then
    $NVIDIASETTINGS --config="$NVIDIASETTINGSRC" --load-config-only
fi

michal.gregor (michal.gregor) wrote :

Hmm, that does not seem to work for me. In fact, it fails with this error (copied from ~/.xsession-errors):

Loading X session script /etc/X11/Xsession.d/44x11-nvidia-settings
[: 12: xnvidia: unexpected operator

Any idea what I might be doing wrong?

Rolf Prünte (fumoffu) wrote :

I also had very bad tearing issues in videos using a GeForce 320M on my Macbook Air. Coment #60 fixed this issue for me too. On my desktop machine I have a GeForce 560 Ti which does not require that setting. Until now it has always been sufficient to adjust the sync settings in nvidia-settings and compiz, but it did not work on the 320M.

Setting "Force full screen redrews (buffer swap) on repaint" should definitely be considered a workaround and not a solution, since I read on the ubuntuusers.de-wiki that it requires more powerful hardware. So I guess on a laptop it might have negative effects on battery life.

z (eye-zak-devel) wrote :

michal.gregor:

Sorry, my bad its sh not bash

# This file is sourced by Xsession(5), not executed.
# Setup nvidia settings

NVIDIASETTINGSRC="$HOME/.nvidia-settings-rc"
NVIDIASETTINGS=/usr/bin/nvidia-settings
NVIDIAMODULE="$(grep nvidia /proc/modules | cut -d ' ' -f 1)"

if [ "x$NVIDIAMODULE" = "xnvidia" -a \
     -x "$NVIDIASETTINGS" -a \
     -r "$NVIDIASETTINGSRC" ] ; then
    $NVIDIASETTINGS --config="$NVIDIASETTINGSRC" --load-config-only
fi

Kate Stewart (kate.stewart) wrote :

Is this still being seen in Precise?

michal.gregor (michal.gregor) wrote :

Yes, it is. At least it was when I last checked – a week ago or so.

There is one difference though: when you enable full screen redraws in ccsm, the tearing stops – no additional steps are necessary as far as my experience goes. It does not even seem to be required to force enable vsync for OpenGl in nvidia settings any more.

All in all, not very impressive, but still slightly better than in oneiric, I would say.

Samples:
http://rghost.ru/37220226 - Tearing test 1280x720
http://rghost.ru/37220233 - Tearing test 720x406
http://rghost.ru/37220247 - Tearing test 640x360

Same here on LG S900-U laptop, Nvidia 8600M GT, Kubuntu 12.04, both with nouveau and Nvidia drivers. I hope it gets fixed. it is painful to look at.

Cesar Arguinzones (ceap80) wrote :

Comment #60 does work for me

Enable Workarounds -> Force full screen redrews (buffer swap) on repaint

And is the only thing a need to do!

Nvidia 6200 AGP

Martin Pitt (pitti) wrote :

I added a release note for this.

Changed in ubuntu-release-notes:
status: New → Fix Released
Daniel van Vugt (vanvugt) wrote :

eZFlow, Cesar, if "Force full screen redraws" works for you then you might be interested to subscribe to bug 901097. That bug is where we are planning to make buffer swapping enabled by default (once it can be made to perform better).

Changed in nouveau:
importance: Undecided → Unknown
status: Confirmed → Unknown

Actually it's even worse on my end. Tearing does not go away on nouveau's drivers no matter what I do. Even with compositing completely disabled, opengl video output still tears. The best I can do is enable opengl compositing with compton or something similiar and enable sync to Vblank, but there's still tearing at the top of any fullscreen video even with opengl video output. I'm on Arch with a Nvidia GTX 650. The tearing issue does not happen in the proprietary drivers either. I hope this issue gets more attention as the proprietary drivers have some other problems of their own for me.

Changed in nouveau:
importance: Unknown → High
status: Unknown → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.