The AMD Installer Script method automates the installation process for the AMDGPU stack.
NOTE: Check the latest version number of the Installer Script by checking the .deb file link from https://www.amd.com/en/support/linux-drivers.
sudo apt update wget https://repo.radeon.com/amdgpu-install/22.40.5/ubuntu/jammy/amdgpu-install_5.4.50405-1_all.deb
NOTE: The installer package is updated periodically to resolve known issues and add new features.
sudo apt install ./amdgpu-install_5.4.50405-1_all.deb
NOTE: Check the latest version number of the Installer Script by checking the .deb file link from https://www.amd.com/en/support/linux-drivers.
amdgpu-install --usecase=graphics,opencl --vulkan=amdvlk --opencl=rocr --no-dkms
NOTE: This chooses to install various optional elements, such as opencl with rocr and vulkan.
amdgpu-install --usecase=graphics,opencl --vulkan=amdvlk,pro --opencl=rocr
Ensure there is no modprobe blacklist for amdgpu.
sudo rm /etc/modprobe.d/blacklist-amdgpu.conf
Add the user to the video group
usermod -a -G video username
Add the user to the render group
usermod -a -G render username
NOTE: This is an alternative method to configure group access:
sudo usermod -a -G render,video $LOGNAME
Grab the latest firmware from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git.
Drop these firmware files into /lib/firmware/amdgpu/ and rebuild any initramfs:
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-20230515.tar.gz tar -xf linux-firmware-20230515.tar.gz sudo cp linux-firmware-20230515/amdgpu/* /lib/firmware/amdgpu/ sudo update-initramfs -uk 'all'
NOTE: The latest firmware files should probably provide support for newer GPUs.
sudo apt update sudo apt install mesa-utils glxinfo | grep OpenGL
returns:
OpenGL vendor string: AMD OpenGL renderer string: Radeon RX 7900 XTX (gfx1100, LLVM 15.0.3, DRM 3.48, 5.19.0-43-generic) OpenGL core profile version string: 4.6 (Core Profile) Mesa 22.3.0-devel 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 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 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 OpenGL ES profile extensions:
NOTE: This should show useful info on the GPU.
glxgears -info
NOTE: This should show some gears spinning around, together with frames per second.
Remove the Nvidia packages and any Nvidia related kernel arguments you might have (DRM Kernel Mode Setting or whatever).
sudo dpkg -P $(dpkg -l | grep nvidia-driver | awk '{print $2}')
NOTE: The Nvidia drivers will not load if there is no Nvidia card installed.
# For VDPAU export VDPAU_DRIVER=radeonsi # For VA-API export LIBVA_DRIVER_NAME=radeonsi # For GPU Vulkan Support, if the non-pro driver is used. export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json:/usr/share/vulkan/icd.d/radeon_icd.i686.json # For GPU Vulkan Support, if the pro driver is used. export VK_ICD_FILENAMES=/opt/amdgpu-pro/etc/vulkan/icd.d/amd_icd64.json
NOTE: These are only needed if these processes do not function correctly.
If using Xorg.
Xorg will automatically load the driver and it will use the monitors EDID to set the native resolution.
Section "OutputClass" Identifier "AMD" MatchDriver "amdgpu" Driver "amdgpu" EndSection