Honestly, the simple answer for first question is that; Debian Linux desktop distributions will originally come packed with hardware acceleration configured by default during installation for Intel processors just in case you would rely on the integrated GPU.
However, what we are going to cover in this article is upgrading that outdated driver to latest version to maximize performance, and how to solve tearing issues, after we force the use of the bleeding edge “SNA” on X11 instead of “UXA” as the default Hardware Acceleration method.
How to Install Latest Intel GPU DriverYou can follow same instructions below to either install latest Intel GPU driver from scratch or simply to perform an upgrade to the currently outdated driver package, the general idea is pulling the bleeding edge version of
xserver-xorg-video-intelpackage from Debian
Add “jessie/backports” Branch to APT SourcesBasically, one easy way to achieve that is by issuing this command into the terminal, like this:
sudo echo "deb http://ftp.debian.org/debian/ jessie-backports main contrib non-free" >> /etc/apt/sources.list
Install Backported “xserver-xorg-video-intel” PackageNow, just install the package using
apt-getutility from terminal.
Note that if you already have an older version then it will just upgrade it to the build corresponding to the latest package available on
sudo apt-get -t jessie-backports install "xserver-xorg-video-intel"
How to Activate “SNA” Hardware AccelerationWell, the default behavior after you install the latest driver is that it will automatically choose the suitable hardware acceleration method according to your processor architecture.
For instance, starting from Intel Haswell which is the "fourth-generation core" successor to the Ivy Bridge architecture, without configuring anything it will default to “SNA” settings. However, sometimes I do not trust everything to go as intended.
Besides, we need to force enabling
"TearFree" "true"option to prevent graphics tearing during either 3D OpenGL rendering or direct window moving/scrolling actions. So, according to this we must to create an
xorg.conffile to manually define our own desired options, anyway.
Create “xorg.conf” File with our SettingsYou need to create the configuration file exactly at this path
/etc/X11/xorg.confso execute your preferred text editor from terminal to that location, we will use
nanoas an example:
Note that if you happen to already have this file created somehow, it will just attempt to edit it otherwise it will automatically create it.
sudo nano /etc/X11/xorg.conf
Configure X11 with Intel GraphicsNow, just input the following content, into the text editor and save it.
If you are using an old Intel processor that doesn't support “SNA” consider changing the option marked above with white color to
Section "Device" Identifier "Intel Graphics" Driver "intel" Option "AccelMethod" "sna" Option "TearFree" "true" EndSection
"AccelMethod" "uxa"instead to avoid any issues.
Reboot SystemThat's it for now, restart your system to take effect then proceed to the next step just in case you want to confirm that GPU Hardware Acceleration and everything is working as intended.
How to Confirm Working GPU Hardware AccelerationI have prepared a simple command with an expected output so that we can confirm everything is going our way, in terminal issue this command:
You should expect to receive an output similar to this in my case:
cat /var/log/Xorg.0.log | grep SNA && cat /var/log/Xorg.0.log | grep DRI
Last but not least, I will be writing two other articles related to this subject this week, as we know that currently browsers available for Linux distributions like FireFox and Chrome aren't configured correctly to make use of Intel GPU Hardware Acceleration by default, so we'll be solving that.
[ 12.953] (II) intel(0): SNA compiled: xserver-xorg-video-intel 2:2.99.917+git20161105-1~bpo8+1 (Vincent Cheng
) [ 12.953] (II) intel(0): SNA compiled for use with valgrind [ 13.033] (II) intel(0): SNA initialized with Haswell (gen7.5, gt1) backend [ 13.044] (II) intel(0): [DRI2] Setup complete [ 13.044] (II) intel(0): [DRI2] DRI driver: i965 [ 13.044] (II) intel(0): [DRI2] VDPAU driver: va_gl [ 13.044] (II) intel(0): direct rendering: DRI2 enabled [ 13.507] (II) GLX: Initialized DRI2 GL provider for screen 0