AMDGPU

AMDGPU is Article description:: the next generation family of open source graphics drivers using the new Display Core (DC) framework for Vega GPUs and Raven Ridge APUs. It is however also capable of handling newer AMD/ATI Radeon graphics cards based on GCN1.1+, namely the Southern Islands, Sea Islands, Volcanic Islands, and Arctic Islands chipsets.

If the card in question does not appear in the Feature support section below, it is not supported by AMDGPU. In that case check the radeon article, which contains instructions for older open-source AMD/ATI Radeon graphics card drivers.

Prior to Kernel 4.15 Display Core (DC, developed from Display Abstraction Layer, DAL) was not included in the vanilla kernel sources, thus AMDGPU was not able to provide graphics output to a monitor on VEGA and later chips.

Installation
Setting up a system to use AMDGPU requires identifying the proper card, installing the corresponding firmware, configuring the kernel, and installing the X11 driver.

Hardware detection
To choose the right driver, first detect the graphics card. Use lspci for this task:

Check the output for one of the product names listed in the table below.

Feature support

 * A GCN stands for Graphics Core Next Architecture and was introduced with the Radeon HD7000 series (GCN1.0). Raven Ridge APUs feature a mobile Vega graphics core and are referred to as DCN1.0.
 * 1 Support is optional in the kernel.
 * 2 Since kernel 4.7-rc6
 * 3 Experimental, optional support added since kernel 4.9-rc1
 * 4 usable for graphics output since kernel 4.15
 * 5 since kernel 4.16
 * 6 atleast kernel 5.3, Mesa 19.2 LLVM 9.0

Firmware
It is necessary to install the proper firmware (or microcode) for your card. Firmware files are provided by. Make sure you have all necessary files for your hardware in your configuration file if you use the savedconfig USE flag.

The firmware files installed this way will be incorporated into the kernel.

Kernel
Set the following kernel options for the graphic chipsets mentioned above:

The options from the Sound card support menu need only to be set if the card supports HDMI or DisplayPort audio and you want to use it. On newer kernels where Enable AMD Audio CoProcessor IP support appears, that should also be set.

AMDGPU with Display Core was first implemented for VEGA10 (GCN5.0) and RAVEN (with DCN 1.0) GPUs/APUs. Kernels before version 4.17 have (experimental) DC support for older cards (GCN1.1 and newer) via command line option amdgpu.dc=1, which may work better than the older radeon kernel module. Likewise, if DC needs to be disabled for any particular reason, option amdgpu.dc=0 can be used on the kernel command line.

See the radeon article for more details about using HDMI/DisplayPort audio.

Incorporating firmware
The firmware package installed in an earlier section provides files in (for Volcanic Islands and Arctic Islands cards) and/or  (for Southern Islands and Sea Islands cards). Configure the kernel to use the correct firmware files by setting the following options:

or  should be replaced with the full list of filenames given with the chipset's name in the table below, separated by spaces. Use to expand the filenames. E.g. for Volcanic Islands/TONGA, run:

Then  is the string that should be put into the kernel configuration.

After expanding the firmware file names from the following table and copying them into the kernel configuration, save the configuration, then compile and install the new kernel and modules.

USE flags
Set the USE flags for the  driver as needed.

The package will be automatically emerged as a dependency of after setting VIDEO_CARDS following the instructions in the next section.

Emerge
Portage uses the VIDEO_CARDS variable for enabling support for various graphics cards in packages. Setting VIDEO_CARDS to  (see the feature matrix section above) and asking Portage to update changed USE flags in the @world set will pull in the correct driver:

The system should now be prepared to use amdgpu after the next reboot.

dpm
In most cases since Linux 3.13 dpm is the default power management method. Unlike with dynpm and profile methods enabling or disabling dpm must be done via kernel command line. Users who have GPUs older than HD5000 -series may need to add  on kernel command-line to enable dpm.

In most cases just enabling dpm is enough but there are some tunable settings. dpm has three main modes of operating: battery, balanced and performance. The names are quite self-explanatory. To set the GPU to most performant mode the following command is needed to run:

Even if GPU is set to performance -mode it does not mean that the GPU is running with highest clockspeeds at all the time. This is the normal and intended way how dpm works. If it is desirable to run the GPU at the highest speeds all the time, even if there is no actual load, users can then run following command:

This manually overrides dpm's own bahaviour. This is however mainly intended for testing purposes but may also be useful when doing GPU benchmanks.

To give control back to dpm following command is needed to run:

Debug tools
It might be helpful to install the package, which provides the packages  and.

Test, if a discrete graphics card is in use
First make sure that the kernel was compiled with the following settings:

Check, if the discrete graphics card was recognized:

After that. Make sure that the path was mounted successfully:

Then, check, if the driver vga_switcheroo was loaded successfully and can output values:

This output has the following structure :

represents the discrete graphics card, which is inactive, but currently disconnected. is the integrated graphics card, which is active and is currently in use.

The status can be manipulated using the following command:

Replace  with one of the following paramters :

By using the environment variable, one can use the discrete graphics card individually:

This opens an X window with rotating gears.

Let it run in the background and check,  again:

Another indicator is to check the temperature sensors. This requires :

To use the discrete graphics card globally, one can set the environment variable in :

One might export it in the  as an alternative:

Or individually in front of the command, like above using :

VESA
If you have no other machine to browse web pages for solution - emerge x11-drivers/xf86-video-vesa This will allow you to use basic vesa driver so you can start X with no 3d and no 2d acceleration. Your usual kde/gnome/xfce or whatever else should start with vesa driver, so you can bootstrap yourself from within GUI.

Older kernels
Older kernels which do not support the amdgpu driver will not provide the AMDGPU option. For VEGA and newer chips there is no video output without DC (Display Code), which was first included in vanilla Kernel 4.15. In both cases a fairly recent kernel can provide the required drivers. For very new AMD graphics cards and APUs trying an unstable (denoted by a ) kernel may provide the required kernel-sources.

AMD Secure Memory Encryption
If amdgpu fails to load or the screen stays frozen, it might be an incompatibility of the amdgpu module with AMD Secure Memory Encryption (SME).

SME can be temporarily disabled on the kernel command line (using GRUB, or in or as part of GRUB_CMDLINE_LINUX ) by adding mem_encrypt=off. If this fixes the issue, a permanent solution is to configure the kernel accordingly.

AMD_MEM_ENCRYPT may remain enabled, but either AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT must remain unset or the kernel command line option mem_encrypt=off must be used in order to turn Memory Encryption off. Likewise, with mem_encrypt=on SME can be activated for unaffected systems on the kernel command line or more permanently using GRUB_CMDLINE_LINUX in for GRUB.

AMDGPU/RadeonSI drivers do not work
If the graphics card is not supported by including  and   alone in VIDEO_CARDS, try adding   to 's VIDEO_CARDS definition. For example:

After the values have been set update the system so the changes take effect:

Full-screen windows perform poorly
The installed version of may be too old. Try emerging an unstable version.

Pixel-wide line on left side of screen when X server is started when using a Southern Island card
Those using a Southern Island card may notice a pixel-wide line on the left of the screen in both the X server and console environments after having started a X server (This issue doesn't exist when using Linux 4.13 or newer). This is a known bug. Disabling audio through HDMI for that display resolves this issue. This may be done via:

where  should be replaced by the name of the output, obtained by running

For more information please see https://bugs.freedesktop.org/show_bug.cgi?id=97861.

External resources

 * A list of RadeonSI articles on the Phoronix site.