About Linux on integrated Intel graphics

I’ve been building and configuring Linux desktops for home and office for quite some time now, and lately I’ve had some fun choosing configurations with integrated Intel graphics. Once I started with a machine, which I installed with a Core i3-2105, (HD Graphics 3000), later – a newer Core i3-9000 (UHD Graphics 630), and more recently I got an Intel NUC5PPYH very inexpensively, of course, also with proprietary graphics controller from Intel.

I want to say right away that if you do not play commercial games on Linux, then Intel graphics “inserts” are the best choice in terms of stability and manufacturer support. The video driver has been in the kernel for many years, and it just works: with hardware acceleration out of the box, no tearing, no additional proprietary blobs and other headaches. Moreover, there are at least two such drivers: the traditional ‘intel’ and the newer ‘modesetting’. Intel graphics have been at their best in Wayland since the beginning, let’s not forget that.

The reason for this note was the observation that desktop effects can slow down on old Intel “inserts”, despite the fact that OpenGL applications can have quite high FPS and good smoothness. I have seen different signs of stuttering in two of the most popular desktop environments (KDE Plasma 5 and Gnome 4) in both X11 and Wayland. I want to share some advice on how the situation can be fixed using the example of the Fedora $releasever distribution (at the time of writing it is 37).

So, given: you feel that the desktop animation slows down (keywords: laggy, jerky, stuttering).

If we are talking about Gnome, then the solution may be to enable dynamic triple buffering of frames. Right now this change is not yet committed to Mutter, but there is for Fedora separate copr repository with the required patches. Go to the link, there are all the necessary instructions. By the way, in Ubuntu 22.04 a similar patch is already applied.

Further, the speed of rendering the interface is affected by the operation of the framebuffer. It makes sense to enable framebuffer compression for the sake of increasing FPS in animations (and not only). To do this, create a file /etc/modprobe.d/i915.conf with the following content:

options i915 enable_fbc=1

And give the command:

sudo dracut --force

The effect will come after rebooting the machine.

If you have KDE Plasma, then the trick with Mutter, of course, is not relevant. Plasma tends to be slower in Wayland than in X11, which is sometimes frustrating (for example, if you want to drive Waydroid). However, I accidentally found a quick fix. See what output the command gives you:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

It will almost certainly be either ‘powersave’ or ‘schedutil’. Let’s change it to ‘performance’:

echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Contrary to popular belief, this will neither drain the laptop battery nor cause the CPU to overheat. The meaning of the change: to expand the scope of dynamic frequency control of the CPU and GPU. Change will still happen on request. Here there are some interesting details.

In the context of KDE Plasma 5, this fix makes the animations of the Kwin window manager soft and silky. Yes, it looks like a crutch, but it works. If this is not enough for you, try turning off Blur in the effects, it will help. exactly.

Finally, there was another, rather unexpected way to defeat the “inexplicable brakes” of the effects of the Plasma desktop. All of a sudden, sometimes kwin can’t detect your monitor’s refresh rate correctly and requires manual adjustment. Try to file ~/.config/kwinrc under [Compositing] add these lines:

MaxFPS=60
RefreshRate=60

Instead of 60, there may be another number (75, 144 etc), depending on the screen parameters. The effect will come after restarting the window manager.

Thanks for reading. Hope my advice helps someone.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *