Screen tearing in 11.10 with intel graphics
Solution 1
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:
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
Solution 2
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).
Related videos on Youtube
Niklas
Updated on September 18, 2022Comments
-
Niklas almost 2 years
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):
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.
-
Niklas over 12 yearsThank 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 over 12 yearsThis got it to work in Unity! I just hope that someone brings a long a good solution for GNOME-Shell...
-
htorque over 12 yearsHi! If you found that answer helpful, you can mark it as "accepted" by clicking on the checkmark icon left to it. :)
-
Niklas over 12 yearsSorry, 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 over 12 yearsA 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 over 12 yearsThe above workaround was reported in the upstream bug report.
-
Kim over 10 yearsExcellent. One note on my Ivy Bridge laptop (Intel® Core™ i5-3210M CPU @ 2.50GHz × 4) running Ubuntu 13.10. Only 'Force full screen redraws (buffer swap) on repaint' was required to remove the tearing problem in my case.