Dec 6, 2021
Whenever I set up a new Arch Linux installation on a new hardware, I always had to go through the Arch Wiki and other resources to check out how to enable hardware acceleration for that new hardware, be it an Intel, AMD, or NVIDIA. So I decided to compile those instructions in this article.
Note that my hardware is pretty current and I have zero interests to include instructions for older hardware in this compilation.
As always, you should not trust me. Instead, read the Arch Wiki
Note: I use Wayland (GNOME)
Your installation might actually have everything properly set up without manual intervention, which is usually the case with Intel graphics. To verify that hardware acceleration is working, run mpv
with --hwdec
flag:
mpv --hwdec=auto <FILE>;
Install package mesa
Install package nvidia-utils
. Nouveau is slow and buggy on my only NVIDIA card, which happens to be a Pascal Quadro from 2017. Note that this package only works for 8-series and newer cards.
Install packages libvdpau
Add this option to your kernel parameter:
nvidia-drm.modeset=1
/etc/mkinitcpio.conf
)Add the following modules to hook MODULE
:
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
Install package mesa
Install package xf86-video-amdgpu
Install package libva-mesa-driver
. Verify with vainfo
from libva-utils
.
Install package mesa-vdpau
and libvdpau_va_gl
. Verify with package vdpauinfo
. Then, depending on vdpauinfo
output, you might want to override VDPAU driver if it’s invalid. In my case, VDAPU uses libvdpa_nvidia.so
.
To override this driver and use correct driver for your AMD graphics, use VDPAU_DRIVER
env. For example, my machine with Vega GPU (Renoir) uses Mesa Gallium driver:
export VDPAU_DRIVER=va_gl
Install package libva-vdpau-driver
/etc/mkinitcpio.conf
)Add the following modules to hook MODULE
:
MODULES=(amdgpu radeon)
IIRC, these kernel modules are already in the default kernel. For more info on AMDGPU, see this wiki page
See Arch Wiki
See Arch Wiki