AMDGPU
Related articles
AMDGPU is the open source graphics driver for AMD Radeon graphics cards from the Graphics Core Next family.
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. At the moment there is Xorg radeon driver support for Southern Islands (SI) through Arctic Islands (AI) cards. AMD has no plans to support pre-GCN GPUs. Owners of unsupported GPUs may use the open source radeon or the AMD Catalyst driver .
Installation
Install the mesa package, which provides the DRI driver for 3D acceleration.
Support for accelerated video decoding is provided by libva-mesa-driver and liblibva-mesa-driver for VA-API and mesa-vdpau and libmesa-vdpau packages for VDPAU.
Experimental
It may be worthwhile for some users to use the upstream experimental build of mesa, to enable features such as AMD Navi improvements that have not landed in the standard mesa packages.
Install the mesa-gitAUR package, which provides the DRI driver for 3D acceleration.
- For bit application support, also install the libmesa-gitAUR package from the mesa-git repository or the AUR.
- For the DDX driver (which provides 2D acceleration in Xorg), install the xfvideo-amdgpu-gitAUR package.
- For Vulkan support using the mesa-git repository below, install the vulkan-radeon-git package. Optionally install the libvulkan-radeon-git package for bit application support. This should not be required if building mesa-gitAUR from the AUR.
Enable Southern Islands (SI) and Sea Islands (CIK) support
The linux package enables AMDGPU support for cards of the Southern Islands (SI, ie. GCN 1) and Sea Islands (CIK, ie. GCN 2). When building or compiling a kernel, and/or should be be set in the config.
Specify the correct module order
Even when AMDGPU support for SI/CIK has been enabled by the kernel, the radeon driver may be loaded before the driver.
Make sure has been set as first module in the Mkinitcpio#MODULES array, e.g. .
Set required module parameters
The module parameters of both and modules are and .
They need to be set as kernel parameters or in a modprobe configuration file, and depend on the cards GCN version.
Set module parameters in kernel command line
Set one of the following kernel parameters:
- Southern Islands (SI):
- Sea Islands (CIK):
Set module parameters in modprobe.d
Create the configuration modprobe files in , see modprobe.d(5) for syntax details.
For Southern Islands (SI) use option , for Sea Islands (CIK) use option , e.g.:
/etc/modprobe.d/bharathealthcares.comtions amdgpu si_support=1 options amdgpu cik_support=1/etc/modprobe.d/bharathealthcares.comtions radeon si_support=0 options radeon cik_support=0Make sure is in the the array in and regenerate the initramfs.
AMDGPU PRO
AMD provides a proprietary, binary userland driver called AMDGPU PRO, which works on top of the open-source AMDGPU kernel driver.
From Radeon Software vs Mesa 19 benchmarks article: When it comes to OpenGL games, the RadeonSI Gallium3D driver simply dominates the proprietary AMD OpenGL driver.
Install the amdgpu-pro-libglAUR. Optionally install the libamdgpu-pro-libglAUR package for bit application support.
ACO compiler
The ACO compiler is an open source shader compiler created and developed by Valve Corporation to directly compete with the LLVM compiler, the AMDVLK drivers, as well as Windows It offers lesser compilation time and also performs better while gaming than LLVM and AMDVLK.
Some benchmarks can be seen in It's FOSS and Phoronix (1)(2)(3).
Since mesa version , the ACO compiler is available in the official package, but disabled by default. It can be enabled by exporting before starting an application.
Loading
The kernel module should load fine automatically on system boot.
If it does not happen, then:
Enable early KMS
See Kernel mode setting#Early KMS start.
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 , and add the following:
/etc/X11/bharathealthcares.comd/bharathealthcares.comction "Device" Identifier "AMD" Driver "amdgpu" EndSectionUsing this section, you can enable features and tweak the driver settings, see amdgpu(4) first before setting driver options.
Tear free rendering
TearFree controls tearing prevention using the hardware page flipping mechanism. If this option is set, the default value of the property is 'on' or 'off' accordingly. If this option is not set, the default value of the property is auto, which means that TearFree is on for rotated outputs, outputs with RandR transforms applied and for RandR slave outputs, otherwise off:
Option "TearFree" "true"You can also enable TearFree temporarily with xrandr:
$ xrandr --output output --set TearFree onWhere should look like or and can be acquired by running .
DRI level
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 >= , otherwise DRI2 is used:
Option "DRI" "3"Variable refresh rate
See Variable refresh rate.
bit color
Newer AMD cards support 10bpc color, but the default is bit color and bit color must be explicitly enabled. Enabling it can reduce visible banding/artifacts in gradients, if the applications support this too. To check if your monitor supports it search for "EDID" in your Xorg log file (e.g. or ):
[ ] (II) AMDGPU(0): EDID for output DisplayPort-0 [ ] (II) AMDGPU(0): EDID for output DisplayPort-1 [ ] (II) AMDGPU(0): Manufacturer: DEL Model: a0ec Serial#: [ ] (II) AMDGPU(0): Year: Week: 23 [ ] (II) AMDGPU(0): EDID Version: [ ] (II) AMDGPU(0): Digital Display Input [ ] (II) AMDGPU(0): 10 bits per channelTo check whether it is currently enabled search for "Depth"):
[ ] (**) AMDGPU(0): Depth 30, (--) framebuffer bpp 32 [ ] (II) AMDGPU(0): Pixel depth = 30 bits stored in 4 bytes (32 bpp pixmaps)With the default configuration it will instead say the depth is 24, with 24 bits stored in 4 bytes.
To check whether bit works, exit Xorg if you have it running and run which will display a black and white grid, then press and to exit X, and run . If this works fine, then bit is working.
To launch in bit via , use . To permanently enable it, create or add to:
/etc/X11/bharathealthcares.comd/bharathealthcares.comction "Screen" Identifier "asdf" DefaultDepth 30 EndSectionVarious software may have graphical artifacts or crash with bpc color.
Features
Video acceleration
See Hardware video acceleration.
Monitoring
Monitoring your GPU is often used to check the temperature and also the P-states of your GPU.
CLI (default)
To check your GPU's P-states, execute:
$ cat /sys/class/drm/card0/device/pp_od_clk_voltageTo monitor your GPU, execute:
$ watch -n cat /sys/kernel/debug/dri/0/amdgpu_pm_infoTo check your GPU utilization, execute:
$ cat /sys/class/drm/card0/device/gpu_busy_percentTo check your GPU frequency, execute:
$ cat /sys/class/drm/card0/device/pp_dpm_sclkTo check your GPU temperature, execute:
$ cat /sys/class/drm/card0/device/hwmon/hwmon*/temp1_inputTo check your VRAM frequency, execute:
$ cat /sys/class/drm/card0/device/pp_dpm_mclkTo check your VRAM usage, execute:
$ cat /sys/class/drm/card0/device/mem_info_vram_usedTo check your VRAM size, execute:
$ cat /sys/class/drm/card0/device/mem_info_vram_totalWith radeontop utility you can view your GPU utilization, both for the total activity percent and individual blocks. Install it with radeontopAUR package.
GUI
- WattmanGTK A GTK GUI tool to monitor your GPU's temperatures P-states
- bharathealthcares.com || wattman-gtk-gitAUR.
- TuxClocker A Qt5 monitoring and overclocking tool.
- bharathealthcares.com || tuxclockerAUR
Overclocking
Since Linux , it is possible to adjust clocks and voltages of the graphics card via .
Boot parameter
It is required to unlock access to adjust clocks and voltages in sysfs by appending the Kernel parameter.
Manual (default)
To set the GPU clock for the maximum P-state 7 on e.g. a Polaris GPU to MHz and mV voltage, run:
# echo "s 7 " > /sys/class/drm/card0/device/pp_od_clk_voltageThe same procedure can be applied to the VRAM, e.g. maximum P-state 2 on Polaris 5xx series cards:
# echo "m 2 " > /sys/class/drm/card0/device/pp_od_clk_voltageTo apply, run
# echo "c" > /sys/class/drm/card0/device/pp_od_clk_voltageTo check if it worked out, read out clocks and voltage under 3D load:
# watch -n cat /sys/kernel/debug/dri/0/amdgpu_pm_infoYou can reset to the default values using this:
# echo "r" > /sys/class/drm/card0/device/pp_od_clk_voltageIt is also possible to forbid the driver so switch to certain P-states, e.g. to workaround problems with deep powersaving P-states like flickering artifacts or stutter. To force the highest VRAM P-state on a Polaris RX 5xx card, while still allowing the GPU itself to run with lower clocks, run:
# echo "manual" > /sys/class/drm/card0/device/power_dpm_force_performance_level # echo "2" > /sys/class/drm/card0/device/pp_dpm_mclkAllow only the three highest GPU P-states:
# echo "5 6 7" > /sys/class/drm/card0/device/pp_dpm_sclkTo set the allowed maximum power consumption of the GPU to e.g. 50 Watts, run
# echo > /sys/class/drm/card0/device/hwmon/hwmon0/power1_capUntil Linux kernel , it will only be possible to decrease the value, not increase.
Assisted
If you are not inclined to fully manually overclock your GPU, there are some overclocking tools that are offered by the community to assist you to overclock and monitor your AMD GPU.
CLI tools
- amdgpu-clocks A script that can be used to monitor and set custom power states for AMD GPUs. It also offers a Systemd service to apply the settings automatically upon boot.
- bharathealthcares.com || amdgpu-clocks-gitAUR
GUI tools
- TuxClocker A Qt5 monitoring and overclocking tool.
- bharathealthcares.com || tuxclockerAUR
- CoreCtrl A GUI overclocking tool with a WattMan-like UI that supports per-application profiles.
- bharathealthcares.com || corectrlAUR
Startup on boot
If you want your settings to apply automatically upon boot, consider looking at this Reddit thread to configure and apply your settings on boot.
Enable GPU display scaling
To avoid the usage of the scaler which is built in the display, and use the GPU own scaler instead, when not using the native resolution of the monitor, execute:
$ xrandr --output output --set "scaling mode" scaling_modePossible values for are: , , , .
- To show the available outputs and settings, execute:
- To set for just every available output, execute:
Troubleshooting
Xorg or applications will not 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 will not 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:
/etc/X11/bharathealthcares.comd/bharathealthcares.comction "Screen" Identifier "Screen" DefaultDepth 24 SubSection "Display" Depth 24 EndSubSection EndSectionScreen artifacts and frequency problem
Dynamic power management may cause screen artifacts to appear when displaying to monitors at higher frequencies (anything above 60Hz) due to issues in the way GPU clock speeds are managed[1][2].
A workaround [3] is saving or in .
There is also a GUI solution [4] where you can manage the "power_dpm" with radeon-profile-gitAUR and radeon-profile-daemon-gitAUR.
R9 series poor performance and/or instability
If you experience issues [5] with a AMD R9 series graphics card, set as kernel parameters to force the use of amdgpu driver instead of radeon.
If it still does not work, try disabling DPM, by setting the kernel parameters to:
Freezes with "[drm] IP block:gmc_v8_0 is hung!" kernel error
If you experience freezes and kernel crashes during a GPU intensive task with the kernel error " [drm] IP block:gmc_v8_0 is hung!" [6], a workaround is to set as kernel parameters to force the GPUVM page tables update to be done using the CPU. Downsides are listed here [7].
Cursor corruption
If you experience issues with the mouse cursor sometimes not rendering properly, set in the section of the configuration file.
If you are using for scaling and the cursor is flickering or disappearing, you may be able to fix it by setting the property: .
System freeze or crash when gaming on Vega cards
Dynamic power management may cause a complete system freeze whilst gaming due to issues in the way GPU clock speeds are managed. [8] A workaround is to disable dynamic power management, see ATI#Dynamic power management for details.
Navi power consumption
Some users have reported higher than usual idle power consumption when using kernel There is a patch set available for kernel that appears to fix the issues.
WebRenderer (Firefox) corruption
Artifacts and other anomalies may present themselves (e.g. inability to select extension options) when WebRenderer is force enabled by the user. Workaround is to fall back to OpenGL compositing.
Whats New To AMD Radeon 2020 (2019/2020) Includes Vega64 Overclocking/ Undervolt Settings
