Intel Arc Dedicated GPUs, Linux Kernel 6.0, and latest Mesa on Ubuntu 22.04
With a little work, full 3D acceleration, and hardware decoding and encoding are fully functional.
- Sean Potter
With the release of the 22.10 flavors of Ubuntu recently, I was hopeful this latest release would be ready for the (also recently released) dedicated Intel Arc GPUs. Unfortunately this wasn’t the case, as attempting to load the Kubuntu 22.10 installer from USB resulted in a blank screen. I was then given hope by Intel’s release of “packaged drivers” for the Alchemist GPUs for the 22.04 flavors of Ubuntu, but these hopes were unfortunately dashed as well after multiple attempts on fresh installs of 22.04.
After reviewing what Intel’s instructions were installing, I decided to try another fresh installation of 22.04, however fully deviating from their instructions and moving on to Linux Kernel 6.0 and the bleeding edge Mesa stack. Thankfully this process resulted in very little editing of configuration files, and only needing to manually compile one package. This process should also be repeatable on the 22.10 flavors of Ubuntu as well.
Before beginning, I’d like to suggest leaving any integrated graphics enabled, as well as ensuring an SSH server is running in the event of a blank screen that could result from any number of reboots. After running through this process twice, I believe the following instructions should not result in a blank screen.
The first step is to enable Resizable BAR in the motherboard's BIOS. This typically requires a newer motherboard and processor, such as a Ryzen 3000-series processor or 10th Genetation Intel Core processor, or newer. Secure Boot is not required for this to work, and resizable BAR isn't necessary required, but it greatly increases the performance of the GPUs.
Linux Kernel 6.0
The next milestone of the Linux Kernel was released on October 2nd, and the Ubuntu-optimized version was released shortly thereafter. The necessary kernel packages can be downloaded from Ubuntu’s kernel PPA:
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-headers-6.0.0-060000_6.0.0-060000.202210022231_all.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-headers-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-modules-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v6.0/amd64/linux-image-unsigned-6.0.0-060000-generic_6.0.0-060000.202210022231_amd64.deb
Then installed via apt:
sudo apt install ./linux-*.deb
Linux Firmware Drivers
The latest i915 drivers can be found at a Gitlab repository. The pre-built Ubuntu releases are sitting behind a Proton download, so downloading these is best done from a browser. They download link can be found here.
Once the file has been downloaded, installation once again is down through apt:
sudo apt install ./drivers-linux-firmware_20220818-1_all.deb
Latest Mesa Stack
Unfortunately the 22.04 and 22.10 flavors of Ubuntu both ship with relatively older versions of Mesa, and Intel has been dropping updates to support their dedicated GPUs for the past several months, meaning the best support for their GPUs is only available in the latest releases of Mesa, specifically 22.2.x and greater. The oibaf PPA has made the latest Mesa stack available to Ubuntu users for several years, and their releases have nearly always been very stable.
sudo add-apt-repository ppa:oibaf/graphics-drivers -y
sudo apt update
sudo apt upgrade -y
Hardware Decoding and Encoding
One of the highly anticipated features of the dedicated Intel GPUs are its hardware encoding and decoding capabilities for video. Whether streaming or video editing, the Alchemist series GPUs pack some powerful hardware capabilities. Unfortunately, as with everything else in this article, these features don’t work out of the box. The Intel Media Driver will need to be manually compiled and installed.
First, let’s enable HuC firmware, which is necessary for AVC/HEVC/VP9 low power encoding bitrate control. Presrently, HuC firmware support is disabled in Linux kernels by default.
echo "options i915 enable_guc=2" > /etc/modprobe.d/i915.conf
Next, install the required libraries and tools required to compile the driver:
sudo apt install autoconf libtool libdrm-dev xorg xorg-dev openbox libx11-dev libgl1-mesa-glx libgl1-mesa-dev cmake g++ build-essential libva-dev libigdgmm-dev
Then clone the latest release of the driver code:
sudo make install
The last step to get the Intel Arc GPUs working requires a change to GRUB’s configuration. This is meant to force the correct Intel i915 graphics driver to be detected and loaded at boot based on the PCI ID of the card.
sudo nano use /etc/default/grub
Inside this file, find the line that looks like: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash”
Then edit this line by adding “i915.force_probe=56a5” to the end:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i915.force_probe=56a5"
Save the file, then upgrade grub and reboot.
Up and Running
After the above instructions have been completed and the system has been rebooted, the system should now be running Kernel 6.0, the latest Mesa drivers, and latest firmware. The dedicated Intel GPU should also now be fully working for 3D Acceleration. These steps can all be verified from the command line:
Linux lighthouse 6.0.0-060000-generic #202210022231 SMP PREEMPT_DYNAMIC Sun Oct 2 22:35:09 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Mesa / OpenGL (22.3.0 at the time of this writing)
glxinfo | grep -i 'opengl'
OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) Arc(tm) A770 Graphics (DG2) OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.3.0-devel (git-813d502 2022-10-23 jammy-oibaf-ppa) OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 4.6 (Compatibility Profile) Mesa 22.3.0-devel (git-813d502 2022-10-23 jammy-oibaf-ppa) OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.2 Mesa 22.3.0-devel (git-813d502 2022-10-23 jammy-oibaf-ppa) OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 OpenGL ES profile extensions:
Hardware Accelerated Video Encoding and Decoding:
libva info: VA-API version 1.15.0 libva info: User environment variable requested driver 'iHD' libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri//iHD_drv_video.so libva info: Found init function __vaDriverInit_1_15 libva info: va_openDriver() returns 0 vainfo: VA-API version: 1.15 (libva 2.12.0) vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.6.1 (da1e0b6b9)
(Optional) Steam Packages
Some additional packages will need to be installed to support Steam on the system. Once these have been installed, the Steam executable itself should handle installing any remaining dependencies.
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y udev mesa-va-drivers:i386 mesa-common-dev:i386 mesa-vulkan-drivers:i386 libd3dadapter9-mesa-dev:i386 libegl1-mesa:i386 libegl1-mesa-dev:i386 libgbm-dev:i386 libgl1-mesa-glx:i386 libgl1-mesa-dev:i386 libgles2-mesa:i386 libgles2-mesa-dev:i386 libosmesa6:i386 libosmesa6-dev:i386 libwayland-egl1-mesa:i386 libxatracker2:i386 libxatracker-dev:i386 mesa-vdpau-drivers:i386 libva-x11-2:i386
Final Thoughts and Next Steps
After completing these steps, I was able to load up games such as Borderlands 2 without any trouble from Steam. Performance seems reasonable at the moment, however I haven’t fully benchmarked any of the GPUs I presently possess. I’m sure there will be some problems and additional tweaks to get performance to the levels Intel has advertised, however the coming weeks will provide plenty of bugfixes and additional support for these GPUs.
Initially I thought hardware accelerated video encoding and decoding was broken, but I was able to resolve this by manually building the Intel Media Driver, per my instructions above. This truly makes the system fully usable now, and I’ll be able to move on to benchmarking the Alchemist cards I currently have in my possession.