AMDGPU
Related articles
amdgpu is the open source graphics driver for the latest AMD Radeon graphics cards.
At the moment there is only support for the Volcanic Islands and some cards of the Sea Islands family. AMD has yet to decide to add support for older cards in the near future.
Owners of unsupported AMD/ATI video cards can use the Radeon open source or AMD's proprietary driver instead.
Contents
Installation
Install the xf86-video-amdgpu package. It provides the DDX driver for 2D acceleration and it pulls in mesa as a dependency, providing the DRI driver for 3D acceleration.
To enable OpenGL support, also install mesa-libgl. If you are on x86_64 and need 32-bit support, also install lib32-mesa-libgl from the multilib repository.
Support for accelerated video decoding is provided by mesa-vdpau and lib32-mesa-vdpau packages.
Configuration
Xorg will automatically load the driver and it will use your monitor's EDID to set the native resolution. Configuration is only required for tuning the driver.
If you want manual configuration, create /etc/X11/xorg.conf.d/20-amdgpu.conf
, and add the following:
Section "Device" Identifier "AMD" Driver "amdgpu" EndSection
Using this section, you can enable features and tweak the driver settings.
Loading
The amdgpu
kernel module should load fine automatically on system boot.
If it does not happen, then:
- Make sure you have the latest linux-firmware package installed. This driver requires the latest firmware for each model to successfully boot.
- Make sure you do not have
nomodeset
orvga=
as a kernel parameter, sinceamdgpu
requires KMS. - Also, check that you have not disabled
amdgpu
by using any kernel module blacklisting.
Enable early KMS
Kernel mode setting (KMS) is supported by the radeon driver and is mandatory and enabled by default.
KMS is typically initialized after the initramfs stage. It is possible, however, to enable KMS during the initramfs stage. To do this, add the amdgpu
module to the MODULES
line in /etc/mkinitcpio.conf
:
MODULES="... amdgpu ..."
Now, regenerate the initramfs:
# mkinitcpio -p linux
The change takes effect at the next reboot.
Performance tuning
Enabling video acceleration
VA-API and VDPAU can be installed to provide hardware accelerated video encoding and decoding.
Enable amdgpu for Sea Islands Cards
amdgpu
has experimental support for Sea Islands (CI) cards, which is disabled by default. One possible reason why you might want to enable it and switch from radeon to amdgpu
is that AMD announced their user space Vulkan driver will only be supporting the new amdgpu
stack [1]. Same might be the case for the new OpenCL driver, which was also mentioned in the XDC presentation.
If you want to enable amdgpu
and use it with your Sea Islands product, you have to recompile your kernel. Probably the easiest way to setup a custom kernel is using the ABS, described in Kernels/Arch Build System. You can also uncomment make menuconfig
or make nconfig
in the PKGBUILD, which will allow you to verify that the CIK option is selected by following the instructions from Gentoo wiki.
Set "Enable amdgpu support for CIK parts" to "yes", then compile and install your kernel.
CONFIG_DRM_AMDGPU_CIK=Y
It may also be needed to use the amdgpu.exp_hw_support=1
[2] as kernel parameter or by setting the kernel module options.
Disable radeon driver
To prevent radeon
from loading, you can disable it in the Kconfig or blacklist the radeon
module.
/etc/modprobe.d/radeon.conf
blacklist radeon