Fixing Xorg's modesetting driver tearing on Intel Skylake IGPs


Just a really small post for a really annoying issue.

As you might know no stable releases of the Xorg Intel IGP cards has been released in 3 years and Debian/Ubuntu decided to switch to Xorg's modesetting driver as the default for non-legacy Intel cards (see Timo Aaltonen's post for more details on the subject).

The issue with this driver is that it will tear like there's no tomorrow on Skylake chips in some setups.

I came up with the solution after reading this thread on Phoronix.

Apparently the Skylake IGP hardware is designed with the expectation that a compositor will always be present and taking care of buffer swapping. Not only that but it needs to use either page_flip or buffer-age for vsync to work properly.

If you aren't sure if your vsync is enabled and in a working condition (for me it was painfully apparent but if you aren't sure just play this tearing test video posted by Kenjo).

If you are running a compositor try to configure it to use the glx backend and page_flip or buffer-age. If you aren't or happen to use compton like I do, keep reading.

If you don't have compton already installed get it with:

# sudo apt install compton

And then start it using the glx backend:

# compton --backend=glx

If you still get tearing while using the glx backend (you can make sure by playing the test video) try forcing the usage of one of the required buffer swapping methods:

# compton --backend=glx --glx-swap-method=buffer-age

In my case this wasn't necessary but YMMV.

Afther this everything should run buttery smooth again.

I hope this post saves some headaches. It definitely drove me nuts for a couple days until I got it fixed.