To install the stable Vulkan drivers RADV for AMD and ANV for Intel cards, run the following in Arch Linux:
sudo pacman -Sy mesa lib32-mesa libdrm lib32-libdrm vulkan-icd-loader lib32-vulkan-icd-loader vulkan-tools vulkan-radeon lib32-vulkan-radeon vulkan-intel lib32-vulkan-intel vulkan-mesa-layer
Since Mesa 19.1 FreeSync support is provided for Vulkan with RADV and it TURNIP is available as the Vulkan driver for Adreno 500/600 GPU’s.
For more details read https://wiki.archlinux.org/index.php/Vulkan. The package lib32-vulkan-icd-loader would be required only if there are 32-bit only Vulkan games, e.g. in Wine. The package vulkan-tools contains the command line tool “vulkaninfo”.
AMD released the AMDVLK driver as open source long after RADV. For now RADV is easier to use, has no abstraction layers, is build-in most distributions, shares code with ANV and has broader support from game developers (Valve, Feral). Even if both Vulkan drivers are installed on a system, they can be switched at run time. Basically the app needs to be started with: VK_ICD_FILENAMES=<pathtoICD> <program>
MangoHud is a beatiful Hud that supports Vulkan, OpenGL and DXVK and as the preferred solution nowadays, read Gaming.
Mesa provides a Vulkan Overlay HUD to show frames per second (FPS) since Mesa 19.1. This can be used with:
VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=position=top-right /path/to/my_vulkan_app
Additional Options you can add after position:
To reduce stuttering, Valve developed a new ACO (https://github.com/daniel-schuermann/mesa/commits/master) compiler for Mesa open source drivers, for now it is focused on the RADV and Vulkan driver. To use ACO in Mesa >= 19.3, use RADV_PERFTEST=aco as a parameter or environement variable.
Mesa-Git and LLVM-git Compiler
The Mesa stack is developed constantly and a lot of new functionalities and performance optimizations happen every day. If you want to test Mesa-git, it is recommended to use the ACO branch as it has less issues than the LLVM-git based one. As such it make sense especially for a gamer with a AMD GPU running the free and open source software driver stack to consider upgrading to Mesa-Git. As most Intel GPU’s are too weak for gaming and there is much less development the upgrade to mesa-git makes sense only for testing. You can follow the development, patches and discussions on the mailing list https://lists.freedesktop.org/archives/mesa-dev. Mesamatrix.net provides an overview of the OpenGL features. Mesa-git is unstable but you get all the bleeding edge functionalities and if something doesn’t work it is easier to write bug reports. But expect that something can go wrong, on Arch Linux you can find help in the mesa-git tread https://bbs.archlinux.org/viewtopic.php?id=212819.
Mesa-Git can be installed in Arch Linux from the AUR. But compiling the complete Mesa-Git stack with all drivers and the latest LLVM takes too much time. Fortunately on Arch Linux there is a great user repository available, see https://wiki.archlinux.org/index.php/Unofficial_user_repositories#mesa-git.
You need to add this repo to your pacman.conf.
sudo nano /etc/pacman.conf
Then add the new repository above the others like testing, core and extra. According to some forum threads the mesa-git repository is build against testing. so you should enable these as well, especially if you want to ask for support in the mesa-git forum of Arch Linux.
... # add the 3 lines [mesa-git] SigLevel = Optional Server = https://pkgbuild.com/~lcarlier/$repo/$arch
… # uncomment testing repositories
[testing] Include = /etc/pacman.d/mirrorlist …
[community-testing] Include = /etc/pacman.d/mirrorlist
Unfortunately the mesa-git repo has no signed packages, so the line SigLevel = Optional is required. But don’t deactivate it for all other repo’s in general. It is an important security functionality.
To replace the Mesa packages with Mesa-Git, run something like the following command:
sudo pacman -Sy mesa-git lib32-mesa-git libdrm-git lib32-libdrm-git mesa-demos vulkan-icd-loader lib32-vulkan-icd-loader vulkan-radeon-git lib32-vulkan-radeon-git vulkan-mesa-layer-git lib32-vulkan-mesa-layer-git llvm-libs-git lib32-llvm-libs-git
After accepting the replacements your mesa, libdrm and mesa-libgl are updated. Mesa-git replaces packages like mesa-vdpau as they are build into the same binary.
It is as well possible to stay with the stable OpenGL mesa drivers and just upgrade Vulkan, sometimes required if Mesa-git breaks GPU acceleration e.g. for Plasma-Wayland.
sudo pacman -Sy mesa lib32-mesa libdrm-git lib32-libdrm-git mesa-demos vulkan-icd-loader lib32-vulkan-icd-loader vulkan-radeon-git lib32-vulkan-radeon-git vulkan-mesa-layer-git lib32-vulkan-mesa-layer-git llvm-libs-git lib32-llvm-libs-git
It is not recommended to remove llvm-libs and lib32-llvm-libs even if the git versions are installed, it might brake GPU acceleration like on Plasma-Wayland where you might get a stuttering desktop.
Now you can restart your computer and you should be able to login with your graphical login manager.
To see which OpenGL version is available use glxinfo from mesa-demos:
glxinfo | grep OpenGL
Return to standard Mesa release
Use install command at the top of this page.
vkBasalt 0.2 Image Sharpening
vkBasalt (license MIT, https://github.com/DadSchoorse/vkBasalt) is a image sharpening library for Vulkan. You can install it from the AUR on Arch Linux and then copy afterwards the config file:
mkdir ~/.local/share/vkBasalt/ && cp /usr/share/vkBasalt/vkBasalt.conf.example ~/.local/share/vkBasalt/vkBasalt.conf
Enable the layer with the environment variable (since release 0.2 there is no need anymore to differentiate between 64 and 32 bit):
with Steam, edit your launch options, e.g.:
Vulkan VM passtrough
The google summer of code 2018 project Vulkan-VirGL (https://github.com/Keenuts/vulkan-virgl) tries to add a qemu Vulkan driver to pass Vulkan from the virtual machine (VM) through the GPU on the host. The project is progressing well, for details read the to-do list https://github.com/Keenuts/vulkan-virgl/blob/master/TODO.