Ubuntu – Any way to speed up Intel integrated graphics on 18.04

18.04driversgraphicsintel graphicsvideo

I'm running a Core i7-6500U with integrated Intel HD Graphics 520. Under GNOME, all animations, such as going to the activities screen, scrolling in Firefox, etc are choppy. Even videos don't play smoothly in VLC. My laptop has a built-in 4K LCD panel, but it's choppy even at 1920×1080. Is there anything I can do to make it more smooth, or is this just the limits of the GPU? Kernel is 4.16.9. inxi -G says

Graphics:  Card: Intel HD Graphics 520
           Display Server: x11 (X.Org 1.19.6 )
           drivers: fbdev (unloaded: modesetting,vesa)
           Resolution: 3840x2160@60.00hz
           OpenGL: renderer: Mesa DRI Intel HD Graphics 520 (Skylake GT2)
           version: 4.5 Mesa 18.0.0-rc5

glxinfo |grep -Ei 'opengl|direct rendering' says

direct rendering: Yes
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.0-rc5
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 18.0.0-rc5
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 18.0.0-rc5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Best Answer

Ok, so usually you just need to create an xorg.conf and properly set the parameters in order to get a much more decent experience. In this case the parameters AccelMethod set to sna and the TearFree to true are what does the trick. Here's how to proceed in the terminal:

First step:

sudo mkdir /etc/X11/xorg.conf.d/ 

Second step:

Run the command

echo -e 'Section "Device"\n Identifier "Intel Graphics"\n Driver "Intel"\n Option "AccelMethod" "sna"\n Option "TearFree" "true"\nEndSection' | sudo tee /etc/X11/xorg.conf.d/20-intel.conf

This will create /etc/X11/xorg.conf.d/20-intel.conf file with content:

Section "Device"
 Identifier "Intel Graphics"
 Driver "Intel"
 Option "AccelMethod" "sna"
 Option "TearFree" "true"
EndSection

After that just reboot. Hope it helps.

Related Question