Ubuntu 16.04 – Fix Skylake 6th Generation Screen Flickering

16.04kernel

I have a Lenovo ThinkPad t460s here. It is the NVMe PCI SSD version. The CPU is i7 6600U (Skylake 6th generation) with Intel HD 520.

About a month ago (beginning March 2016), I installed Ubuntu GNOME 16.04 Beta 1. Everything, besides the known issues (Touchpad Physical Button Problems, Lid Close Problems) seemed to work fine.

At this time, I was using the kernel version 4.4.0-7. A few days later, there were several kernel updates (4.4.0-12, 4.4.0-14 and 4.4.0-15). Suddenly, I was experiencing screen flickering. It was really ugly, and I couldn't work anymore. So, I did downgrade the kernel version to 4.4.0-7 and put it on hold (via apt-mark hold). The screen flickering disappeared. Now, I have some graphic artifacts when browsing (firefox, chromium). I think I managed to get rid of these by disabling "smooth scrolling" options.

Is anyone else experiencing similar issues? Or has anyone already found a solution to this problem?

PS: I was installing Ubuntu GNOME 16.04 Final Beta a few days ago and get to try kernel version 4.4.0-16, which has solved the issue with the physical buttons of the touchpad. But unfortunately, the Screen Flickering was not solved. So, I went back to kernel version 4.4.0-7, as described above, again.

Best Answer

@brianjcohen led me in the right direction. The Bug report on chromium had some good discussions on some background on the issue, but apparently it's somewhat of an x.org issue with Intel driver options. You can reference it here if you'd like:

https://bugs.chromium.org/p/chromium/issues/detail?id=606152#c63

To fix it, create or edit the file at /usr/share/X11/xorg.conf.d/20-intel.conf as root with the following:

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "AccelMethod" "sna"
    Option "TearFree" "true"
    Option "DRI" "3"
EndSection
  • From the discussion, the AccelMethod should by default be sna, but apparently not explicitly setting it as such could cause X to crash. sna is definitely faster than downgrading it to uxa.
  • TearFree helps prevent tears in video rendering
  • DRI is a method on how the driver renders things, I think this was the key option. You can find out a whole bunch on what it is here: https://en.wikipedia.org/wiki/Direct_Rendering_Infrastructure#DRI3
  • You can also read the man page at man 4 intel
Related Question