I’ve been getting micro hiccups on Xorg + gnome-shell using Intel HD Graphics for quite some time now; lag when switching virtual desktops, alt-tabbing apps, and even sometimes when typing in the terminal (local, not over SSH!). I’ve noticed it on both this current machine, a Samsung Series 9 NP900X3C with Intel HD 4000 Graphics, as well as on my previous ThinkPad T420 with Intel HD 3000 Graphics.
I had a look in my Xorg logs and noticed I was using UXA
acceleration, the tried-and-true acceleration for the open-source Intel graphics driver. Sandy Bridge and newer support SNA
(Sandy Bridge New Acceleration), which was experimental at first but has been constantly evolving since 2011 when it was introduced (and there is even discussion of it replacing UXA as the default in Ubuntu at least).
I figure by now it should perform better and use less power, so I’m gonna give it a try to see if it resolves my issues. In Arch Linux at least, it was as simple as adding a config file to Xorg’s modular config directory, /etc/X11/xorg.conf.d/20-intel.conf:
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "AccelMethod" "sna"
EndSection
Let’s see if it helps…
Update: i915.semaphores=1
So after a few hours I noticed the lag had come back. Xorg even froze once, and I had to hard restart the machine. Someone pointed out that I might want to give the i915.semaphores=1
kernel cmdline a try. From what I’ve read it seems to be related to power saving, but I’ll see if it makes a difference with the performance hiccups.
Update 2: i915 semaphores are good!
I’ve been running with i915.semaphores=1
for a week or two now and I can’t recall experiencing hiccups at all, so it seems it’s doing something good…
Hey Alan,
Good to see that the suggestion worked.
i915.semaphores=1 as a boot parameter also works best if BOTH of these conditions are met:
1. You are using tear-free rendering.
2. You are using SNA ONLY with NO fallback to UXA.
Your /etc/X11/xorg.conf.d/20-intel.conf file should have the following entries for this to work:
Section “Device”
Identifier “Intel Graphics”
Driver “intel”
Option “DRI” “True”
Option “TearFree” “true”
Option “AccelMethod” “sna”
EndSection
I happen to save a bunch of commits from intel-drm-next, and at times, it comes in handy when fixing Intel-related bugs.
Regards,
Brainiarc7