Owners of '''AMD''' (previously '''ATI''') video cards have a choice between [[AMD Catalyst|proprietary driver]] ({{AUR|catalyst}}) and the open source drivers ([[ATI]] for older or [[AMDGPU]] for newer cards). This article covers the '''ATI'''/[https://wiki.freedesktop.org/xorg/radeon/ Radeon] open source driver for older cards.

+

This article covers the [https://wiki.freedesktop.org/xorg/radeon/ radeon] open source driver which supports the majority of AMD (previously ATI) GPUs.

−

−

The open source driver is ''on par'' performance-wise with the proprietary driver for many cards. (See this [http://www.phoronix.com/scan.php?page=article&item=radeonsi-cat-wow&num=1 benchmark].)

−

−

If unsure, try the open source driver first, it will suit most needs and is generally less problematic. See the [http://www.x.org/wiki/RadeonFeature feature matrix] to know what is supported for the GPU. See the [https://www.x.org/wiki/RadeonFeature/#index5h2 decoder ring] to translate marketing names (e.g. Radeon HD4330) to chip names (e.g. R700).

== Selecting the right driver ==

== Selecting the right driver ==

Depending on the card you have, find the right driver in [[Xorg#AMD]]. This page has instructions for '''ATI'''.

Depending on the card you have, find the right driver in [[Xorg#AMD]]. This page has instructions for '''ATI'''.

+

+

If unsure, try this open source driver first, it will suit most needs and is generally less problematic. See the [https://www.x.org/wiki/RadeonFeature feature matrix] to know what is supported and the [https://www.x.org/wiki/RadeonFeature/#index5h2 decoder ring] to translate marketing names (e.g. Radeon HD4330) to chip names (e.g. R700).

'''Acceleration architecture'''; Glamor is available as a 2D acceleration method implemented through OpenGL, and it [https://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=f11531c99fcd6473f58b4d10efaf3efd84304d8e is the default] for R600 (Radeon HD2000 series) and newer graphic cards. Older cards use EXA.

'''Acceleration architecture'''; Glamor is available as a 2D acceleration method implemented through OpenGL, and it [https://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=f11531c99fcd6473f58b4d10efaf3efd84304d8e is the default] for R600 (Radeon HD2000 series) and newer graphic cards. Older cards use EXA.

Line 89:

Line 85:

Option "AccelMethod" "glamor"

Option "AccelMethod" "glamor"

−

'''DRI3''' is enabled by default [http://www.phoronix.com/scan.php?page=news_item&px=Radeon-AMDGPU-1.19-Updates since xf86-video-ati 7.8.0]. For older drivers, which use DRI2 by default, switch to DRI3 with the following option:

+

'''DRI3''' is enabled by default [https://www.phoronix.com/scan.php?page=news_item&px=Radeon-AMDGPU-1.19-Updates 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"

Option "DRI" "3"

−

'''TearFree''' is a tearing prevention option which prevents tearing by using the hardware page flipping mechanism. Enabling this option currently disables Option "EnablePageFlip":

+

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

Option "TearFree" "on"

Option "TearFree" "on"

Line 129:

Line 125:

{{Tip|You may want to debug the new parameters with {{ic|systool}} as stated in [[Kernel modules#Obtaining information]].}}

{{Tip|You may want to debug the new parameters with {{ic|systool}} as stated in [[Kernel modules#Obtaining information]].}}

−

Defining the '''gartsize''', if not autodetected, can be done by adding {{ic|1=radeon.gartsize=32}} as a [[kernel parameters|kernel parameter]].

+

Defining the '''gartsize''', if not autodetected, can be done by adding {{ic|1=radeon.gartsize=32}} as a [[kernel parameter]].

{{Note|Setting this parameter should not be needed anymore with modern AMD video cards:

{{Note|Setting this parameter should not be needed anymore with modern AMD video cards:

Line 145:

Line 141:

Since kernel 3.6, PCI Express 2.0 in '''radeon''' is turned on by default.

Since kernel 3.6, PCI Express 2.0 in '''radeon''' is turned on by default.

−

It may be unstable with some motherboards. It can be deactivated by adding {{ic|1=radeon.pcie_gen2=0}} as a [[kernel parameters|kernel parameter]].

+

It may be unstable with some motherboards. It can be deactivated by adding {{ic|1=radeon.pcie_gen2=0}} as a [[kernel parameter]].

−

See [http://www.phoronix.com/scan.php?page=article&item=amd_pcie_gen2&num=1 Phoronix article] for more information.

+

See [https://www.phoronix.com/scan.php?page=article&item=amd_pcie_gen2&num=1 Phoronix article] for more information.

=== Gallium Heads-Up Display ===

=== 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:

+

The radeon 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

*"fps" - displays current frames per second

*"cpu" - displays the average CPU load

*"cpu" - displays the average CPU load

Line 163:

Line 159:

{{bc|1=# GALLIUM_HUD="help" glxgears }}

{{bc|1=# GALLIUM_HUD="help" glxgears }}

−

More information can be found from this [http://lists.freedesktop.org/archives/mesa-dev/2013-March/036586.html mailing list post] or [https://kparal.wordpress.com/2014/03/03/fraps-like-fps-overlay-for-linux/ this blog post].

+

More information can be found from this [https://lists.freedesktop.org/archives/mesa-dev/2013-March/036586.html mailing list post] or [https://kparal.wordpress.com/2014/03/03/fraps-like-fps-overlay-for-linux/ this blog post].

== Hybrid graphics/AMD Dynamic Switchable Graphics ==

== Hybrid graphics/AMD Dynamic Switchable Graphics ==

Line 183:

Line 179:

# [[#Profile-based frequency switching|profile]]

# [[#Profile-based frequency switching|profile]]

−

See http://www.x.org/wiki/RadeonFeature/#index3h2 for more details.

+

See https://www.x.org/wiki/RadeonFeature/#index3h2 for more details.

=== Dynamic power management ===

=== Dynamic power management ===

−

Since kernel 3.13, DPM is enabled by default for [http://kernelnewbies.org/Linux_3.13#head-f95c198f6fdc7defe36f470dc8369cf0e16898df lots of AMD Radeon hardware]. If you want to disable it, add the parameter {{ic|1=radeon.dpm=0}} to the [[kernel parameters]].

+

Since kernel 3.13, DPM is enabled by default for [https://kernelnewbies.org/Linux_3.13#head-f95c198f6fdc7defe36f470dc8369cf0e16898df lots of AMD Radeon hardware]. If you want to disable it, add the parameter {{ic|1=radeon.dpm=0}} to the [[kernel parameters]].

+

+

{{Tip| DPM works on R6xx gpus, but is not enabled by default in the kernel (only R7xx and up). Setting the {{ic|1=radeon.dpm=1}} kernel parameter will enable dpm.}}

Unlike [[#Dynamic frequency switching|dynpm]], the "dpm" method uses hardware on the GPU to dynamically change the clocks and voltage based on GPU load. It also enables clock and power gating.

Unlike [[#Dynamic frequency switching|dynpm]], the "dpm" method uses hardware on the GPU to dynamically change the clocks and voltage based on GPU load. It also enables clock and power gating.

Line 241:

Line 239:

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

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

−

==== Persistent configuration ====

+

=== Persistent configuration ===

−

The activation described above is not persistent, it will not last when the computer is rebooted. To make it persistent, you can use [[systemd#Temporary files|systemd-tmpfiles]] (example for [[#Dynamic frequency switching]]):

+

The methods described above are not persistent. To make them persistent, you may create a [[udev]] rule (example for [[#Profile-based frequency switching]]):

* {{App|Radeon-tray|A small program to control the power profiles of your Radeon card via systray icon. It is written in PyQt4 and is suitable for non-Gnome users.|https://github.com/StuntsPT/Radeon-tray|{{AUR|radeon-tray}}}}

* {{App|Radeon-tray|A small program to control the power profiles of your Radeon card via systray icon. It is written in PyQt4 and is suitable for non-Gnome users.|https://github.com/StuntsPT/Radeon-tray|{{AUR|radeon-tray}}}}

Line 285:

Line 283:

}}

}}

−

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).

+

To control the GPU fan, see [[Fan speed control#AMDGPU sysfs fan control]] (amdgpu and radeon share the same controls for this).

−

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

+

For persistence, see the example in [[#Persistent configuration]].

−

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 {{ic|/sys/class/drm/card0/device/hwmon/hwmon0/temp1_input}}).

−

−

# echo 55 > /sys/class/drm/card0/device/hwmon/hwmon0/pwm1

−

−

For persistence, use systemd-tmpfiles as shown above by the example with power profiles. If the latter doesn't work (see the note in [[systemd#Temporary files|systemd-tmpfiles]] for the reason) you can use a udev rule to issue the commands when the card becomes active. Here is an example of a possible rule {{ic|/etc/udev/rules.d/99-gpupower}}:

If a fixed speed-value isn't 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 {{ic|/sys/class/drm/card0/device/hwmon/hwmon0/temp1_input}}).

A GUI solution is available by installing {{AUR|radeon-profile-git}}.

A GUI solution is available by installing {{AUR|radeon-profile-git}}.

Line 392:

Line 378:

== Turn vsync off ==

== Turn vsync off ==

−

{{Out of date|Is this still valid with DRI3? (which is default)}}

+

−

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

+

The radeon driver will probably enable vsync by default, which is perfectly fine except for benchmarking. To turn it off try the {{ic|1=vblank_mode=0}} [[environment variable]] or create {{ic|~/.drirc}} (edit it if it already exists) and add the following:

{{hc|~/.drirc|<nowiki>

{{hc|~/.drirc|<nowiki>

<driconf>

<driconf>

Line 404:

Line 390:

</driconf>

</driconf>

</nowiki>}}

</nowiki>}}

−

Make sure the driver is '''dri2''', not your video card code (like r600).

−

{{Accuracy|If the above does not work, please file a bug report. Also, why is the {{ic|SwapbuffersWait}} option relevant here?}}

Selecting the right driver

Depending on the card you have, find the right driver in Xorg#AMD. This page has instructions for ATI.

If unsure, try this open source driver first, it will suit most needs and is generally less problematic. See the feature matrix to know what is supported and 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:

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 radeon 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.

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 probably enable vsync by default, which is perfectly fine except for benchmarking. To turn it off try the vblank_mode=0environment variable or create ~/.drirc (edit it if it already exists) and add the following:

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.