My Dell XPS 13 laptop (Sandy Bridge) was suffering from video tearing. I was able to fix it but it took many hours of research and trial and error so I thought I'd put everything into a post here. There seemed to be a lot of people frustrated with this issue.

I emerged xf86-video-intel-2.20.3, enabled the sna USE flag, and added the following options to xorg.conf:

Option "AccelMethod" "sna"
Option "TearFree" "true"

I also enabled the vaapi USE flag but I don't think that made a difference. Now there is no tearing even with the xfce4 compositor enabled.

I did find one problem. If I close my laptop's lid for a few moments, it comes back up into the locked screen when I open it again. If I close it for a few minutes, it comes back up black and after 30-60 seconds it goes to the login manager. I can't find anything good in the logs but I recently switched to syslog-ng from metalog and I'm not familiar with it. Does anyone know where I should look for more info on this? I tested and this only happens if I have both AccelMethod and TearFree in xorg.conf.

On my Lenovo x220 (i3, sandy bridge, with the 2.20.3 driver) the tearfree option destroys my ability to watch videos - tested with xbmc and vlc. They turn into a horrendous, laggy mess. There's no tearing, sure, but they are completely unwatchable. The desktop is less responsive too with tearfree enabled.

With sna enabled and tearfree off, vlc crashes my video output completely to the point where X has locked up hard and I need to hold down the power button to turn the laptop off.

I think I'll stick with 2.19 and -sna for now...besides, xbmc does a good job of playing tear-free video on its own. The other solution to getting tear free video without resorting to this new driver and its tearfree option is to use an opengl compositor: mutter (gnome 3), kwin (KDE4) or compiz, and enable vsync in the window manager's settings.

CORRECTION: Tearfree doesn't actually eliminate vsync issues when enabled. It adds lag and doesn't fix anything. I wonder what's going on? I was able to fix the X crashing issues by adding

I wonder if it has to do with my particular display? I don't have a TN screen in this laptop like most laptops have, and TN's are faster.
Do any of you have any special boot parameters for the video driver?
For the record, I'm using GNOME 2.32 with plain old metacity, so wm slowness shouldn't be that much of an issue...
Could any of you post the "device" section from your xorg config file(s)?

In the meantime, I'm going to try this with several different external monitors to see if it makes any difference.

Enabling sna and tearfree does get me tear-free vaapi-accelerated video, but I MUST use some sort of compositor (xcompmgr, compton, compiz, kwin, etc) or I get horrible, horrible lag with the video. As long as the compositor is enabled, the desktop is fairly responsive as well. Both twm and compositor-less metacity performed horribly when it came to video playback.

Unfortunately, tearfree causes little hiccups in gaming applications. In openarena, there are frequent, very short pauses. In snes9x, these pauses are more severe and they cause the audio to pause as well.

so, in short, tearfree works well but it may seriously hinder games on your machine, AND it may be unusable without a compositor.

Another note on my lid problem. It disappears if I issue 'xset -dpms'. This can be done in xorg.conf in the Device section:

Option "DPMS" "false"

If you run into this, watch out for xfce4-power-manager and xflock4. They both re-enable DPMS. To get around that, I switched from xfce4-power-manager to xfce4-battery-plugin and commented the following in /usr/bin/xflock4:

This will cause xv to default to the video sprite adapter instead of the textured video adapter, which does not suffer from tearing. There are some issues though, sometimes I'll get corrupted/no video and have to restart X. There may be issues with compositing as well, but I have that disabled.

I'll try the tear free option. Does anyone have any documentation on it? It's not mentioned in man intel._________________My political bias.

Thanks for starting this thread and providing your solution. I spent a bunch of time trying different things including vaapi to fix the tearing on my sandy bridge system76 laptop. Setting AccelMethod=sna and TearFree finally fixed it.