Screen flickering on i915 graphics using Debian 9

Recently I had a problem with my Lenovo ThinkPad E550 laptop which is running Debian 9. Problem was that occasionally display would start flickering, “jumping” or just blacking out for couple of seconds. Problem was most noticeable when using Terminal, Gedit, Chrome etc.

Apparently, problem is with (default) SNA acceleration in recent X.Org. I had to revert to older and mature backend: UXA. Read more about it here.

To fix this and revert to UXA acceleration method, create /usr/share/X11/xorg.conf.d/20-intelaccel.conf file with these contents:

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod" "uxa"