AMDVLK (AMD Open source Driver for Vulkan) is an open-source Vulkan driver for AMD Radeon™ graphics adapters on Linux led by GPUOpen initiative.
The AMD Open Source Driver for Vulkan is designed to support the following AMD GPUs. For the latest supported hardware, the amdvlk page on GitHub:
- Radeon™ RX 7900 Series (since 2022.4.4)
- Radeon™ RX 6900/6800/6700/6600/6500 Series
- Radeon™ RX 5700/5600/5500 Series
- Radeon™ RX Vega Series
- Radeon™ RX 400/500 Series
- Radeon™ Pro WX 9100, x200 Series
- Radeon™ Pro W5700/W5500 Series
Follow the hardware detection guide on the AMDGPU page if in doubt.
The driver automatically pulls the vulkan ICD loader package. Check the Vulkan page for more information on choosing a Vulkan driver.
Additional system requirements to build
16 GiB of RAM are recommended to successfully build AMDVLK driver from source. On systems with less than 16 GiBs of RAM, try building the driver with single thread via
MAKEOPTS="-j1" and play along with different compilation flags. Use
CHECKREQS_DONOTHING=1 to bypass the memory checking during installation (check-reqs.eclass).
This can be performed in a one-shot from the command-line via:
CHECKREQS_DONOTHING=1 MAKEOPTS="-j1" emerge --ask media-libs/amdvlk
UPD: There are succesfull experiments with building it on vm with "-O1" optimization flag and 4GB RAM
Connecting the GURU ebuild repository
The Gentoo Security team warns: GURU repository packages is manually reviewed by trusted contibutors, however, it's primary maintained by users. Do not use it if using hardened or in a critical environment or if it is not allowed to use testing ~ packages
Installing the driver
emerge --ask media-libs/amdvlk
After installation Xorg or Wayland may require re-configuring.
Raytracing support and DXC
media-libs/amdvlk since 2022.4.3 support raytracing via corresponding use flag and requires the dev-util/DirectXShaderCompiler package from GURU to build its support. However, it generally recommended to always keep this flag enabled to improve compatibility unless on weak hardware.
Turn on DRI3 and disable modesetting X driver on Xorg
This section is for Xorg users only. Wayland users can skip this section.
On systems that use Gentoo's mainline AMDGPU driver stack, there is a high chance that all necessary stuff is already available: DRI3 and xf86-video-amdgpu driver configured and installed. If not, follow the Xorg/Hardware_3D_acceleration_guide and AMDGPU to configure it. Generally, the following lines may need added to xorg.conf file:
Section "Device" Identifier "AMDgpu" Option "DRI" "3" EndSection
Ensure that there is no Driver "modesetting" line in the xorg.conf file.
Configuration and features
Mesa RADV interoperability
AMDVLK can be simultaniously installed in pair with mesa's RADV driver. If RADV is also installed in the system, AMDVLK driver will be enabled by default after installation. It is possible to switch the driver between AMDVLK and RADV by environment variable
The driver exposes many settings that can customize the driver's behavior and facilitate debugging. Settings can be added into the amdVulkanSettings.cfg or amdPalSettings.cfg files under one of below paths, formatted with one name/value pair per-line:
See the AMDVLK Github Page for full list of settings.
AMDVLK can be installed and used on headless system to run headless Vulkan applications (like waifu2x-ncnn-vulkan).
Wrong ELF class
That misleading error occurs if using a multilib system. See the Vulkan#Wrong_ELF_class.
Known issues and limitations
- CTS may hang in VK.synchronization.internally_synchronized_objects.pipeline_cache_compute with Linux kernel versions lower than 4.13
- The driver can only work with firmware of ME feature version >= 25 (it is possible to check the version with command "sudo cat /sys/kernel/debug/dri/0/amdgpu_firmware_info"). If using upstream stack with GPUs of SI or CI family, it may needed to upgrade the kernel to 4.19 or later version and firmware (under /lib/firmware/amdgpu/) to the right version from https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/amdgpu, and then update ramfs (sudo mkinitramfs -o /boot/initrd.img-`uname -r` `uname -r`)
- Timeline semaphore is not fully supported in Linux kernel until version 5.5. It is possible to install Vulkan timeline semaphore layer to enable the extension if using earlier version of the Linux kernel.
Also the package maintainer (User:RarogCmex) warns about:
- Usage with DRI_PRIME with lead nvidia GPU is impossible at this moment because the driver does not work with modesetting.
- The driver is still might contain bugs. Report if experiencing any troubles.
- Vulkan — a next-generation graphics API created by The Khronos Group.
- AMDGPU — the next generation family of open source graphics drivers using the new Display Core (DC) framework for Vega GPUs and Raven Ridge APUs. It is however also capable of handling newer AMD/ATI Radeon graphics cards based on GCN1.0+, namely the Southern Islands, Sea Islands, Volcanic Islands, and Arctic Islands chipsets.