https://wiki.archlinux.org/api.php?action=feedcontributions&user=Zxvfxwing&feedformat=atomArchWiki - User contributions [en]2024-03-29T15:27:21ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=AMDGPU&diff=471185AMDGPU2017-03-18T18:55:35Z<p>Zxvfxwing: Founded a frequency issue with my RX 480 8G and found that I wasn't the only one with it. After looking for a solution I found it on Bugzilla. Just wanted to share the information here. Hope it will help.</p>
<hr />
<div>[[Category:Graphics]]<br />
[[Category:X server]]<br />
[[ja:AMDGPU]]<br />
[[ru:AMDGPU]]<br />
{{Related articles start}}<br />
{{Related|AMD Catalyst}}<br />
{{Related|ATI}}<br />
{{Related|Xorg}}<br />
{{Related articles end}}<br />
<br />
'''amdgpu''' is the open source graphics driver for the latest AMD Radeon graphics cards.<br />
<br />
At the moment there is support for [http://xorg.freedesktop.org/wiki/RadeonFeature/ Volcanic Islands (VI)] and experimental support for [https://www.phoronix.com/scan.php?page=news_item&px=AMD-AMDGPU-Released Sea Islands (CI)] and [https://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-SI-Experimental-Code Southern Islands (SI)] cards. AMD has absolutely no plans for supporting the pre-GCN GPUs.<br />
<br />
Owners of unsupported AMD/ATI video cards can use the [[ATI|Radeon open source]] or [[AMD Catalyst|AMD's proprietary]] driver instead.<br />
<br />
== Selecting the right driver ==<br />
<br />
Depending on the card you have, find the right driver in [[Xorg#AMD]]. This page has instructions for '''AMDGPU''' and '''AMDGPU PRO'''.<br />
<br />
== Installation ==<br />
{{Note|If coming from the proprietary Catalyst driver, see [[AMD Catalyst#Uninstallation]] first.}}<br />
<br />
[[Install]] the {{Pkg|xf86-video-amdgpu}} package. It provides the DDX driver for 2D acceleration and it pulls in {{Pkg|mesa}} as a dependency, providing the DRI driver for 3D acceleration.<br />
<br />
For 32-bit application support on x86_64, also install {{Pkg|lib32-mesa}} from [[multilib]].<br />
<br />
Support for [[#Enabling video acceleration|accelerated video decoding]] is provided by {{Pkg|mesa-vdpau}} and {{Pkg|lib32-mesa-vdpau}} packages.<br />
<br />
{{Note|The {{Pkg|xf86-video-amdgpu}} package is only used for Xorg acceleration and not strictly required.}}<br />
<br />
=== AMDGPU PRO ===<br />
{{Warning|Arch Linux is not officially supported.}}<br />
<br />
AMD provides a proprietary, binary userland driver called ''AMDGPU PRO'', which works on top of the open-source AMDGPU kernel driver. This hybrid approach allows the in-kernel component to be recompiled by the Arch Linux maintainers when required (e.g. on a kernel or Xorg update), while keeping the same binary userspace part. This should remedy the problem where the driver provided by AMD is out of date and incompatible with newer kernels or Xorg versions (a problem that was very common with the old [[AMD Catalyst]] driver). For a detailed overview of the hybrid system, see [http://www.phoronix.com/scan.php?page=news_item&px=MTgwODA this article].<br />
<br />
The AMDGPU PRO driver provides OpenGL, OpenCL, Vulkan and VDPAU support. For some workloads it provides better performance than the open-source driver ([http://www.phoronix.com/scan.php?page=news_item&px=AMDGPU-PRO-16.40-Deus-MD example benchmark]), while for others it is true the contrary ([https://openbenchmarking.org/prospect/1610315-TA-AMDGPUPRO08/998ba9b677230564e0fbca342a8e1b9a7e85b6ab example benchmark]).<br />
<br />
See the [http://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx release notes] and the [https://www.phoronix.com/forums/forum/linux-graphics-x-org-drivers/amd-linux/855699-amd-representative-says-their-vulkan-linux-driver-will-be-here-soon/page6 announcement at the Phoronix forum] for more information.<br />
<br />
There are packages for the amdgpu-pro components in the [[AUR]] ({{AUR|amdgpu-pro}}), visit https://github.com/Corngood/archlinux-amdgpu for issues or pull requests.<br />
<br />
If you want to use the open source AMDGPU drivers, and only the proprietary OpenCL component, then use ({{AUR|opencl-amd}})<br />
<br />
== Loading ==<br />
<br />
The {{ic|amdgpu}} kernel module should load fine automatically on system boot.<br />
<br />
If it does not happen, then:<br />
<br />
* Make sure you have the latest {{Pkg|linux-firmware}} package installed. This driver requires the latest firmware for each model to successfully boot.<br />
* Make sure you do '''not''' have {{ic|nomodeset}} or {{ic|1=vga=}} as a [[kernel parameter]], since {{ic|amdgpu}} requires [[KMS]].<br />
* Also, check that you have not disabled {{ic|amdgpu}} by using any [[Kernel_modules#Blacklisting|kernel module blacklisting]].<br />
<br />
=== Enable early KMS ===<br />
<br />
{{Tip|If you have problems with the resolution, [[Kernel mode setting#Forcing modes and EDID]] may help.}}<br />
<br />
[[Kernel mode setting]] (KMS) is supported by the amdgpu driver and is mandatory and enabled by default. <br />
<br />
KMS is typically initialized after the [[Arch boot process#initramfs|initramfs stage]]. It is possible, however, to enable KMS during the initramfs stage. To do this, add the {{ic|amdgpu}} module to the {{ic|MODULES}} line in {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
MODULES="... amdgpu ..."<br />
<br />
Now, regenerate the initramfs:<br />
<br />
# mkinitcpio -p linux<br />
<br />
The change takes effect at the next reboot.<br />
<br />
== Xorg configuration ==<br />
<br />
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.<br />
<br />
If you want manual configuration, create {{ic|/etc/X11/xorg.conf.d/20-amdgpu.conf}}, and add the following:<br />
<br />
Section "Device"<br />
Identifier "AMD"<br />
Driver "amdgpu"<br />
EndSection<br />
<br />
Using this section, you can enable features and tweak the driver settings.<br />
<br />
== Performance tuning ==<br />
=== Enabling video acceleration ===<br />
<br />
See [[Hardware video acceleration]].<br />
<br />
== Enable amdgpu for Sea Islands or Southern Islands cards ==<br />
The Arch Linux {{pkg|linux}} package, is compiled with Southern Islands and Sea Island support enabled by default ({{ic|1=CONFIG_DRM_AMDGPU_CIK=Y}} and {{ic|1=CONFIG_DRM_AMDGPU_SI=Y}} [https://git.archlinux.org/svntogit/packages.git/tree/trunk/config.x86_64?h=packages/linux#n4987]).<br />
<br />
When using these cards, the default driver will be the old radeon driver. To use the amdgpu driver instead, you must [[#Disable radeon driver]].<br />
<br />
=== Disable radeon driver ===<br />
CIK and SI cards will default to the [[radeon]] driver, even after manually enabling AMDGPU for these cards when building the kernel.<br />
<br />
Prevent the {{ic|radeon}} module from loading by [[blacklist]]ing the {{ic|radeon}} module, to force usage of the {{ic|amdgpu}} module:<br />
{{hc|/etc/modprobe.d/radeon.conf|<br />
blacklist radeon}}<br />
<br />
== Troubleshooting ==<br />
<br />
=== No HDMI/DP Audio ===<br />
<br />
The open source AMDGPU driver relies on the DAL code that [https://cgit.freedesktop.org/~agd5f/linux/log/?h=drm-next-4.7-wip-dal currently being worked on]. Until DAL is mainlined, audio suppport for HDMI and DisplayPort will not be available. The only current way to get HDMI and DisplayPort audio is to install the AMDGPU-PRO driver.<br />
<br />
=== Xorg or applications won't start ===<br />
<br />
* "(EE) AMDGPU(0): [DRI2] DRI2SwapBuffers: drawable has no back or front?" error after opening glxgears, can open Xorg server but OpenGL apps crash.<br />
* "(EE) AMDGPU(0): Given depth (32) is not supported by amdgpu driver" error, Xorg won't start.<br />
<br />
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 {{ic|/etc/X11/xorg.conf.d/10-screen.conf}}).<br />
<br />
Section "Screen"<br />
DefaultDepth 24<br />
SubSection "Display"<br />
Depth 24<br />
EndSubSection<br />
EndSection<br />
<br />
=== Screen artifacts & frenquency problem ===<br />
<br />
You may have screen artifacts when setting your screen frequency up to 120+Hz.<br />
Your "Memory Clock" & "GPU Clock" are certainly to low to handle the screen request. <br />
<br />
To fix it ( as root ): <br />
<br />
'''echo high > /sys/class/drm/card0/device/power_dpm_force_performance_level'''<br />
<br />
''or''<br />
<br />
'''echo low > /sys/class/drm/card0/device/power_dpm_force_performance_level'''<br />
<br />
Solution found here : [https://bugs.freedesktop.org/show_bug.cgi?id=96868#c13]<br />
<br />
There is a GUI Solution were you can manage the "power_dpm" with radeon-profile-git & radeon-profile-daemon-git ( AUR Packages ).<br />
More informations here : [https://github.com/marazmista/radeon-profile]</div>Zxvfxwing