AMDGPU

From ArchWiki
(Redirected from AMDGPU PRO)
Jump to: navigation, search

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 may use the Radeon open source or AMD's proprietary driver instead.

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

Note:

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.

For 32-bit application support on x86_64, also install lib32-mesa from multilib.

Support for accelerated video decoding is provided by mesa-vdpau and lib32-mesa-vdpau packages.

Blacklist radeon

The linux package enables AMDGPU support for cards of the Southern Islands (SI) and Sea Islands (CIK). When building or compiling a kernel, CONFIG_DRM_AMDGPU_SI=Y and/or CONFIG_DRM_AMDGPU_CIK=Y should be be set in the config.

Even when AMDGPU support for SI/CIK has been enabled by the kernel, the radeon driver may be used instead of the AMDGPU driver.

Blacklist the radeon module to force usage of the amdgpu module:

/etc/modprobe.d/radeon.conf
blacklist radeon

AMDGPU PRO

Warning: Arch Linux is not officially supported.
Note:
  • To use the proprietary OpenCL component without AMDGPU PRO, install opencl-amdAUR instead.
  • A downgrade of the linux (4.8 or 4.9) and Xorg (1.18) packages may be required to use AMDGPU PRO.

AMD provides a proprietary, binary userland driver called AMDGPU PRO, which works on top of the open-source AMDGPU kernel driver. The 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.

A patched version of the official AMDGPU PRO driver is available as amdgpu-proAUR in AUR.

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 or vga= as a kernel parameter, since amdgpu requires KMS.
  • Also, check that you have not disabled amdgpu by using any kernel module blacklisting.

Enable early KMS

Tip: If you have problems with the resolution, Kernel mode setting#Forcing modes and EDID may help.

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

PowerPlay

PowerPlay is the name given to AMD's dynamic clock scaling technology. Depending on your GPU and kernel version, it will default to on or off.

To get maximum performance and even power savings, add the amdgpu.powerplay=1 kernel parameter.

Enabling video acceleration

See Hardware video acceleration.

Driver options

The following options apply to /etc/X11/xorg.conf.d/20-amdgpu.conf.

Please read man amdgpu first before setting driver options.

DRI sets the maximum level of DRI to enable. Valid values are 2 for DRI2 or 3 for DRI3. The default is 3 for DRI3 if the Xorg version is >= 1.18.3, otherwise DRI2 is used:

Option "DRI" "3" 

TearFree controls tearing prevention using the hardware page flipping mechanism. If this option is set, the default value of the property is set to auto, which means that TearFree is on for outputs with rotation or other RandR transforms:

Option "TearFree" "true"

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.

Unable to start Xorg on Southern Islands (SI) or Sea Islands (CIK) GPU

This issue may occur when both the radeon and amdgpu module are loaded at boot, see #Blacklist radeon.

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

Screen artifacts and frequency problem

If you have screen artifacts when setting your screen frequency up to 120+Hz your "Memory Clock" and "GPU Clock" are certainly too low to handle the screen request.

A workaround [1] is available by doing the following:

# echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level

or

# echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level

There is a GUI solution [2] were you can manage the "power_dpm" with radeon-profile-gitAUR and radeon-profile-daemon-gitAUR.