AMDGPU (Русский)
amdgpu это свободный грфический драйвер для последних видеокарт AMD Radeon.
В настоящий момент поддерживаются видекорты с архитектурой Volcanic Islands (VI),некоторые видеокарты семейства Sea Islands (CI) и Southern Islands (SI) (поддержку старее Sea Islands введут только в Xorg 1.2.0 и Linux 4.9). AMD не планируют поддержку видеокарт c архитектуройй до GCN.
Владельцы неподдерживаемых видеокарт AMD/ATI могут использовать драйвера Radeon (с открытым кодом) или Catalyst (проприетарный драйвер от AMD).
Contents
Выбор правильного драйвера
В зависимости от вашей карты, выберите правильный драйвер на странице Xorg#AMD. Здесь - инструкция для AMDGPU и AMDGPU PRO.
Установка
Install пакет xf86-video-amdgpu. В нем содержится драйвер DDX для 2D ускорения, и он является зависимостью mesa, обесппечивающей драйвер DRI для 3D ускорения.
Чтобы имелась поддержка OpenGL, также нужно установить mesa-libgl[ссылка недействительна: replaced by mesa]. Если у Вас архитектура x86_64 и нужна поддержка 32-разрядных приложений, установите еще lib32-mesa-libgl[ссылка недействительна: replaced by lib32-mesa] из репозитория multilib.
Поддержка accelerated video decoding обеспечивается пакетами mesa-vdpau и lib32-mesa-vdpau.
AMDGPU PRO
AMD поставляет проприетарный бинарный драйвер AMDGPU PRO, который работает поверх открытого драйвера ядра AMDGPU. Такой гибридный подход позволяет компиляцию модуля ядра мейнтейнерами Arch Linux, когда это понадобится (т.е., обновление ядра или Xorg), оставляя неизменной бинарную составляющую в пользовательском пространстве. Это должно устранить проблему несовместимости драйвера AMD с новыми сборками ядра и Xorg (что было бедой старого драйвера AMD Catalyst). Вы можете ознакомиться подробнее, прочитав эту статью.
AMDGPU PRO обеспечивает поддержку OpenGL, OpenCL, Vulkan и VDPAU. Он имеет более высокую производительность в сравнении со свободным драйвером (тест производительности).
Посмотрите заметки к выпуску и ветку на форуме Phoronix, чтобы узнать больше.
В AUR (amdgpu-proAUR[ссылка недействительна: package not found]) есть пакет с компонентами amdgpu-pro. А еще существует репозиторий на GitHub.
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-amdgpu.conf
, and add the following:
Section "Device" Identifier "AMD" Driver "amdgpu" EndSection
Using this section, you can enable features and tweak the driver settings.
Loading
The amdgpu
kernel module should load fine automatically on system boot.
If it does not happen, then:
- Make sure you have the latest linux-firmware package installed. This driver requires the latest firmware for each model to successfully boot.
- Make sure you do not have
nomodeset
orvga=
as a kernel parameter, sinceamdgpu
requires KMS. - Also, check that you have not disabled
amdgpu
by using any kernel module blacklisting.
Enable early KMS
Kernel mode setting (KMS) is supported by the amdgpu 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 amdgpu
module to the MODULES
line in /etc/mkinitcpio.conf
:
MODULES="... amdgpu ..."
Now, regenerate the initramfs:
# mkinitcpio -p linux
The change takes effect at the next reboot.
Performance tuning
Enabling video acceleration
See Hardware video acceleration.
Enable amdgpu for Sea Islands or Southern Islands cards
amdgpu
has experimental support for Sea Islands (CIK) and Southern Islands (SI; since Linux 4.9) cards, which is disabled by default. One possible reason why you might want to enable it and switch from radeon to amdgpu
is that AMD announced their user space Vulkan driver will only be supporting the new amdgpu
stack [1]. Same might be the case for the new OpenCL driver, which was also mentioned in the XDC presentation.
If you want to enable amdgpu
and use it with your Sea Islands or Southern Islands product, you have to recompile your kernel. Probably the easiest way to setup a custom kernel is using the ABS, described in Kernels/Arch Build System. You can also uncomment make menuconfig
or make nconfig
in the PKGBUILD, which will allow you to verify that the CIK option is selected by following the instructions from Gentoo wiki.
For Sea Islands (CIK), set "Enable amdgpu support for CIK parts" to "yes", then compile and install your kernel.
CONFIG_DRM_AMDGPU_CIK=Y
For Southern Islands (SI; since Linux 4.9), set "Enable amdgpu support for SI parts" to "yes", then compile and install your kernel.
CONFIG_DRM_AMDGPU_SI=Y
It may also be needed to use the amdgpu.exp_hw_support=1
[2] as kernel parameter or by setting the kernel module options.
Disable radeon driver
To prevent radeon
from loading, you can disable it in the Kconfig or blacklist the radeon
module.
/etc/modprobe.d/radeon.conf
blacklist radeon
Troubleshooting
Xorg or applications won't 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 won't 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 (assuming you have one, assuming you don't add this to /etc/X11/xorg.conf.d/10-screen.conf
).
Section "Screen" DefaultDepth 24 SubSection "Display" Depth 24 EndSubSection EndSection