AMD Radeon RX 7700 XT Drivers on Debian 1208 Nov 2023
So we all know that Debian lags behind and AMD Radeon RX 7700 XT was release after Debian 12 release. So it would be expected that there is no drivers for this new GPU on Debian 12. I could not find any good guide so I had to puzzle all the small bits and pieces I could find.
Start with installing existing packages
If you want to read the long version Debian WIKI - AtiHowTo.
And this is my short version I extracted from the Debian WIKI, including 32 bit mode for Steam etc.
#!/bin/bash sudo dpkg --add-architecture i386 && sudo apt update PKG="firmware-amd-graphics libgl1-mesa-dri libglx-mesa0 mesa-vulkan-drivers xserver-xorg-video-all" PKG+=" libglx-mesa0:i386 mesa-vulkan-drivers:i386 libgl1-mesa-dri:i386" sudo apt install $PKG
and then I enabled the TearFree optional stuff in Xorg by adding this in /etc/X11/xorg.conf.d/20-amdgpu.conf
Section "Device" Identifier "AMD Graphics" Driver "amdgpu" Options "TearFree" "true" EndSection
and Yes I’m still using Xorg (KDE/Plasma crash a lot, Gnome as well and OpenBox does not)
Now this would probably work fine if you have an older AMD GPU. But for me this will spit a lot of errors when it tries to load the binary firmware blob.
Clone firmware repo
So we need to clone the Linux firmware repo to get the newest AMD Firmware blobs.
git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
This may take a while because currently the repo is like 1.7Gb.
When it’s done we need to copy the AMD GPU firmware blobs so the Linux kernel can find them and load them.
cd linux-firmware/amdgpu sudo cp * /lib/firmware/amdgpu/
So after this you can reboot and Xorg should work.
But for me this was not enough, I had some issues with DXVK well actually Vulkan when I tried to start Diablo 4.
Installing Mesa-vulkan-drivers version 23+
So I had to add the trixie/testing repo and install newer mesa-vulkan-drivers to get Diablo 4 running.
First we need to add the testing repo to apt, create a new file
/etc/apt/sources.list.d/trixie.list with the content
# Trixie deb http://deb.debian.org/debian trixie main non-free-firmware contrib non-free
For some reason the trixie/testing repo was assigned the same Pin priority as stable. This will make apt find a lot of newer packages and upgrade my entire Debian install to trixie. I can’t remember this ever happend on Debian 11 when just adding testing repo, but I mostly played with Sid.
Anyway to lower the pin priority for the trixie/testing repo another file is needed. Create the file
/etc/apt/preferences.d/trixie-prio with the content
Package: * Pin: release n=trixie Pin-Priority: 100
you can check the pin priorites with
apt-cache policy command, there you will see how to match the
Pin: release n=trixie line as well. You may have to run
sudo apt update before
apt-cache policy is updated.
Now when we have the trixie repo available we can install the newer mesa package
sudo apt update sudo apt -t trixie install mesa-vulkan-drivers
And this is what made everything work for me. Except for KDE/Plasma randomly crashing…
AMD Proprietary drivers
There is some drivers to download from AMD, I did try those. But the Deb file is made for Ubuntu and the dependencies did not match, so it failed and I gave up because the above works good enough for me. At least for a while, until I can’t stop myself from trying to hack them to work on Debian 12.