Differences between revisions 60 and 82 (spanning 22 versions)
Revision 60 as of 2015-12-10 16:47:44
Size: 6409
Editor: BenHutchings
Comment: Refer to official httpredir.debian.org instead of http.debian.net
Revision 82 as of 2021-01-11 18:45:40
Size: 9506
Comment: ACO is now enabled by default in Mesa 20.3 which Bullseye will likely ship with, and it wasn't available in Buster in the first place, so remove its section. Correct the necessary firmware package.
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[fr/AtiHowTo|Français]] - [[it/AtiHowTo|Italiano]] - [[ru/AtiHowTo|Русский]] -~ ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[es/AtiHowTo|español]] - [[fr/AtiHowTo|Français]] - [[it/AtiHowTo|Italiano]] - [[ru/AtiHowTo|Русский]] -~
Line 4: Line 4:
= AMD/ATI Open Source Drivers (radeon, r128, mach64) =
This page describes use of the open source display drivers for ATI/AMD graphics hardware on Debian systems. For information on the proprietary driver, see [[ATIProprietary]].
= AMD/ATI Drivers (amdgpu, radeon, r128, mach64) =
This page describes the process of installing and configuring the display drivers for ATI/AMD graphics hardware on Debian systems.
Line 22: Line 22:
Support for AMD (nee ATI) graphics hardware is provided by the DebianPkg:xserver-xorg-video-ati driver wrapper package, which depends on three hardware-specific driver packages: Support for newer AMD graphics hardware is provided by the DebianPkg:xserver-xorg-video-amdgpu package. This will officially cover any cards that are part of GCN 1.2 ("GCN 3rd generation") or newer. This generation consists of most chips released after June 2015. GCN 1.0 and GCN 1.1 cards (Manufactured January 2012 to June 2015) are supported experimentally and require extra kernel parameters to be set, as documented in the [[#gcn1011|experimental section.]]

Support for GCN 1.1 and older chips is also provided by the DebianPkg:xserver-xorg-video-ati driver wrapper package, which depends on three hardware-specific driver packages:
Line 28: Line 30:
The ati wrapper driver autodetects whether your hardware has a Radeon, Rage 128, or Mach64 or earlier chip and load the radeon, r128, or mach64 xorg video driver as appropriate. The ATI driver package will autodetect whether your hardware has a Radeon, Rage 128, or Mach64 and earlier chip and load the {{{radeon}}}, {{{r128}}}, or {{{mach64}}} video driver as appropriate. 
Line 30: Line 32:
<<Anchor((Supported Cards))>>
=== Supported Devices ===

The radeon driver in [[DebianJessie|Debian 8 "Jessie"]] supports R100 to Hawaii (Radeon 7000 - Radeon R9 290) GPUs. See the [[DebianMan:4/radeon|radeon(4)]] manual page and the [[http://x.org/wiki/radeon|radeon page]] on the X wiki for more information.
Since the AMDGPU driver overlaps with the older Radeon driver for supporting GCN 1.0/1.1 GPUs, either driver can be used. The older Radeon driver does not support Vulkan or the ACO compiler and is often slower, but it is much more stable and is used by default.
Line 38: Line 37:
Proprietary, binary-only firmware (aka microcode) was removed from the Debian kernel's radeon DRM driver in [[DebianPkg:src:linux-2.6|linux-2.6]] 2.6.29-1, to resolve Debian bug DebianBug:494009. The firmware can be provided by installing the DebianPkg:firmware-linux-nonfree package. Proprietary, binary-only firmware (also known as microcode) is not allowed in the main Debian repo as per the Debian Free Software Guidelines The firmware can be obtained by installing the DebianPkg:firmware-amd-graphics package as long as the non-free component is enabled in your [[SourcesList]] file. The installation instructions below this section will document adding this component and installing the necessary firmware.
Line 40: Line 39:
Without this package installed, poor 2D/3D performance in the radeon driver is commonly experienced.  Some GPUs may require firmware to operate the X Window System. Without this package installed, poor 2D/3D performance is commonly experienced. Some GPUs may require firmware to function properly at all.
Line 44: Line 43:
The following procedure will install the open source display driver packages, DRI modules (for 3D acceleration) and driver firmware/microcode: The following procedure will install the open-source display driver packages, DRI modules (for 3D acceleration), and driver firmware/microcode. It installs the Xorg video driver metapackage which includes all drivers. Your system will automatically select which one to use on boot. If your card is supported by both AMDGPU and Radeon (such as the GCN 1.0/1.1 series), it will default to {{{radeon}}}. You can view instructions for using the newer driver [[#gcn1011|here]]

In the following instructions, {{{#}}} indicates the command must be run as root. On systems where it's configured, you may replace it with {{{sudo}}}. Otherwise, if you're logged in as root, omit it entirely.

 1. If you have previously used the non-free [[NvidiaGraphicsDrivers|NVIDIA proprietary]] driver, then you need to uninstall it if you wish to now use the accelerated AMD driver. The easiest way is to use the command: {{{
 # apt purge *nvidia*
}}}
 Don't forget to type the asterisks enclosing {{{nvidia}}} as this erases every package with "nvidia" in its name.
Line 47: Line 53:
# Debian 8 "Jessie"
deb http://httpredir.debian.org/debian/ jessie main contrib non-free
# Debian 10 "Buster"
deb http://deb.debian.org/debian buster main contrib non-free
Line 51: Line 57:
# apt-get update # apt update
Line 53: Line 59:
 1. Install the DebianPkg:firmware-linux-nonfree, DebianPkg:libgl1-mesa-dri and DebianPkg:xserver-xorg-video-ati packages: {{{
# apt-get install firmware-linux-nonfree libgl1-mesa-dri xserver-xorg-video-ati
 1. Install the DebianPkg:firmware-amd-graphics, DebianPkg:libgl1-mesa-dri, DebianPkg:libglx-mesa0, DebianPkg:mesa-vulkan-drivers, and DebianPkg:xserver-xorg-video-all packages: {{{
# apt-get install firmware-amd-graphics libgl1-mesa-dri libglx-mesa0 mesa-vulkan-drivers xserver-xorg-video-all
Line 56: Line 62:
 1. Restart your system to load GPU device firmware.  1. Restart your system to load the newly installed driver.
Line 58: Line 64:
== 32-bit support ==

Games that are installed from [[Steam]], or are running in [[Wine]], or are both at the same time with the advent of Valve's Proton, may all require 32-bit graphics libraries at some point or another when trying to run 32-bit games. This can be done by enabling [[Multiarch/HOWTO|multiarch]] and installing the appropriate libraries. Note that the following guide assumes that your user is configured to use [[sudo]] which some forms of installation may not do by default, make necessary adjustments if so.

First, to enable 32-bit support and update your repos as appropriate:
{{{
sudo dpkg --add-architecture i386 && sudo apt update
}}}
Then, to install the relevant libraries:
{{{
sudo apt install libglx-mesa0:i386 mesa-vulkan-drivers:i386 libgl1-mesa-dri:i386
}}}
Then, you may need to restart the relevant applications for them to load the new libraries. After which, there should be no problem.

== Experimental options ==

<<Anchor(gcn1011)>>
=== AMDGPU/Vulkan on older cards ===

If your graphics card is built on GCN 1.0 or GCN 1.1 (also known as being from the "Southern Islands" or "Sea Islands" card families), you may enable experimental AMDGPU support in order to see potentially better performance and Vulkan support.

Follow the normal installation instructions first, and then open the {{{/etc/default/grub}}} file in your text editor of choice. Note that it requires admin permissions to edit, so you will either need to open the text editor with {{{sudo}}} or use one such as Kate that supports !PolKit permissions.

Within the quotes on the line that starts with {{{GRUB_CMDLINE_LINUX_DEFAULT}}}, add the options {{{radeon.si_support=0 amdgpu.si_support=1}}} for Southern Islands (GCN 1.0) cards, or {{{radeon.cik_support=0 amdgpu.cik_support=1}}} for Sea Islands (GCN 1.1) cards.

For example, if you were using a GCN 1.1 card, the final line may look similar to:
{{{
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.cik_support=0 amdgpu.cik_support=1"
}}}

Furthermore, if you are using an AMD A10 APU with an integrated Sea Island (GCN 1.1) card, you may have to disable Radeon Dynamic Power Management to get a proper boot. This is a feature that dynamically re-clocks the graphics core in order to keep the APU cooler and quieter, however for kernel versions 4.x.x and 5.x.x, this feature may put you in an infinite restart loop. To disable it, following the instructions above, add {{{radeon.dpm=0}}} to the boot options.

After editing and applying the changes, run {{{sudo update-grub2}}} and reboot your system. If all goes well, it should be using the new driver.
Line 62: Line 101:
$ dmesg | grep -E 'drm|radeon' | grep -iE 'firmware|microcode' dmesg | grep -E 'drm|radeon' | grep -iE 'firmware|microcode'
Line 71: Line 110:
  * If files were unable to be loaded, ensure the DebianPkg:firmware-linux-nonfree package is installed (refer to [[#Installation|Installation]]).
* If files were unable to be loaded, ensure the DebianPkg:firmware-amd-graphics package is installed (refer to [[#Installation|Installation]]).
Line 75: Line 115:
<<Anchor(configure)>>
<<Anchor(Editing /etc/X11/xorg.conf)>>
== Configuration ==
== Hybrid Graphics ==
AMD ships hybrid graphics that may have an AMD graphics card combined with one of a different kind. Without proper support, the cards may run inefficiently, only using one or the other or even activating both at the same time which causes excessive power consumption.
Line 79: Line 118:
In most cases, manual configuration for the open source display drivers is '''not required''', as the Xorg X server automatically detects and configures available hardware. Debian Stretch and newer come with a Mesa version which supports [[http://dri.freedesktop.org/wiki/|DRI]] Offloading.
Make sure all necessary drivers are installed. It also needs the DebianPkg:firmware-amd-graphics package to be installed.
Line 81: Line 121:
----

The following optional configuration can be used to increase 3D performance. See the [[DebianMan:5/xorg.conf|xorg.conf(5)]] and [[DebianMan:4/radeon|radeon(4)]] manual pages for more information.

 ~- {{{
Section "Device"
 Driver "radeon"
 Identifier "My GPU"
 ...
 Option "AccelMethod" "XAA"
 # XAA/EXA
 Option "AccelDFS" "1"
 # 1/0 On for PCIE, off for AGP
 # Manpage: Use or don't use accelerated EXA DownloadFromScreen hook
 # when possible.
 Option "AGPMode" "1"
 # 1-8 Does not affect PCIE models.
 Option "AGPFastWrite" "1"
 # 1/0 Does not affect PCIE models. Not recommended.
 Option "GARTSize" "64"
 # 0-64 Megabytes of gart (system) memory used.
 # Wrongly defaults to 8MB sometimes, see your logfile.
 # Bigger seems better.
 Option "EnablePageFlip" "1"
 # 1/0 Increases 3D performance substantially
 # seemingly in XAA mode only
 Option "ColorTiling" "1"
 # 1/0 Increases 3D performance substantially
 # affected stability only positively on my system
EndSection
}}} -~

== Hybrid Graphics ==
AMD ships hybrid graphics with Intel cards . Both the cards get turned on in turn overheating the computer and it also makes lot of noise.

=== Debian Stretch (testing) ===
Debian Stretch comes with the latest MESA version which supports [[http://dri.freedesktop.org/wiki/|DRI]] Offloading.
Make sure both Intel and radeon drivers are installed. It also needs firmware-linux-nonfree package to get it to work.

Check if both the cards are getting listed :
Check if both the cards are getting listed:
Line 123: Line 123:
$ xrandr --listproviders xrandr --listproviders
Line 126: Line 126:
The above listing should give both the names of the cards and the associated drivers.
Inorder to have the Radeon card handle the graphic intensive process use
The above listing should give both the names of the cards and the associated drivers. Assuming you're using a dedicated chip that uses the {{{radeon}}} and an integrated Intel card for example that's using the {{{intel}}} driver, you may set:
Line 130: Line 128:
$ xrandr --setprovideroffloadsink radeon Intel xrandr --setprovideroffloadsink radeon Intel
Line 133: Line 131:
You can test the settings where the output should be AMD You can test the settings with the command:
{{{
DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
}}}
W
here the output should be AMD.
Line 135: Line 137:
{{{
$ DRI_PRIME=1 glxinfo | grep "OpenGL renderer"
}}}

So using the option DRI_PRIME you could run 3D/games/movies which need extra graphic power.
Line 142: Line 139:
 * [[ATIProprietary]] - Installing the closed source proprietary driver  * [[ATIProprietary]] - Installing the closed-source proprietary driver, '''not recommended or supported on versions newer than Debian 8/Jessie'''
Line 148: Line 145:

----
CategoryHardware CategoryVideo

Translation(s): English - español - Français - Italiano - Русский


AMD/ATI Drivers (amdgpu, radeon, r128, mach64)

This page describes the process of installing and configuring the display drivers for ATI/AMD graphics hardware on Debian systems.

Identification

The AMD/ATI graphics processing unit (GPU) series/codename of an installed video card can usually be identified using the lspci command. For example:

  • $ lspci -nn | grep VGA
    01:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Barts PRO [Radeon HD 6850] [1002:6739]

See HowToIdentifyADevice/PCI for more information.

Drivers

Support for newer AMD graphics hardware is provided by the xserver-xorg-video-amdgpu package. This will officially cover any cards that are part of GCN 1.2 ("GCN 3rd generation") or newer. This generation consists of most chips released after June 2015. GCN 1.0 and GCN 1.1 cards (Manufactured January 2012 to June 2015) are supported experimentally and require extra kernel parameters to be set, as documented in the experimental section.

Support for GCN 1.1 and older chips is also provided by the xserver-xorg-video-ati driver wrapper package, which depends on three hardware-specific driver packages:

The ATI driver package will autodetect whether your hardware has a Radeon, Rage 128, or Mach64 and earlier chip and load the radeon, r128, or mach64 video driver as appropriate.

Since the AMDGPU driver overlaps with the older Radeon driver for supporting GCN 1.0/1.1 GPUs, either driver can be used. The older Radeon driver does not support Vulkan or the ACO compiler and is often slower, but it is much more stable and is used by default.

Firmware

Proprietary, binary-only firmware (also known as microcode) is not allowed in the main Debian repo as per the Debian Free Software Guidelines The firmware can be obtained by installing the firmware-amd-graphics package as long as the non-free component is enabled in your SourcesList file. The installation instructions below this section will document adding this component and installing the necessary firmware.

Without this package installed, poor 2D/3D performance is commonly experienced. Some GPUs may require firmware to function properly at all.

Installation

The following procedure will install the open-source display driver packages, DRI modules (for 3D acceleration), and driver firmware/microcode. It installs the Xorg video driver metapackage which includes all drivers. Your system will automatically select which one to use on boot. If your card is supported by both AMDGPU and Radeon (such as the GCN 1.0/1.1 series), it will default to radeon. You can view instructions for using the newer driver here

In the following instructions, # indicates the command must be run as root. On systems where it's configured, you may replace it with sudo. Otherwise, if you're logged in as root, omit it entirely.

  1. If you have previously used the non-free NVIDIA proprietary driver, then you need to uninstall it if you wish to now use the accelerated AMD driver. The easiest way is to use the command:

     # apt purge *nvidia*

    Don't forget to type the asterisks enclosing nvidia as this erases every package with "nvidia" in its name.

  2. Add "contrib" and "non-free" components to /etc/apt/sources.list, for example:

    # Debian 10 "Buster"
    deb http://deb.debian.org/debian buster main contrib non-free
  3. Update the list of available packages:

    # apt update
  4. Install the firmware-amd-graphics, libgl1-mesa-dri, libglx-mesa0, mesa-vulkan-drivers, and xserver-xorg-video-all packages:

    # apt-get install firmware-amd-graphics libgl1-mesa-dri libglx-mesa0 mesa-vulkan-drivers xserver-xorg-video-all
  5. Restart your system to load the newly installed driver.

32-bit support

Games that are installed from Steam, or are running in Wine, or are both at the same time with the advent of Valve's Proton, may all require 32-bit graphics libraries at some point or another when trying to run 32-bit games. This can be done by enabling multiarch and installing the appropriate libraries. Note that the following guide assumes that your user is configured to use sudo which some forms of installation may not do by default, make necessary adjustments if so.

First, to enable 32-bit support and update your repos as appropriate:

sudo dpkg --add-architecture i386 && sudo apt update

Then, to install the relevant libraries:

sudo apt install libglx-mesa0:i386 mesa-vulkan-drivers:i386 libgl1-mesa-dri:i386

Then, you may need to restart the relevant applications for them to load the new libraries. After which, there should be no problem.

Experimental options

AMDGPU/Vulkan on older cards

If your graphics card is built on GCN 1.0 or GCN 1.1 (also known as being from the "Southern Islands" or "Sea Islands" card families), you may enable experimental AMDGPU support in order to see potentially better performance and Vulkan support.

Follow the normal installation instructions first, and then open the /etc/default/grub file in your text editor of choice. Note that it requires admin permissions to edit, so you will either need to open the text editor with sudo or use one such as Kate that supports PolKit permissions.

Within the quotes on the line that starts with GRUB_CMDLINE_LINUX_DEFAULT, add the options radeon.si_support=0 amdgpu.si_support=1 for Southern Islands (GCN 1.0) cards, or radeon.cik_support=0 amdgpu.cik_support=1 for Sea Islands (GCN 1.1) cards.

For example, if you were using a GCN 1.1 card, the final line may look similar to:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.cik_support=0 amdgpu.cik_support=1"

Furthermore, if you are using an AMD A10 APU with an integrated Sea Island (GCN 1.1) card, you may have to disable Radeon Dynamic Power Management to get a proper boot. This is a feature that dynamically re-clocks the graphics core in order to keep the APU cooler and quieter, however for kernel versions 4.x.x and 5.x.x, this feature may put you in an infinite restart loop. To disable it, following the instructions above, add radeon.dpm=0 to the boot options.

After editing and applying the changes, run sudo update-grub2 and reboot your system. If all goes well, it should be using the new driver.

Troubleshooting

  • Use of firmware/microcode used by the radeon DRM driver can be verified using the dmesg command. For example:

    dmesg | grep -E 'drm|radeon' | grep -iE 'firmware|microcode'
    [    5.268609] [drm] Loading BARTS Microcode
    [    5.329862] radeon 0000:01:00.0: firmware: direct-loading firmware radeon/BARTS_pfp.bin
    [    5.341300] radeon 0000:01:00.0: firmware: direct-loading firmware radeon/BARTS_me.bin
    [    5.347745] radeon 0000:01:00.0: firmware: direct-loading firmware radeon/BTC_rlc.bin
    [    5.347911] radeon 0000:01:00.0: firmware: direct-loading firmware radeon/BARTS_mc.bin
    [    5.353336] radeon 0000:01:00.0: firmware: direct-loading firmware radeon/BARTS_smc.bin
    [    5.369449] radeon 0000:01:00.0: firmware: direct-loading firmware radeon/SUMO_uvd.bin
  • If files were unable to be loaded, ensure the firmware-amd-graphics package is installed (refer to Installation).

  • Screen flickering with Adobe Flash: see FlashPlayer#flickering.

Hybrid Graphics

AMD ships hybrid graphics that may have an AMD graphics card combined with one of a different kind. Without proper support, the cards may run inefficiently, only using one or the other or even activating both at the same time which causes excessive power consumption.

Debian Stretch and newer come with a Mesa version which supports DRI Offloading. Make sure all necessary drivers are installed. It also needs the firmware-amd-graphics package to be installed.

Check if both the cards are getting listed:

xrandr --listproviders

The above listing should give both the names of the cards and the associated drivers. Assuming you're using a dedicated chip that uses the radeon and an integrated Intel card for example that's using the intel driver, you may set:

xrandr --setprovideroffloadsink radeon Intel

You can test the settings with the command:

DRI_PRIME=1 glxinfo | grep "OpenGL renderer"

Where the output should be AMD.

See Also


CategoryHardware CategoryVideo