ATI

Owners of AMD (previously ATI) video cards have a choice between proprietary driver (catalystAUR) and the open source drivers (ATI for older or AMDGPU for newer cards). This article covers the ATI/Radeon open source driver for older cards.

The open source driver is on par performance-wise with the proprietary
driver for many cards. (See this benchmark.)

If unsure, try the open source driver first, it will suit most needs and is
generally less problematic. See the feature matrix to know what is supported for the GPU. See the decoder ring to translate marketing names (e.g. Radeon HD4330) to chip names (e.g. R700).

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 radeon module to the MODULES line in /etc/mkinitcpio.conf:

MODULES="... radeon ..."

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-radeon.conf, and add the following:

Section "Device"
Identifier "Radeon"
Driver "radeon"
EndSection

Using this section, you can enable features and tweak the driver settings.

Performance tuning

Enabling video acceleration

Driver options

Acceleration architecture; Glamor is available as a 2D acceleration method implemented through OpenGL, and it is the default for R600 (Radeon HD2000 series) and newer graphic cards. Older cards use EXA.

Option "AccelMethod" "glamor"

DRI3 is enabled by default since xf86-video-ati 7.8.0. For older drivers, which use DRI2 by default, switch to DRI3 with the following option:

Option "DRI" "3"

TearFree is a tearing prevention option which prevents tearing by using the hardware page flipping mechanism:

Option "TearFree" "on"

ColorTiling and ColorTiling2D are supposed to be enabled by default. Tiled mode can provide significant performance benefits with 3D applications. It is disabled if the DRM module is too old or if the current display configuration does not support it. KMS ColorTiling2D is only supported on R600 (Radeon HD2000 series) and newer chips:

Option "ColorTiling" "on"
Option "ColorTiling2D" "on"

When using Glamor as acceleration architecture, it is possible to enable the ShadowPrimary option, which enables a so-called "shadow primary" buffer for fast CPU access to pixel data, and separate scanout buffers for each display controller (CRTC). This may improve performance for some 2D workloads, potentially at the expense of other (e.g. 3D, video) workloads. Note that enabling this option currently disables Option "EnablePageFlip":

Option "ShadowPrimary" "on"

EXAVSync is only available when using EXA and can be enabled to avoid tearing by stalling the engine until the display controller has passed the destination region. It reduces tearing at the cost of performance and has been known to cause instability on some chips:

Option "EXAVSync" "yes"

Below is a sample configuration file of /etc/X11/xorg.conf.d/20-radeon.conf:

Tip: driconf is a tool which allows several settings to be modified: vsync, anisotropic filtering, texture compression, etc. Using this tool it is also possible to "disable Low Impact fallback" needed by some programs (e.g. Google Earth).

Gallium Heads-Up Display

The radeonsi driver supports the activation of a heads-up display (HUD) which can draw transparent graphs and text on top of applications that are rendering, such as games. These can show values such as the current frame rate or the CPU load for each CPU core or an average of all of them. The HUD is controlled by the GALLIUM_HUD environment variable, and can be passed the following list of parameters among others:

"fps" - displays current frames per second

"cpu" - displays the average CPU load

"cpu0" - displays the CPU load for the first CPU core

"cpu0+cpu1" - displays the CPU load for the first two CPU cores

"draw-calls" - displays how many times each material in an object is drawn to the screen

"requested-VRAM" - displays how much VRAM is being used on the GPU

"pixels-rendered" - displays how many pixels are being displayed

To see a full list of parameters, as well as some notes on operating GALLIUM_HUD, you can also pass the "help" parameter to a simple application such as glxgears and see the corresponding terminal output:

Hybrid graphics/AMD Dynamic Switchable Graphics

It is the technology used on recent laptops equiped with two GPUs, one power-efficent (generally Intel integrated card) and one more powerful and more power-hungry (generally Radeon or Nvidia). There are two ways to get it work:

If it is not required to run 'GPU-hungry' applications, it is possible to disable the discrete card (see Ubuntu wiki): echo OFF > /sys/kernel/debug/vgaswitcheroo/switch.

PRIME: Is a proper way to use hybrid graphics on Linux, but still requires a bit of manual intervention from the user.

Powersaving

Note: Power management is supported on all chips that include the appropriate power state tables in the vbios (R1xx and newer). "dpm" is only supported on R6xx and newer chips.

With the radeon driver, power saving is disabled by default and has to be enabled manually if desired.

Commandline Tools

Old methods

Dynamic frequency switching

This method dynamically changes the frequency depending on GPU load, so performance is ramped up when running GPU intensive apps, and ramped down when the GPU is idle. The re-clocking is attempted during vertical blanking periods, but due to the timing of the re-clocking functions, does not always complete in the blanking period, which can lead to flicker in the display. Due to this, dynpm only works when a single head is active.

It can be activated by simply running the following command:

# echo dynpm > /sys/class/drm/card0/device/power_method

Profile-based frequency switching

This method will allow you to select one of the five profiles (described below). Different profiles, for the most part, end up changing the frequency/voltage of the GPU. This method is not as aggressive, but is more stable and flicker free and works with multiple heads active.

To activate the method, run the following command:

# echo profile > /sys/class/drm/card0/device/power_method

Select one of the available profiles:

default uses the default clocks and does not change the power state. This is the default behaviour.

auto selects between mid and high power states based on the whether the system is on battery power or not.

low forces the gpu to be in the low power state all the time. Note that low can cause display problems on some laptops, which is why auto only uses low when monitors are off. Selected on other profiles when the monitors are in the DPMS-off state.

mid forces the gpu to be in the mid power state all the time.

high forces the gpu to be in the high power state all the time.

As an example, we will activate the low profile (replace low with any of the aforementioned profiles as necessary):

It depends on which GPU line yours is, however. Along with the radeon driver versions, kernel versions, etc. So it may not have much/any voltage regulation at all.

Thermal sensors are implemented via external i2c chips or via the internal thermal sensor (rv6xx-evergreen only). To get the temperature on asics that use i2c chips, you need to load the appropriate hwmon driver for the sensor used on your board (lm63, lm64, etc.). The drm will attempt to load the appropriate hwmon driver. On boards that use the internal thermal sensor, the drm will set up the hwmon interface automatically. When the appropriate driver is loaded, the temperatures can be accessed via lm_sensors tools or via sysfs in /sys/class/hwmon.

Fan Speed

While the power saving features above should handle fan speeds quite well, some cards may still be too noisy in their idle state. In this case, and when your card supports it, you can change the fan speed manually.

Warning:

Keep in mind that the following method sets the fan speed to a fixed value, hence it will not adjust with the stress of the GPU, which can lead to overheating under heavy load.

Check GPU temperature when applying lower than standard values.

Issue the following command to enable the manual adjustment of the fan speed of your graphics card (or the first GPU in case of a multi GPU setup).

# echo 1 > /sys/class/drm/card0/device/hwmon/hwmon0/pwm1_enable

Then set your desired fan speed from 0 to 255, which corresponds to 0-100% fan speed (the following command sets it to roughly 20%):

If a fixed value is not desired, there are possibilities to define a custom fan curve manually by, for example, writing a script in which fan speeds are set depending on the current temperature (current value in /sys/class/drm/card0/device/hwmon/hwmon0/temp1_input).

Multihead setup

Using the RandR extension

Independent X screens

Independent dual-headed setups can be configured the usual way. However you might want to know that the radeon driver has a "ZaphodHeads" option which allows you to bind a specific device section to an output of your choice:

This can be a life-saver, when using videocards that have more than two outputs. For instance one HDMI out, one DVI, one VGA, will only select and use HDMI+DVI outputs for the dual-head setup, unless you explicitly specify "ZaphodHeads" "VGA-0".

Turn vsync off

The radeon driver will enable vsync by default, which is perfectly fine except for benchmarking. To turn it off, create ~/.drirc (or edit it if it already exists) and add the following section:

Adding undetected/unsupported resolutions

TV showing a black border around the screen

Note: Make sure the tv has been setup correctly (see manual) before attempting the following solution.

When connecting a TV using the HDMI port, the TV may show a blurry picture with a 2-3cm border around it. This protects against overscanning (see Wikipedia:Overscan), but can be turned off using xrandr:

xrandr --output HDMI-0 --set underscan off

Black screen and no console, but X works in KMS

This is a solution to the no-console problem that might come up, when using two or more ATI cards on the same PC. Fujitsu Siemens Amilo PA 3553 laptop for example has this problem. This is due to fbcon console driver mapping itself to the wrong framebuffer device that exists on the wrong card. This can be fixed by adding this to the kernel boot line:

fbcon=map:1

This will tell the fbcon to map itself to the /dev/fb1 framebuffer dev and not the /dev/fb0, that in our case exists on the wrong graphics card. If that does not fix your problem, try booting with

ATI X1600 (RV530 series) 3D application show black windows

If this does not work, you can try adding noapic instead of pci=nomsi.

If none of the above work, then you can try running vblank_mode=0 glxgears or vblank_mode=1 glxgears to see which one works for you, then install driconf and set that option in ~/.drirc.

Cursor corruption after coming out of sleep

If the cursor becomes corrupted like it's repeating itself vertically after the monitor(s) comes out of sleep, set "SWCursor" "True" in the "Device" section of the /etc/X11/xorg.conf.d/20-radeon.conf configuration file.

DisplayPort stays black on multimonitor mode

R9-390 Poor Performance and/or Instability

Firmware issues with R9-390 series cards include poor performance and crashes (frequently caused by gaming or using Google Maps) possibly related DPM. Comment 115 of this bug report includes instructions for a fix.

QHD / UHD / 4k support over HDMI for older Radeon cards

Older cards have their pixel clock limited to 165MHz for HDMI. Hence, they do not support QHD or 4k only via dual-link DVI but not over HDMI.