Arch Linux Hardware Acceleration - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Arch Linux Hardware Acceleration Guide
Complete beginner-friendly guide to hardware acceleration on Arch Linux, including VAAPI, VDPAU, GPU acceleration for video playback, encoding, and browser acceleration.
Table of Contents
- Understanding Hardware Acceleration
- VAAPI Setup
- VDPAU Setup
- Video Player Configuration
- Browser Acceleration
- Troubleshooting
Understanding Hardware Acceleration
What is Hardware Acceleration?
Hardware acceleration uses GPU for video processing.
Benefits:
- Lower CPU usage
- Better performance
- Power savings
- Smooth playback
Acceleration APIs
Available APIs:
- VAAPI: Video Acceleration API (Intel/AMD)
- VDPAU: Video Decode and Presentation API (NVIDIA)
- NVDEC/NVENC: NVIDIA decode/encode
VAAPI Setup
Install VAAPI
Install packages:
# Intel VAAPI
sudo pacman -S intel-media-driver libva-intel-driver
# AMD VAAPI
sudo pacman -S libva-mesa-driver
# VAAPI utils
sudo pacman -S libva-utils
Verify VAAPI
Check VAAPI:
# List VAAPI devices
vainfo
# Check codecs
vainfo --display drm --codecs
VDPAU Setup
Install VDPAU
Install packages:
# NVIDIA VDPAU
sudo pacman -S libvdpau libvdpau-va-gl
# VDPAU info
sudo pacman -S vdpauinfo
Verify VDPAU
Check VDPAU:
# Check VDPAU
vdpauinfo
Video Player Configuration
MPV
Configure MPV:
# Edit MPV config
vim ~/.config/mpv/mpv.conf
Add:
# Hardware acceleration
hwdec=auto
vo=gpu
gpu-context=wayland
VLC
Configure VLC:
# VLC > Tools > Preferences > Input/Codecs
# Hardware-accelerated decoding: Automatic
FFmpeg
Use FFmpeg:
# Hardware decode
ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -i input.mp4 output.mp4
Browser Acceleration
Firefox
Enable acceleration:
# Edit about:config
# Set:
media.ffmpeg.vaapi.enabled = true
media.ffvpx.enabled = false
Chromium
Enable acceleration:
# Launch with flags
chromium --enable-features=VaapiVideoDecoder
Troubleshooting
Acceleration Not Working
Check drivers:
# Check VAAPI
vainfo
# Check VDPAU
vdpauinfo
# Check GPU
glxinfo | grep "OpenGL renderer"
Codec Issues
Install codecs:
# Install codecs
sudo pacman -S gstreamer-vaapi
Summary
This guide covered VAAPI, VDPAU, video player configuration, browser acceleration, and troubleshooting.
Next Steps
- Arch Linux Graphics Drivers - GPU setup
- Arch Linux Multimedia - Multimedia
- ArchWiki Hardware Acceleration: https://wiki.archlinux.org/title/Hardware_video_acceleration
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.