nvidia driver shows "magnet distortion"-like screen corruption and tearing, particularly when switching workspaces

Bug #687738 reported by Didier Roche-Tolomelli
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Unity
In Progress
High
Sam Spilsbury
nvidia-graphics-drivers (Ubuntu)
In Progress
High
Alberto Milone
unity (Ubuntu)
In Progress
High
Sam Spilsbury

Bug Description

Binary package hint: compiz

This bug is hard to describe and to record in gtk-recordmydesktop.

The issue seems to be a vsync one, as sometimes, when switching workspace, you get some kind of "magnet" effect, with distortion for less than half a second. We can notice as well some X damage issue not repainted when scrolling fast on a webpage (so part of the page is repeated).

Seems that enabling the force X to sync is the workaround and setting the sync to vblank in nvidia-settings reduces the issue (not completely fixing it so).
With unity using that by default, we should take that into account.

Plan of action:
- see if we can enable sync to vblank by default on nvidia-settings
- in the detection plugin, enable the compiz workaround if the driver is the proprieraty nvidia driver.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: compiz 1:0.9.2.1+glibmainloop2-0ubuntu4
ProcVersionSignature: Ubuntu 2.6.37-8.21-generic 2.6.37-rc4
Uname: Linux 2.6.37-8-generic i686
NonfreeKernelModules: nvidia
Architecture: i386
CompizPlugins: No value set for `/apps/compiz/general/allscreens/options/active_plugins'
Date: Thu Dec 9 10:31:55 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100918)
MachineType: Dell Inc. MP061
PackageArchitecture: all
PciDisplay: 01:00.0 VGA compatible controller [0300]: nVidia Corporation G71 [GeForce Go 7900 GS] [10de:0298] (rev a1) (prog-if 00 [VGA controller])
ProcEnviron:
 PATH=(custom, user)
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.37-8-generic root=UUID=4b292599-da9a-4cb5-908f-a911be09c61a ro quiet splash nomodeset video=uvesafb:mode_option=1280x1024-24,mtrr=3,scroll=ywrap
RelatedPackageVersions:
 xserver-xorg 1:7.5+6ubuntu3b1
 libgl1-mesa-glx 7.9+repack-1ubuntu3
 libdrm2 2.4.22-2ubuntu1
 xserver-xorg-video-intel 2:2.13.901-2ubuntu1
 xserver-xorg-video-ati 1:6.13.2-1ubuntu2
SourcePackage: compiz
dmi.bios.date: 04/02/2007
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A08
dmi.board.name: 0YD479
dmi.board.vendor: Dell Inc.
dmi.chassis.type: 8
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA08:bd04/02/2007:svnDellInc.:pnMP061:pvr:rvnDellInc.:rn0YD479:rvr:cvnDellInc.:ct8:cvr:
dmi.product.name: MP061
dmi.sys.vendor: Dell Inc.
system: distro = Ubuntu, architecture = i686, kernel = 2.6.37-8-generic

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :
Changed in compiz (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Sam "SmSpillaz" Spilsbury (smspillaz)
Revision history for this message
Bryce Harrington (bryce) wrote :

Hmm, switching on vblank syncing has had unforeseen side effects when we've done that in other drivers. When it's not already set as the default by upstream, it makes me suspect that it's that way for good reasons... Since you find this doesn't fully mitigate the issue, I'd be tempted to nak and investigate a better solution.

@Alberto, what are your thoughts?

Bryce Harrington (bryce)
description: updated
Changed in nvidia-settings (Ubuntu):
assignee: nobody → Alberto Milone (albertomilone)
Revision history for this message
Bryce Harrington (bryce) wrote :

Didier, are you still reproducing this issue with latest bits? If so, is it on a machine you can show us during the sprint?

Changed in nvidia-settings (Ubuntu):
status: New → Incomplete
Revision history for this message
Travis Watkins (amaranth) wrote :

Last time I tried sync to vblank with the nvidia driver I could no longer resume from suspend (although that was some time ago (and I no longer have that hardware). I don't think we should enable it by default.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Bryce, yes, it's still the case. The effect is still really random and we will have to wait a little (sometimes even not without touching the keyboard). My device is a 17' laptop but I can bring it during the sprint.

Revision history for this message
Bryce Harrington (bryce) wrote :

Ok yeah I think I tend to agree with Travis. Let's set vblank syncing aside, at least until upstream is confident enough to set it as the default. Instead lets troubleshoot the bug with the laptop to see if there's some other solution.

Didier, catch me and Chris and maybe Alberto to take a look at this next week. I don't know that we'd be able to solve it but maybe at least come up with a plan of attack or something.

summary: - nvidia driver seems to have sync to vblank issue
+ nvidia driver shows "magnet distortion"-like screen corruption and
+ tearing when switching workspaces
Revision history for this message
Bryce Harrington (bryce) wrote : Re: nvidia driver shows "magnet distortion"-like screen corruption and tearing when switching workspaces

We met with Didier and looked at his laptop during the rally. Here's the plan of attack:
  * Reproduce issue with classic desktop, to establish it's not unity-specific [Didier]
  * Test if changing versions of -nvidia makes issue go away [Didier]
  * Investigate other nvidia bug reports to see if anyone else is seeing this same issue [Bryce]
  * Raise issue with nvidia [Bryce/Alberto]

Revision history for this message
Bryce Harrington (bryce) wrote :

[Moving from nvidia-settings to nvidia-graphics-drivers since we aren't looking to turn on vblanking, but want to troubleshoot the underlying issue.]

affects: nvidia-settings (Ubuntu) → nvidia-graphics-drivers (Ubuntu)
Changed in nvidia-graphics-drivers (Ubuntu):
status: Incomplete → Triaged
importance: Undecided → High
tags: added: compiz-0.9
David Barth (dbarth)
tags: added: driver unity
Changed in compiz (Ubuntu):
assignee: Sam "SmSpillaz" Spilsbury (smspillaz) → Didier Roche (didrocks)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@David: I think it's more a Sam thing :)

Changed in compiz (Ubuntu):
assignee: Didier Roche (didrocks) → Sam "SmSpillaz" Spilsbury (smspillaz)
Revision history for this message
Travis Watkins (amaranth) wrote :

Specifically, the part about enabling force_glx_sync when nvidia hardware is detected. Although there is really no reason to not do this for everyone, it's only a small (possible) performance hit. I initially had a patch for 0.8 that did that just before the option was added to the workaround plugin.

Revision history for this message
Bryce Harrington (bryce) wrote :

Fwiw, I did browse cursorily through other existing nvidia bug reports but didn't spot one matching this one. So once Didier has completed his testing, next step is to notify NVIDIA about this.

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

So, I finally found which compiz plugin was doing that… It's the unity one. I have no issue in the classic session with exactly the same settings apart from unity loaded.

affects: compiz (Ubuntu) → unity (Ubuntu)
Changed in unity:
status: New → Triaged
importance: Undecided → High
summary: nvidia driver shows "magnet distortion"-like screen corruption and
- tearing when switching workspaces
+ tearing, particularly when switching workspaces
Changed in unity:
assignee: nobody → Sam "SmSpillaz" Spilsbury (smspillaz)
Revision history for this message
Bryce Harrington (bryce) wrote :

Didier, aha interesting. So the next question is if it is a coding error in the unity plugin, or a fault in the driver that unity simply exercises. We probably should rule out a coding error first, before bothering NVIDIA about it, or gain a better understanding of what in the driver is causing the trouble.

The next step might be to try to narrow down to a test case, such as a stripped down unity with just the code present that leads to the bug.

Revision history for this message
Bryce Harrington (bryce) wrote :

Didier, have you tried enabling force_glx_sync as Travis suggested? Maybe that gives a clue as to what functionality is bugged here?

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@Bryce, yeah, that's one of the first sync I've done in December, with no result.

So Sam really think there is something in nux making the refresh out of sync (and maybe related now to the other bug with the black screen), I'll subscribe jay to it as well.

Changed in unity:
status: Triaged → Fix Committed
Changed in nvidia-graphics-drivers (Ubuntu):
status: Triaged → Fix Released
Changed in unity (Ubuntu):
status: Triaged → Fix Released
status: Fix Released → In Progress
Changed in unity:
status: Fix Committed → Fix Released
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Apparently this isn't fixed yet. Reverted.

Changed in unity:
status: Fix Released → In Progress
Changed in nvidia-graphics-drivers (Ubuntu):
status: Fix Released → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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