Tearing in Unity with Nvidia GTX670 (vsync failure)

Bug #1018105 reported by Lasse Kärkkäinen
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Compiz
Invalid
Undecided
Unassigned
compiz (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Dragging windows around, playing video (vdpau, xv, gl) and OpenGL all suffer of tearing even if the application (or nvidia-settings) has Sync to VBlank (vsync) enabled. A tearing break consistently appears approximately on the same position, about 40 % from the top of the screen. This bug is seen with Nvidia proprietary drivers but googling suggests that it does not depend on the GPU or its driver but that it is actually a design issue with the compositing managers.

Forcing the GPU into performance mode with nvidia-settings makes no difference (with my old GPU this would often solve tearing problems). Toggling full screen mode also doesn't appear to change anything.

Symptoms:
- Application-side (per window) vsync is working fine
   * Window dragging, video playback and OpenGL all behave the same
- Full screen OpenGL works fine
   * Compositing bypassed?
- Compositing fails: compiz attempts syncing but the timing is wrong
   * If it was not syncing at all, the tear lines would "move" randomly
   * The buffer swap should occur during vertical blanking, not during screen refresh

Workarounds:
- Disable compositing (use different WM)

System:
- Ubuntu 12.04 LTS
- Nvidia drivers 295.49
- MSI GTX670
- Compiz 0.9.7.8
- Unity 5.12.0

Revision history for this message
Lasse Kärkkäinen (tronic+mb48) wrote :

Also occurs with other compositing managers and without any (Ubuntu 2D and Gnome Fallback tested). The next guess would be a driver bug. A video of the problem (Ubuntu 2D, video playback on xv, vsync for video enabled in Nvidia Settings): http://www.youtube.com/watch?v=p1kKaKMNRnY

I am pretty sure that this did not occur with GTX460 as I first noticed it shortly after upgrading to GTX670.

Changed in compiz (Ubuntu):
status: New → Opinion
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Yes, there still is some tearing in Ubuntu 12.04. You're not imagining things.

This will be fully fixed when bug 901097 is resolved in compiz 0.9.8 / Ubuntu 12.10.

In the mean time, please check if you have Sync To VBlank enabled in the nvidia-settings control panel.

Changed in compiz-core:
status: New → Confirmed
affects: compiz-core → compiz
Changed in compiz (Ubuntu):
status: Opinion → Confirmed
Changed in compiz:
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
Giannis (karzisss) wrote :

bug #901097 fixed, issue still remain! i have the same tearing on video playback on VLC or browser (flash or HTML5 video) either. Tried every available Nvidia driver (304.48, 310.14 even 319.23) but there is no effect on the problem. On the other hand Team Fortress 2 is working fine with frames cap to 60FPS so OpenGL is not affected by the bug.

Revision history for this message
Lasse Kärkkäinen (ljkarkk2) wrote :

For the record, with Gnome Shell (on Ubuntu 13.04) tearing is fixed by adding this line to /etc/environment:

CLUTTER_PAINT=disable-clipped-redraws:disable-culling

I haven't recently tried if Unity still suffers of tearing.

Revision history for this message
Giannis (karzisss) wrote :

I am using Ubuntu 12.04.2 so the bug exists there.

I haven't tried Ubuntu 13.04 to see if the bug exist but i am not a fan of non LTS versions anymore due to bug #939461

Revision history for this message
Giannis (karzisss) wrote :

#Daniel van Vugt status of the bug?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This should be fully fixed per bug 901097. So fixed in Ubuntu 12.10 and later. Preferably 13.04. The fix was a major one for Compiz so it probably won't be backported to 12.04.

Using 13.04 you might notice some tearing on fullscreen apps. This is to be expected as we have boosted performance for fullscreen apps by disabling Compiz for most of them. This means it's up to the app to do it's own vsync. Or you can force Compiz to retain control of fullscreen windows (and hence avoid tearing) by configuring:
  CCSM > Composite > Unredirect Match

Changed in compiz:
assignee: Daniel van Vugt (vanvugt) → nobody
Revision history for this message
fcole90 (fcole90) wrote :

Thank you for taking the time to report this bug. We have tried to recreate this on the latest release of Ubuntu and cannot reproduce it. This bug is being marked as Invalid. If you believe the problem to still exist in the latest version of Ubuntu please comment on why that is the case and change the bug status to NEW.

Changed in compiz:
status: Confirmed → Invalid
Changed in compiz (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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