-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux Hardware Acceleration
Complete beginner-friendly guide to hardware acceleration on Linux, covering Arch Linux, CachyOS, and other distributions including VAAPI, VDPAU, GPU acceleration for video playback, encoding, and browser acceleration.
- Understanding Hardware Acceleration
- VAAPI Setup
- VDPAU Setup
- NVIDIA GPU Acceleration
- AMD GPU Acceleration
- Intel GPU Acceleration
- Video Player Configuration
- Browser Acceleration
- Troubleshooting
Hardware acceleration uses your graphics card (GPU) instead of your processor (CPU) for certain tasks.
What it does:
- Video decoding: Playing videos uses GPU instead of CPU
- Video encoding: Converting videos uses GPU (faster)
- Graphics rendering: Applications use GPU for graphics
- Computational tasks: Some programs use GPU for calculations
Why it matters:
- Better performance: GPU is faster for graphics tasks
- Lower CPU usage: CPU is free for other tasks
- Better battery life: More efficient (on laptops)
- Smoother playback: Videos play without stuttering
- Faster encoding: Video conversion is much faster
VAAPI (Video Acceleration API):
- What it is: Open standard for video acceleration
- Supported by: Intel, AMD, some NVIDIA
- Used for: Video decoding and encoding
- Best for: Intel and AMD GPUs
VDPAU (Video Decode and Presentation API):
- What it is: NVIDIA's video acceleration API
- Supported by: NVIDIA GPUs
- Used for: Video decoding
- Best for: NVIDIA GPUs
NVDEC/NVENC:
- What it is: NVIDIA's hardware decoder/encoder
- Supported by: Modern NVIDIA GPUs
- Used for: Video decoding and encoding
- Best for: NVIDIA GPUs (newer models)
For Intel GPUs:
# Arch/CachyOS
sudo pacman -S libva-intel-driver libva-utils
# Debian/Ubuntu
sudo apt install i965-va-driver vainfo
# Fedora
sudo dnf install intel-media-driver libva-utilsFor AMD GPUs:
# Arch/CachyOS
sudo pacman -S libva-mesa-driver libva-utils
# Debian/Ubuntu
sudo apt install mesa-va-drivers vainfo
# Fedora
sudo dnf install mesa-va-drivers libva-utilsCheck VAAPI:
# List VAAPI devices
vainfo
# Check codecs
vainfo --display drm --codecsInstall packages:
# Arch/CachyOS
sudo pacman -S libvdpau libvdpau-va-gl vdpauinfo
# Debian/Ubuntu
sudo apt install libvdpau1 vdpauinfo
# Fedora
sudo dnf install libvdpau vdpauinfoCheck VDPAU:
# Check VDPAU
vdpauinfoModern NVIDIA GPUs support NVDEC/NVENC.
Check support:
# Check NVIDIA
nvidia-smi
# Check codecs
nvidia-smi --query-gpu=name --format=csvConfigure:
# Usually works automatically with NVIDIA drivers
# No additional configuration neededAMD GPUs use VAAPI for acceleration.
Install:
# Arch/CachyOS
sudo pacman -S libva-mesa-driver mesa-vdpau
# Verify
vainfoIntel GPUs use VAAPI for acceleration.
Install:
# Arch/CachyOS
sudo pacman -S libva-intel-driver intel-media-driver
# Verify
vainfoConfigure MPV:
# Edit MPV config
vim ~/.config/mpv/mpv.confAdd:
# Hardware acceleration
hwdec=auto
vo=gpu
gpu-context=wayland
VLC usually detects hardware acceleration automatically.
Check:
Tools > Preferences > Input/Codecs > Hardware-accelerated decoding
Enable hardware acceleration:
# Usually enabled by default
# Check: chrome://gpuEnable hardware acceleration:
Preferences > General > Performance
Enable: Use recommended performance settings
Check drivers:
# Check VAAPI
vainfo
# Check VDPAU
vdpauinfo
# Check GPU
lspci | grep VGACheck codecs:
# Check VAAPI codecs
vainfo --display drm --codecs
# Check VDPAU
vdpauinfoThis guide covered hardware acceleration for Arch Linux, CachyOS, and other distributions, including VAAPI, VDPAU, GPU acceleration, and video player configuration.
- Graphics Drivers - GPU setup
- Multimedia - Media playback
- CachyOS Hardware Acceleration - CachyOS details
- ArchWiki Hardware Acceleration: https://wiki.archlinux.org/title/Hardware_video_acceleration
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.