AMDGPU
Related articles
amdgpu is the open source graphics driver for the latest AMD Radeon graphics cards.
At the moment there is support for Volcanic Islands (VI) and experimental support for Sea Islands (CI) and Southern Islands (SI) cards. AMD has absolutely no plans for supporting the pre-GCN GPUs.
Owners of unsupported AMD/ATI video cards can use the Radeon open source or AMD's proprietary driver instead.
Contents
Selecting the right driver
Depending on the card you have, find the right driver in Xorg#AMD. This page has instructions for AMDGPU and AMDGPU PRO.
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.
AMDGPU PRO
AMD provides a proprietary, binary userland driver called AMDGPU PRO, which works on top of the open-source AMDGPU kernel driver. This hybrid approach allows the in-kernel component to be recompiled by the Arch Linux maintainers when required (e.g. on a kernel or Xorg update), while keeping the same binary userspace part. This should remedy the problem where the driver provided by AMD is out of date and incompatible with newer kernels or Xorg versions (a problem that was very common with the old AMD Catalyst driver). For a detailed overview of the hybrid system, see this article.
The AMDGPU PRO driver provides OpenGL, OpenCL, Vulkan and VDPAU support. For some workloads it provides better performance than the open-source driver (example benchmark), while for others it is true the contrary (example benchmark).
See the release notes and the announcement at the Phoronix forum for more information.
There are packages for the amdgpu-pro components in the AUR (amdgpu-proAUR), visit https://github.com/Corngood/archlinux-amdgpu for issues or pull requests.
If you want to use the open source AMDGPU drivers, and only the proprietary OpenCL component, then use (opencl-amdAUR)
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
nomodesetorvga=as a kernel parameter, sinceamdgpurequires KMS. - Also, check that you have not disabled
amdgpuby using any kernel module blacklisting.
Enable early KMS
Kernel mode setting (KMS) is supported by the amdgpu 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.
Xorg 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.
Performance tuning
Enabling video acceleration
See Hardware video acceleration.
Enable amdgpu for Sea Islands or Southern Islands cards
The Arch Linux linux package (from version 4.9), is compiled with Southern Islands and Sea Island support enabled by default (CONFIG_DRM_AMDGPU_CIK=Y and CONFIG_DRM_AMDGPU_SI=Y [1]).
When using these cards, the default driver will be the old radeon driver. To use the amdgpu driver instead, you must #Disable radeon driver.
Disable radeon driver
CIK and SI cards will default to the radeon driver, even after manually enabling AMDGPU for these cards when building the kernel.
Prevent the radeon module from loading by blacklisting the radeon module, to force usage of the amdgpu module:
/etc/modprobe.d/radeon.conf
blacklist radeon
Troubleshooting
No HDMI/DP Audio
The open source AMDGPU driver relies on the DAL code that currently being worked on. Until DAL is mainlined, audio suppport for HDMI and DisplayPort will not be available. The only current way to get HDMI and DisplayPort audio is to install the AMDGPU-PRO driver.
Xorg or applications won't start
- "(EE) AMDGPU(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?" error after opening glxgears, can open Xorg server but OpenGL apps crash.
- "(EE) AMDGPU(0): Given depth (32) is not supported by amdgpu driver" error, Xorg won't start.
Setting the screen's depth under Xorg to 16 or 32 will cause problems/crash. To avoid that, you should use a standard screen depth of 24 by adding this to your "screen" section (assuming you have one, assuming you don't add this to /etc/X11/xorg.conf.d/10-screen.conf).
Section "Screen"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection