Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a slight screen tearing when watching videos in Ubuntu 11.10 x64, really annoying. Both in Unity and GNOME-Shell. Please focus the answer to GS since it's my primary DE and it's where I want it to work.

This is what I use:

  • OpenGL vendor string: Tungsten Graphics, Inc
  • OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile
  • OpenGL version string: 2.1 Mesa 7.11
  • OpenGL shading language version string: 1.20
  • OpenGL extensions:

I guess it's because I can't get the screen to sync vertically but I don't know how to fix it. I found a thread talking about driconf and I've set the settings there to "always sync vertically". What can I do more to get this fixed?

Please help, any answer is welcome :) it would suck if I can't watch videos comfortably on my new laptop.

Update:

I thought it might have something to do with the screen refresh rate so I tried to change that manually. I found an online documentation for my laptop (DELL LATITUDE E5420):

http://support.dell.com/support/edocs/systems/late5520/en/SM_EN/GUID-89CF3778-9361-4F01-A0A4-1D257AE39CAD.html

There I found that the screen refresh rate was 60 Hz but I don't know how to change that manually in GNOME-Shell, so I tried changing the compiz settings in Unity to see if there was any difference. I still had the issue but I think it was not as severe, it's hard to tell.

Update 2:

The problem exists also in Unity 2D and Gnome-classic. So this problem is perhaps restricted to a display setting or driver problem?

Update 3:

The solution for GNOME-Shell is in the comments to the accepted answer.

share|improve this question

closed as off-topic by Seth, qbi, Eric Carvalho, Braiam, Anwar Shah Oct 18 '13 at 5:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Bug reports and problems with the development version of Ubuntu should be reported on Launchpad so that developers can see, track and fix these issues." – Seth, qbi, Eric Carvalho, Braiam, Anwar Shah
If this question can be reworded to fit the rules in the help center, please edit the question.

    
This question is about a bug that got fixed in later releases. The workaround might not be needed anymore or any "new" answer is not valid (since nobody should use 11.10... I think). If anyone is experiencing this problem please, open a bug report since this is not a expected behavior. –  Braiam Oct 16 '13 at 20:04

2 Answers 2

up vote 15 down vote accepted
+50

This is a bug with Intel Sandy Bridge graphics.

Unity

A workaround for Unity (or Unity 2D with Compiz) is to enable the options Force full screen redraws (buffer swap) on repaint and maybe also Don't wait for video sync in the Workarounds section of CompizConfig Settings Manager:

enter image description here

GNOME Shell

In GNOME Shell, you can work around the bug by setting the CLUTTER_PAINT environment variable in /etc/environment:

CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True
share|improve this answer
    
This got it to work in Unity! I just hope that someone brings a long a good solution for GNOME-Shell... –  Niklas Nov 7 '11 at 20:04
    
Hi! If you found that answer helpful, you can mark it as "accepted" by clicking on the checkmark icon left to it. :) –  htorque Nov 11 '11 at 22:52
    
Sorry, I was hoping for someone with a solution for GNOME-Shell to come by but after reading the bug comments I realized that there was no fix yet (though for some it helped to change the video output to opengl). So I forgot to change the status here :) thanks for your detailed answer! –  Niklas Nov 13 '11 at 12:02
    
A workaround has been found in GNOME-Shell! For me it worked by editing the file /etc/environment and add the line: CLUTTER_PAINT=disable-clipped-redraws:disable-culling –  Niklas Dec 5 '11 at 8:08
    
The above workaround was reported in the upstream bug report. –  Niklas Dec 5 '11 at 8:09

I've got an older Intel chipset (G965) but the same problem. The only way I got it working 100% "right" is by using Video Overlay. The disadvantage of that is that it doesn't work correctly with 3D effects and compositing. I don't know if Video Overlay is still supported on Sandy Bridge. If it is, this is how to use it.

Use xvinfo to get a detailed description of all XVideo Adaptors. In my case there are two, "Intel(R) Textured Video" and "Intel(R) Video Overlay". The second one works for me and the output of xvinfo looks like this:

  Adaptor #1: "Intel(R) Video Overlay"
    number of ports: 1
    port base: 93
    operations supported: PutImage 

What you're looking for is the port number, in this case 93.

In order to use this in mplayer, either start it with mplayer -vo xv:port=93 or put something like this in your $HOME/.mplayer/config:

[default]
vo=xv:port=93

Setting xv:adaptor=1 might also work.

For xine there's a config setting video.device.xv_port that can be set in $HOME/.xine/config.

GStreamer has a property device for xvimagesink but I don't know how to set it. (I'm using only mplayer).

share|improve this answer
    
Thank you for your detailed answer, though it doesn't really work for me since I use Gstreamer and it doesn't solve these problems when watching Flash video. Though I believe it can help someone else :) –  Niklas Nov 7 '11 at 20:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.