CachyOS Hardware Acceleration - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
CachyOS Hardware Acceleration Guide
Complete beginner-friendly guide to hardware acceleration on CachyOS, including VAAPI, VDPAU, and GPU acceleration for video playback and encoding.
Table of Contents
- Understanding Hardware Acceleration
- VAAPI (Video Acceleration API)
- VDPAU (Video Decode and Presentation API)
- NVIDIA GPU Acceleration
- AMD GPU Acceleration
- Intel GPU Acceleration
- Browser Hardware Acceleration
- Video Player Configuration
- Troubleshooting
Understanding Hardware Acceleration
What is Hardware Acceleration?
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
Without hardware acceleration:
- CPU does all the work (slower)
- Higher CPU usage (system may lag)
- Videos may stutter or lag
- Video encoding is very slow
- Battery drains faster (on laptops)
With hardware acceleration:
- GPU handles graphics tasks (faster)
- Lower CPU usage (system stays responsive)
- Smooth video playback
- Fast video encoding
- Better battery life
Types of Hardware Acceleration
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)
VAAPI (Video Acceleration API)
What is VAAPI?
VAAPI (Video Acceleration API) is an open standard for hardware-accelerated video processing.
What it does:
- Video decoding: Uses GPU to decode videos (playback)
- Video encoding: Uses GPU to encode videos (conversion)
- Post-processing: Video effects and filters
- Scaling: Resizing videos
Supported GPUs:
- Intel: Most Intel integrated graphics
- AMD: Most AMD GPUs (Radeon)
- NVIDIA: Limited support (use VDPAU instead)
Installing VAAPI
For Intel GPUs
Install Intel VAAPI drivers:
sudo pacman -S libva-intel-driver
What this does:
- Installs Intel VAAPI driver
- Enables hardware acceleration for Intel GPUs
- Required for Intel graphics acceleration
For newer Intel GPUs (Gen 8+):
sudo pacman -S intel-media-driver
What this does:
- Modern Intel GPU driver
- Better performance for newer Intel GPUs
- Replaces older libva-intel-driver
For AMD GPUs
Install AMD VAAPI drivers:
sudo pacman -S libva-mesa-driver
What this does:
- Installs AMD VAAPI driver (via Mesa)
- Enables hardware acceleration for AMD GPUs
- Works with most AMD Radeon GPUs
Verify installation:
vainfo
What this does:
- Shows VAAPI capabilities
- Lists supported codecs
- Verifies driver is working
Example output:
libva info: VA-API version 1.20.0
libva info: User wants driver 'radeonsi'
libva info: Trying to open /usr/lib/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.20.0)
vainfo: Driver version: Mesa Gallium driver 24.0.0 for AMD Radeon RX 6600
vainfo: Supported profile and entrypoints
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
...
What this tells you:
- VAAPI is working
- Driver is loaded correctly
- Supported codecs are listed
- Hardware acceleration is available
Using VAAPI
Most applications automatically use VAAPI if available.
To force VAAPI in applications:
- Set environment variables
- Configure application settings
- Use VAAPI-enabled applications
Environment variables:
export LIBVA_DRIVER_NAME=radeonsi # For AMD
export LIBVA_DRIVER_NAME=i965 # For Intel (older)
export LIBVA_DRIVER_NAME=iHD # For Intel (newer)
Add to shell configuration:
# Add to ~/.bashrc or ~/.zshrc
echo 'export LIBVA_DRIVER_NAME=radeonsi' >> ~/.bashrc
source ~/.bashrc
VDPAU (Video Decode and Presentation API)
What is VDPAU?
VDPAU (Video Decode and Presentation API) is NVIDIA's video acceleration API.
What it does:
- Video decoding: Uses NVIDIA GPU to decode videos
- Video presentation: Displays decoded video
- Post-processing: Video effects and filters
Supported GPUs:
- NVIDIA: Most NVIDIA GPUs (GeForce, Quadro, etc.)
- Not supported: Intel, AMD (use VAAPI instead)
Installing VDPAU
Install NVIDIA VDPAU driver:
sudo pacman -S libvdpau
What this does:
- Installs VDPAU library
- Provides VDPAU API
- Required for NVIDIA video acceleration
NVIDIA drivers include VDPAU:
- If you have NVIDIA drivers installed, VDPAU is usually available
- Verify with:
vdpauinfo
Verify installation:
vdpauinfo
What this does:
- Shows VDPAU capabilities
- Lists supported codecs
- Verifies driver is working
Example output:
display: :0 screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library 535.183.01 ...
Video surface:
name width height types
-------------------------------------------
420 16384 16384 NV12 YV12
422 16384 16384 UYVY YUYV
...
Decoder capabilities:
name level macbs width height
----------------------------------------------------
MPEG1 --- 8192 8192 8192
MPEG2_SIMPLE --- 8192 8192 8192
MPEG2_MAIN --- 8192 8192 8192
...
What this tells you:
- VDPAU is working
- NVIDIA driver is loaded
- Supported codecs are listed
- Hardware acceleration is available
Using VDPAU
Most applications automatically use VDPAU if available.
To force VDPAU in applications:
- Set environment variables
- Configure application settings
- Use VDPAU-enabled applications
Environment variables:
export VDPAU_DRIVER=nvidia
Add to shell configuration:
# Add to ~/.bashrc or ~/.zshrc
echo 'export VDPAU_DRIVER=nvidia' >> ~/.bashrc
source ~/.bashrc
NVIDIA GPU Acceleration
NVIDIA Hardware Acceleration
NVIDIA GPUs support multiple acceleration methods:
- VDPAU: Video decoding (older method)
- NVDEC: Modern video decoding
- NVENC: Video encoding
Installing NVIDIA Drivers
Use chwd (recommended):
sudo chwd -h -a nvidia
What this does:
- Detects NVIDIA GPU
- Installs appropriate drivers
- Configures system automatically
Manual installation:
sudo pacman -S nvidia nvidia-utils nvidia-settings
What this does:
nvidia: NVIDIA kernel drivernvidia-utils: NVIDIA utilitiesnvidia-settings: Configuration tool
Verifying NVIDIA Acceleration
Check NVIDIA GPU:
nvidia-smi
Check VDPAU:
vdpauinfo
Check NVENC/NVDEC:
nvidia-smi --query-gpu=encoder.stats.sessionCount --format=csv
What this does:
- Shows if NVENC is being used
- Displays encoding session count
- Verifies hardware encoding is active
Using NVIDIA Acceleration
For video playback:
- Most players automatically use NVIDIA acceleration
- VLC, mpv, etc. support NVIDIA acceleration
For video encoding:
- Use applications that support NVENC
- FFmpeg with NVENC support
- OBS Studio for streaming/recording
AMD GPU Acceleration
AMD Hardware Acceleration
AMD GPUs use VAAPI for hardware acceleration.
Supported features:
- Video decoding: H.264, H.265/HEVC, VP9, AV1
- Video encoding: H.264, H.265/HEVC (on newer GPUs)
- Post-processing: Video effects and filters
Installing AMD Drivers
AMD drivers are usually included:
- Mesa (open-source driver) includes VAAPI support
- Usually works out of the box
Install Mesa VAAPI driver:
sudo pacman -S libva-mesa-driver
Verify installation:
vainfo
Check GPU:
lspci | grep -i vga
glxinfo | grep "OpenGL renderer"
Using AMD Acceleration
Most applications automatically use AMD acceleration if available.
For video playback:
- VLC, mpv, etc. support AMD VAAPI
- Usually works automatically
For video encoding:
- Newer AMD GPUs support hardware encoding
- Use applications with AMD VCE/VCN support
Intel GPU Acceleration
Intel Hardware Acceleration
Intel GPUs use VAAPI for hardware acceleration.
Supported features:
- Video decoding: H.264, H.265/HEVC, VP9, AV1
- Video encoding: H.264, H.265/HEVC (on newer GPUs)
- Post-processing: Video effects and filters
Installing Intel Drivers
For older Intel GPUs (Gen 7 and earlier):
sudo pacman -S libva-intel-driver
For newer Intel GPUs (Gen 8+):
sudo pacman -S intel-media-driver
What this does:
- Installs Intel VAAPI driver
- Enables hardware acceleration
- Better performance on newer GPUs
Verify installation:
vainfo
Check GPU:
lspci | grep -i vga
glxinfo | grep "OpenGL renderer"
Using Intel Acceleration
Most applications automatically use Intel acceleration if available.
For video playback:
- VLC, mpv, etc. support Intel VAAPI
- Usually works automatically
For video encoding:
- Newer Intel GPUs support Quick Sync encoding
- Use applications with Intel Quick Sync support
Browser Hardware Acceleration
Enabling Browser Acceleration
Most browsers support hardware acceleration.
Firefox
Enable hardware acceleration:
- Open Firefox
- Go to
about:preferences - Search for "performance"
- Check "Use recommended performance settings"
- Or uncheck and enable "Use hardware acceleration when available"
Verify acceleration:
- Go to
about:support - Look for "Graphics" section
- Check "Compositing" (should show "WebRender" or "OpenGL")
- Check "GPU Accelerated Windows" (should be enabled)
Force enable (if needed):
- Go to
about:config - Search for
layers.acceleration.force-enabled - Set to
true
Chromium/Chrome
Enable hardware acceleration:
- Open browser
- Go to
chrome://settings/system(orchromium://settings/system) - Enable "Use hardware acceleration when available"
Verify acceleration:
- Go to
chrome://gpu(orchromium://gpu) - Check "Graphics Feature Status"
- Most items should show "Hardware accelerated"
Force enable (if needed):
- Add to command line:
--enable-gpu-rasterization - Add to command line:
--enable-accelerated-video-decode
Brave Browser
Same as Chromium:
- Uses Chromium engine
- Same settings and verification
Video Player Configuration
VLC Media Player
Enable hardware acceleration:
- Open VLC
- Go to Tools → Preferences
- Click Show All (bottom left)
- Go to Input/Codecs → Hardware-accelerated decoding
- Select your GPU:
- VAAPI for Intel/AMD
- VDPAU for NVIDIA
- Automatic (let VLC choose)
Verify acceleration:
- Play a video
- Go to Tools → Codec Information
- Check "Codec" section
- Should show hardware decoder if working
mpv Media Player
Enable hardware acceleration:
Create/edit config file:
nano ~/.config/mpv/mpv.conf
Add for Intel/AMD (VAAPI):
hwdec=vaapi
Add for NVIDIA (VDPAU):
hwdec=vdpau
Add for NVIDIA (NVDEC):
hwdec=nvdec
Verify acceleration:
- Play a video
- Press
ito show info - Check for hardware decoder
FFplay/FFmpeg
Use hardware decoding:
# VAAPI (Intel/AMD)
ffplay -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 video.mp4
# VDPAU (NVIDIA)
ffplay -hwaccel vdpau video.mp4
# NVDEC (NVIDIA, newer)
ffplay -hwaccel nvdec video.mp4
What this does:
-hwaccel: Enable hardware acceleration-hwaccel_device: Specify GPU device- Uses GPU for video decoding
Troubleshooting
Hardware Acceleration Not Working
Check if drivers are installed:
# Check VAAPI
vainfo
# Check VDPAU
vdpauinfo
# Check GPU
lspci | grep -i vga
Check if GPU is detected:
# Intel/AMD
glxinfo | grep "OpenGL renderer"
# NVIDIA
nvidia-smi
Check environment variables:
echo $LIBVA_DRIVER_NAME
echo $VDPAU_DRIVER
Common issues:
Issue: "No VA display found"
- Solution: Install correct VAAPI driver
- For Intel:
sudo pacman -S intel-media-driver - For AMD:
sudo pacman -S libva-mesa-driver
Issue: "VDPAU driver not found"
- Solution: Install NVIDIA drivers
- Command:
sudo chwd -h -a nvidia
Issue: "Hardware acceleration disabled"
- Solution: Enable in application settings
- Check: Browser/player settings
Performance Issues
Videos still stuttering:
- Check if hardware acceleration is actually being used
- Verify GPU is being utilized
- Check CPU usage (should be lower with acceleration)
High CPU usage:
- Hardware acceleration may not be working
- Check driver installation
- Verify application is using acceleration
Black screen or artifacts:
- Driver issue
- Try different driver version
- Check GPU compatibility
Additional Resources
- CachyOS Post-Installation Guide - Driver installation
- CachyOS Dual GPU Setup - Multiple GPU configuration
- Arch Linux Wiki - Hardware Video Acceleration: https://wiki.archlinux.org/title/Hardware_video_acceleration
- VAAPI Documentation: https://github.com/intel/libva
- VDPAU Documentation: https://www.freedesktop.org/wiki/Software/VDPAU/
Summary
This guide covered:
- Understanding hardware acceleration - What it is and why it matters
- VAAPI - Video acceleration for Intel and AMD GPUs
- VDPAU - Video acceleration for NVIDIA GPUs
- NVIDIA acceleration - NVDEC, NVENC, VDPAU
- AMD acceleration - VAAPI for Radeon GPUs
- Intel acceleration - VAAPI for Intel graphics
- Browser acceleration - Enabling in Firefox, Chromium, Brave
- Video player configuration - VLC, mpv, FFmpeg
- Troubleshooting - Common issues and solutions
Key Takeaways:
- Hardware acceleration improves performance significantly
- VAAPI for Intel/AMD, VDPAU for NVIDIA
- Most applications use acceleration automatically
- Verify acceleration is working with
vainfoorvdpauinfo - Enable in browser and video player settings
- Troubleshoot driver issues if acceleration doesn't work
This guide is based on the CachyOS Wiki and Arch Linux Wiki and expanded with detailed explanations for beginners. For the most up-to-date hardware acceleration information, always refer to the official documentation.