You are not logged in.

#1 2011-11-08 22:58:24

fiinix
Member
Registered: 2009-12-07
Posts: 75

[solved] video tearing on intel sandy bridge

hi folks,

i need your help. this is really strange: i have a new laptop with nice hardware and everything works perfectly except videos: there is annoying tearing each time some movement happens in the picture. (no extreme tearing, but still annoying.) i had that on my netbook too, but this time it can't be slow hardware.

the problem is always the same, no matter what i try:
os / architecture: arch 32bit, arch 64bit, ubuntu 64bit, xubuntu 32bit
arch kernel: linux 3.0.7-1, linux-bfs 3.1-414
display driver: xf86-video-intel (2.16.0-1), xf86-video-intel-git (day before yesterday)
video player: vlc, totem, gnome-mplayer (tried alle the different video outputs like xv, gl, vaapi, etc.)
de: gnome 3, unity (ubuntu), gnome 3 fallback, xfce (xubuntu)
videos: normal xvid, full hd, dvd - each in window mode and fullscreen
display: full hd display (hdmi), laptop display
kernel commands: pcie_aspm=force, i915.i915_enable_fbc=1, i915.i915_enable_rc6=1, init=/bin/systemd (not each combined with each, but... would that be promising?)
glxgears looks fine (60fps)
glxinfo says direct rendering: yes

software is all the latest non-testing arch stuff. xorg-server 1.11.1.902-1, mesa 7.11-4, gnome-shell 3.2.1-1

hope i didn't forget anything. and i hope i oversaw something^^ are there maybe any options for xorg.conf? didn't find anything about this in the wiki...

this really creeps me out, because i love to watch movies and i have a brand new notebook:

dell vostro v131, core i3-2330 (2.2ghz), sandy bridge, gma hd 3000 graphics, 4gb ddr3, ext4 filesystem

and really strange: the tearing in fullhd videos is the same like in windowed xvid-videos with much smaller resolution. so definitely no performance issue. desktop effects work fine too (where applicable).

any thoughts on this one? there have to be other people with gma hd 3000 watching videos - is it working without tears for you? any comment on this would be much appreciated!

thanks!


p.s.: wtf?!?!? latest intel graphics and no simple video watching?? c'mon

Last edited by fiinix (2011-12-15 01:36:12)

Offline

#2 2011-11-09 00:04:07

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: [solved] video tearing on intel sandy bridge

Disabling compositing or enabling sync to vblank in your compositor options could help.

Offline

#3 2011-11-09 01:45:38

fiinix
Member
Registered: 2009-12-07
Posts: 75

Re: [solved] video tearing on intel sandy bridge

ok, i tried the following options in xorg.conf:

       Option "XvPreferOverlay" "false"
       Option "Tiling" "false"
       Option "XvMC" "true"
       Option "Shadow" "true"
       Option "DRI" "false"
       Option "SwapbuffersWait" "false"

each time one of them uncommented... nothing helped. with dri off there was definitely no compositing and i installed openbox, but playback wasn't clean nice either.

how can i turn compositing off while keeping dri on? how do i enable sync to vblank in my compositor options and/or where are those in gnome 3 (or in openbox)? couldn't find anything about it...

Offline

#4 2011-11-09 01:57:23

Jodell
Member
Registered: 2009-10-09
Posts: 285

Re: [solved] video tearing on intel sandy bridge

Vsync is automatically enabled by the intel driver.

I'm also experiencing tearing while watching videos and playing games. I just live with it, but I'll be monitoring this thread as it is relevant to my interests.

Offline

#5 2011-11-09 02:31:29

jackgu1988
Member
Registered: 2010-11-16
Posts: 39

Re: [solved] video tearing on intel sandy bridge

same problem over here. same card but i7 @2.7

Offline

#6 2011-11-09 03:15:14

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [solved] video tearing on intel sandy bridge

You probably want this installed:
extra/libva-driver-intel 1.0.15-1
    VA-API implementation for Intel G45 chipsets and Intel HD Graphics for Intel
    Core processor family.

Nevertheless, vlc and other players do not necessarily use vaapi from libva successfully.  I've discovered that vlc crashes after installing the above with a segmentation fault from the ffmpeg video codec when hardware acceleration is selected with ffmpeg in vlc.  There is a vlc for slacklinux that is patched for this.  Haven't tried installing that in arch.

http://alien.slackbook.org/blog/decodin … eo-in-vlc/

EDIT:  BTW, I don't have tearing using vlc in Fedora 15 Gnome with this laptop.  I do have tearing in Arch and Mageia.

Last edited by David Batson (2011-11-09 03:16:37)

Offline

#7 2011-11-09 03:44:03

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: [solved] video tearing on intel sandy bridge

For me on a Core i3 550 (not sandy bridge...) I don't get tearing as long as I don't enable Xfwm's compositor. I know that compiz has a sync to vblank option, but I don't know anything about Gnome 3 etc.

Offline

#8 2011-11-09 09:46:33

jackgu1988
Member
Registered: 2010-11-16
Posts: 39

Re: [solved] video tearing on intel sandy bridge

David Batson wrote:

You probably want this installed:
extra/libva-driver-intel 1.0.15-1
    VA-API implementation for Intel G45 chipsets and Intel HD Graphics for Intel
    Core processor family.

Nevertheless, vlc and other players do not necessarily use vaapi from libva successfully.  I've discovered that vlc crashes after installing the above with a segmentation fault from the ffmpeg video codec when hardware acceleration is selected with ffmpeg in vlc.  There is a vlc for slacklinux that is patched for this.  Haven't tried installing that in arch.

http://alien.slackbook.org/blog/decodin … eo-in-vlc/

EDIT:  BTW, I don't have tearing using vlc in Fedora 15 Gnome with this laptop.  I do have tearing in Arch and Mageia.

Thank you! It really helped! Problem not 100% solved, but much much better now!

Offline

#9 2011-11-09 23:16:31

fiinix
Member
Registered: 2009-12-07
Posts: 75

Re: [solved] video tearing on intel sandy bridge

thanks for all your help. good to know that i'm not the only one with that problem...

@jackgu1988: what exactly did the trick for you? did you get that patched vlc to run, install fedora 15 or was it the libva-intel-driver?

extra/libva-driver-intel 1.0.15-1 didn't change a thing here. is there a way to ensure it's being used successfully?
i tried fedora 16 - wow, how i love arch for being simple smile same problem over there. anyone suggesting i should try fedora 15? could that really help? well... probably gonna do it -.-

if the intel driver automatically activates vsync... how come the picture isn't vsynced then? any way to mess around with that?

Offline

#10 2011-11-10 11:57:25

jackgu1988
Member
Registered: 2010-11-16
Posts: 39

Re: [solved] video tearing on intel sandy bridge

@fiinix I think that the problem is not 100% fixed, but before libva-driver-intel I used to get it much more often. It may be the video where I tested it on. I read somewhere that adding on the kernel line of /boot/grub/menu.lst i915.i915_enable_rc6=0 fixes the problem, but I have not tested it yet. Even if it does the trick, it consumes more battery so I would not want that hmm

Maybe copy paste the menu.lst record and make an option with rc6=0 for movies and another with rc6=1 for normal use.

Offline

#11 2011-11-10 12:30:35

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [solved] video tearing on intel sandy bridge

I was checking in Fedora 15 Gnome (I use Gnome Classic with Compiz instead of the Gnome 3 shell) and see that vlc crashes with ffmpeg hardware decoding there as well.

At the moment, I do not understand why vlc will play the identical mp4 video file in fedora without tearing, but not in Arch or Mageia on the same laptop.

When I first installed libva on Fedora some months ago I use 'Xorg -configure' to create an /etc/X11/xorg.conf file as per a guide I read.  See following: http://fedoraproject.org/wiki/How_to_create_xorg.conf  I tried the same in Mageia, but it didn't make any difference with video tearing.  I have not tried to do this in Arch.  According to vainfo, libva is working in Arch - at least I believe so.  I think the problem lies elsewhere (vlc, kernel, other).

Offline

#12 2011-11-10 15:11:02

sitquietly
Member
From: On the Wolf River
Registered: 2010-07-12
Posts: 219

Re: [solved] video tearing on intel sandy bridge

I've seen some tearing on an i5 sb / HD3000 system. It seldom occurs, but with some movies the tearing is perceptible every few minutes. I found that I can completely avoid the problem by encoding movies to a fixed framerate before viewing them. I use handbrake and encode to x264 at fixed 24.0 or 29.97 fps.

If I set handbrake to encode to constant quality of 16.5 then it encodes at about 50 fps and I can watch the output file while it is being created. As you say, there is plenty of performance on this system.

Offline

#13 2011-11-10 18:26:49

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [solved] video tearing on intel sandy bridge

Just a possibility; in Fedora I am using Compiz.  Perhaps Compiz (or Metacity) is the solution - weird as it sounds.

http://www.thinkwiki.org/wiki/Intel_Gra … 950#Issues

https://bbs.archlinux.org/viewtopic.php … 23#p984023

http://ubuntuforums.org/showthread.php?t=1645908

Offline

#14 2011-11-11 00:55:51

jackgu1988
Member
Registered: 2010-11-16
Posts: 39

Re: [solved] video tearing on intel sandy bridge

Any ideas for KDE? Kwin is not the problem.

Offline

#15 2011-11-13 00:21:41

fiinix
Member
Registered: 2009-12-07
Posts: 75

Re: [solved] video tearing on intel sandy bridge

I tried those:

  • i915.i915_enable_rc6=0 added to the kernel line in grub. doesn't help. even if it would cut my battery time in half i think i wouldn't care right now.

  • using handbrake with constant fps of 24 didn't help here either, although its a pretty nice idea. but what a pain^^ my fan gets really noisy while encoding sad

  • i have no nvidia graphics, but tried ccsm anyway, didn't help.

  • option triplebuffer true in xorg.conf did something (although i am not totally 100%, that it was that): videos stutter instead of showing tears, if i use video output GL. somewhat of a progress...

  • vsync in compiz or no composite in xfce seems to fix this for a lot of people, but not for me. tried openbox started by lightdm (to not load anything gnomey or 3d/compiz-like) and its the same there

  • ah yeah, i also tried the intel driver version 2.16.901 aka 2.17 rc1 in ubuntu (don't know how to install it here on arch) - nothing changed either. maybe the full version changes this, but i don't have much hope there.

keep in mind that flash videos have the same problem, so the video player or video output don't seem very likely to be causing this.

right now i am so sad, that i actually think about turning back to a dual boot with windows (after about 4 good years) ... just because my high end laptop can't even play a f**kin video like it should. but damn... windows is so exhausting... i didn't check if it worked in windows, but i assume it does =.....(

has anyone else any more experiences to share? any dell vostro v131 or at least hd 3000 maybe....?

EDIT: kde didn't help either and the handbrake-trick didn't work here for any framerate (didn't try smaller than 23.976 fps though)

Last edited by fiinix (2011-11-13 00:25:37)

Offline

#16 2011-11-13 03:28:52

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [solved] video tearing on intel sandy bridge

On my Lenovo ThinkPad X220 I got the video tearing to cease in Arch Xfce.  The solution is Compiz, and maybe a little more.  I had already installed libva-driver-intel 1.0.15-1 mentioned previously.

Admittedly I kind of used the shotgun approach.  I do not think all I did was necessary to achieve success.  I put it all out here for you to see and to help you choose your approach.

I Installed the following compiz packages (no doubt, not all are necessary).
ccsm 0.8.4-2
compiz-bcop 0.8.8-1
compizconfig-backend-gconf
compizconfig-python 0.8.4-2
compiz-core 0.8.8-2
compiz-fusion-plugins-extra 0.8.8-1
compiz-fusion-plugins-main 0.8.8-1
emerald 0.8.8-1
emerald-themes 0.6.0-3
fusion-icon 20101021-1
libcompizconfig 0.8.8-1

Without X running I ran # Xorg -configure
I copied /xorg.conf.new to /etc/X11/xorg.conf
# cp /xorg.conf.new /etc/X11/xorg.conf

I added sections from my Fedora xorg.conf to Arch's xorg.conf (I tried using fedora's xorg.conf directly but X wouldn't start).
Here is how arch created xorg.conf.new: http://pastebin.com/6PfaxE6G
Here is the modified xorg.conf I used with bits from my fedora xorg.conf: http://pastebin.com/379unG7Z

Reboot (or maybe just log out/log in).

The only compiz settings I changed from default are:  I am using Desktop > 'Desktop Cube', Rotate Cube'; Effects > 'Window Decoration', 'Wobbly Windows'; 'Workarounds' > "OpenOffice.org Menu Fix", "Java Window Fix", "QT Window Fix", AIGLX Fragment Parameter Fix", "Force synchronization between X and GLX".

I don't really know much about Compiz - only played with it a little.  At first Compiz didn't seem to make a difference, but I noticed that I wasn't getting the cube.  For Xfce, go to Applications Menu > System > and launch Compiz Fusion Icon.  A right click on the Compiz Fusion Icon (next to the time) in the upper right corner opens up the dropdown menu.  Choose: Select Window Manager > Compiz.  You probably need to right click on the icon again and choose: Reload Window Manager.  Now you should see 4 icons (next to the time) of 4 desktop workspaces.  FYI, clicking on one of those icons changes to a different desktop workspace.

Try and see if your video tearing is gone.

EDIT:  Like I said, I don't know Compiz all that well.  In Compiz Settings Manager I Found I needed to select in Window Management: 'Move Window' and 'Resize Window' to be able to drag a window and resize it.  Probably other options I will find I need as well.

Last edited by David Batson (2011-11-13 04:20:36)

Offline

#17 2011-11-13 03:33:31

jackgu1988
Member
Registered: 2010-11-16
Posts: 39

Re: [solved] video tearing on intel sandy bridge

@fiinix ok it is not that bad, no reason to turn to windows just for that (at least for me). Sandy bridge drivers are not perfect yet, but I can always remember having this issue on linux, even with nvidia cards. I didn't bother checking for a fix before, but hey! it's open source, someone should come up with a fix sooner or later smile

Offline

#18 2011-11-13 03:58:09

jackgu1988
Member
Registered: 2010-11-16
Posts: 39

Re: [solved] video tearing on intel sandy bridge

@fiinix yeyyy! I think I found the solution (if you like vlc). Update to the new version that just came out. By default tearing is noticeably reduced, but to remove it 100% try going to tools -> preferences -> input and codecs -> use gpu acceleration. May require restarting the program, but now it looks just as it should for me!

Edit: Also, @David Batson, you do not need to enable compositing in your xorg.conf. It is enabled by default smile https://wiki.archlinux.org/index.php/Composite

Last edited by jackgu1988 (2011-11-13 11:00:53)

Offline

#19 2011-11-13 13:15:50

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [solved] video tearing on intel sandy bridge

Thanks for the info regarding compositing in the xorg.conf file.  Like I said, I kinda used the shotgun approach.  I was just trying to make everything as close to my Fedora installation as possible, to hopefully have success in a short time in Arch.

Just now I saw a couple of interesting statements on Intel's site regarding graphics in Linux with the Intel drivers.

Intel wrote:

Question: Does the driver support the Xv extensions?

Answer

To better support the Composite extension, the Intel graphics driver supports --for i915 and later-- textured video which uses the 3D hardware to paint the video directly to the frame buffer instead of using an overlay. This means there's no funny 'blue' image caused by the color key, and it means you can capture video frames with normal X tools.

Question: How to play media with VAAPI?

Answer

VAAPI is supported on G45/GM45 platforms and later. Make sure you have:
1. Intel video driver package. The latest stable release is recommended.
2. The media player supports VAAPI. e.g. if you want to use mplayer, you need compile and install the mplayer source package with  the mplayer vaapi patches.
3. libva driver git://git.freedesktop.org/git/libva, need to compile and install.

http://intellinuxgraphics.org/documentation.html

Offline

#20 2011-11-13 13:35:39

jackgu1988
Member
Registered: 2010-11-16
Posts: 39

Re: [solved] video tearing on intel sandy bridge

@David Batson np smile

Now the problem is, I've got all the requirements, even did the xorg.conf configuration and it is the same as David's but with 1 monitor and tearing is still there if not using vlc with gpu acceleration. I have not rebooted yet, though I restarted X, but I assume that xorg.conf is being read when X starts and not when the computer boots, so I am not hoping a reboot to fix the problem. I will give it a try when I'm done with my work just in case.

Is there any possibility that compiz is what fixes the issue? I m on KDE and prefer kwin to compiz, as it is native.

Offline

#21 2011-11-13 15:30:28

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [solved] video tearing on intel sandy bridge

One item I copied from the Fedora xorg.conf to the Arch xorg.conf was:

Section "ServerFlags"
	Option	    "AIGLX" "on"
EndSection
Wikipedia wrote:

Accelerated Indirect GLX ("AIGLX") is an open source project founded by Red Hat and the Fedora community, led by Kristian Høgsberg,[1] to allow accelerated indirect GLX rendering capabilities to the X.Org Server and DRI drivers. This allows remote X clients to get fully hardware accelerated rendering over the GLX protocol; coincidentally, this development was required for OpenGL compositing window managers (such as KWin or Compiz) to function with hardware acceleration.
------------
Accelerating the indirect OpenGL path is orthogonal to how the X server itself is implemented, but it has the side effect of allowing the OpenGL command stream to be more easily captured and redirected to a texture. This allows Compiz and other compositing window managers to be built on top of a traditional server with a small GLX extension rather than requiring a full Xgl server. Another advantage is that DRI bypasses the compositing engine, while with AIGLX everything is allowed to be both accelerated and composited.

http://en.wikipedia.org/wiki/Aiglx

https://wiki.archlinux.org/index.php/AIGLX

Offline

#22 2011-11-13 18:30:16

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: [solved] video tearing on intel sandy bridge

Just tried using kwin in Mageia 1 KDE, but I still had some tearing.  I recreated the xorg.conf file and copied the AIGLX section over, but still there was some tearing.  Next I installed Compiz and found that tearing could be eliminated.

At first I had tearing using Compiz even though (some) desktop effects appeared to be working.  But when I tried the cube it wouldn't work.  I ran compiz-fusion --replace in terminal and then the cube worked.  Now I do not have any tearing when watching a video in VLC.

Offline

#23 2011-11-13 23:33:58

jackgu1988
Member
Registered: 2010-11-16
Posts: 39

Re: [solved] video tearing on intel sandy bridge

damn! I watched a whole movie on vlc and there was some tearing even with accelerated graphics. It was much-much better compared to non-accelerated graphics, but still not perfect. Argh I would love to avoid using compiz on kde sad

Offline

#24 2011-11-14 09:40:35

masteryod
Member
Registered: 2010-05-19
Posts: 433

Re: [solved] video tearing on intel sandy bridge

!SANDY BRIDGE USERS! (who are using build-in graphic for watching movies) you really should read this:

http://www.anandtech.com/show/4083/the- … 0-tested/7

PS to be sure if its 24fps bug or just OS misconfiguration you probably need to run Windows and compare video output

Last edited by masteryod (2011-11-14 09:44:37)

Offline

#25 2011-11-14 12:30:55

fiinix
Member
Registered: 2009-12-07
Posts: 75

Re: [solved] video tearing on intel sandy bridge

@compiz: on my to do list - gotta get a completely new desktop environment, for i don't think that gnome 3 should interfere if i want a promising result.

@masteryod: thanks for that. i just don't get how the cpu knows what kind of data is being used (video in this case) unless the software tells it this way. in that case, there must be a software solution to this. anyway: if i understand the article correctly, this problem affects only videos which are 23.xyz fps - but i also have tearing playing handbrake-recoded videos on 24fps.

but this sandy bridge bug would explain, how the intel gma hd graphics plays videos perfectly well (saw it on a thinkpad edge 15 running ubuntu)

@jackgu1988: the latest vlc version looked promising, but didn't solve it for me either. i will try one more thing there (combination with xorg.conf-setting, which transformed tears into stuttering - that might now stop). - vlc is nice, being limited to it wouldn't mean much harm to me.

and you are right: considering to switch back to windows is of cause just my kind of crying out loud and giving up on life wink installing software and getting it updated is so very unpleasant but still a reasonable thing to do. and the desktop environment... i would miss my gnome 3 too much - who needs a panel showing open windows??? wink

apropos giving up (kinda off topic): since my dell vostro v131 also has the problem of being too noisy, i'm gonna give it back. i was thinking about getting another sandy bridge laptop (latest technology lasts longest) but now i'm not so sure anymore... the alternative is to wait until ivy bridge and until then use my netbook. i'd probably be back then opening a new topic called "video tearing on intel ivy bridge" wink

i really don't wanna just give up on this, but i won't be able to resume searching for a solution as of in a few days. sorry guys.

do i see this right, that no one with sandy bridge graphics (hd 3000) has video playack without tearing except people using compiz?

Offline

Board footer

Powered by FluxBB