This is an old revision of the document!
Table of Contents
Ubuntu - GPU - AMD GPU - Setup Radeon RX 7900 XTX
The installer script method automates the installation process for the AMDGPU and ROCm stack. The installer script handles the complete installation process for ROCm, including setting up the repository, cleaning the system, updating, and installing the desired drivers and meta-packages.
Setup Radeon RX 7900 XTX manually
Approach
- Update the system.
- Shutdown the system.
- Swap GPU card.
- Boot the system.
- This should work fine, since minimum support is via the kernel amdgpu.
- Optionally, purge Nvidia packages.
- Install Mesa.
NOTE:
- The NVIDIA packages can be kept, and will not cause any trouble but will just waste space.
- Mesa is the open source implementations of OpenGL and Vulkan that AMD GPU users typically use.
Download & Install the AMD Installer Script
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/focal/amdgpu-install_5.4.50405-1_all.deb sudo apt install ./amdgpu-install_5.4.50405-1_all.deb
NOTE: Run the amdgpu-install script without any arguments, should be sufficient.
Alternatively, try this:
amdgpu-install --usecase=graphics,opencl --vulkan=amdvlk --opencl=rocr
Optionally, install fresh firmware files
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 support these new GPUs.
Enable the AMD Kernel Module
Ensure there is no modprobe blacklist for amdgpu by running the command:
sudo rm /etc/modprobe.d/blacklist-amdgpu.conf
Optionally Purge nvidia drivers
Remove the Nvidia packages and any Nvidia related kernel arguments you might have (DRM Kernel Mode Setting or whatever).
NOTE: The Nvidia drivers will not load if there is no Nvidia card installed.
- Leaving the NVIDIA stack installed ensures that it is ready if you ever need to switch to a backup GPU in a hurry.
Optionally Install Vulkin
Install the AMD vulkan package to get vulkan support.
Install Mesa
sudo apt install mesa-utils
NOTE: Mesa is the open source implementations of OpenGL and Vulkan that AMD GPU users typically use.
Check that the GPU is being picked up
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.
Test the GPU
glxgears -info
NOTE: This should show some gears spinning around, together with frames per second.