Linux Graphics Drivers - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Linux Graphics Drivers Guide
Complete beginner-friendly guide to installing and configuring graphics drivers on Linux, covering Arch Linux, CachyOS, and other distributions for NVIDIA, AMD, and Intel GPUs, including hybrid graphics setup.
Table of Contents
- Detecting Your GPU
- NVIDIA Drivers
- AMD Drivers
- Intel Graphics
- Hybrid Graphics (Dual GPU)
- CachyOS CHWD Tool
- Verifying Installation
- Troubleshooting
Detecting Your GPU
Identify Graphics Card
Check your GPU:
# List PCI devices
lspci | grep VGA
# Detailed GPU info
lspci -k | grep -A 2 VGA
Expected output:
00:02.0 VGA compatible controller: Intel Corporation ...
01:00.0 VGA compatible controller: NVIDIA Corporation ...
Check Current Drivers
See what's loaded:
# Check loaded modules
lsmod | grep -E "nvidia|amdgpu|intel"
# Check Xorg drivers
ls /usr/lib/xorg/modules/drivers/
🟢 NVIDIA Drivers
Install NVIDIA Drivers
For modern GPUs (600 series and newer):
# Arch/CachyOS
sudo pacman -S nvidia nvidia-utils nvidia-settings
# For 32-bit support
sudo pacman -S lib32-nvidia-utils
For older GPUs (400-600 series):
# Install legacy drivers
sudo pacman -S nvidia-470xx-dkms nvidia-settings
# For 32-bit
sudo pacman -S lib32-nvidia-470xx-utils
For very old GPUs (before 400 series):
# Install very old drivers
sudo pacman -S nvidia-390xx-dkms nvidia-settings
Debian/Ubuntu:
sudo apt install nvidia-driver
Fedora:
sudo dnf install akmod-nvidia
NVIDIA DKMS
Dynamic Kernel Module Support:
# Install DKMS version
sudo pacman -S nvidia-dkms
# Rebuild modules after kernel update
sudo dkms install nvidia/XXX
Why DKMS:
- Works with custom kernels
- Automatically rebuilds after kernel updates
- Good for CachyOS custom kernels
Verify NVIDIA
Check installation:
# Check NVIDIA driver
nvidia-smi
# Check OpenGL
glxinfo | grep "OpenGL renderer"
AMD Drivers
Install AMD Drivers
Arch/CachyOS:
# Install AMD drivers
sudo pacman -S mesa xf86-video-amdgpu vulkan-radeon lib32-mesa lib32-vulkan-radeon
# For older AMD GPUs (GCN 1-3)
sudo pacman -S mesa xf86-video-amdgpu xf86-video-ati
Debian/Ubuntu:
sudo apt install mesa-vulkan-drivers
Fedora:
sudo dnf install mesa-dri-drivers
Verify AMD
Check installation:
# Check OpenGL
glxinfo | grep "OpenGL renderer"
# Check Vulkan
vulkaninfo | grep deviceName
Intel Graphics
Install Intel Drivers
Arch/CachyOS:
# Install Intel drivers
sudo pacman -S mesa xf86-video-intel vulkan-intel lib32-mesa lib32-vulkan-intel
Debian/Ubuntu:
sudo apt install xserver-xorg-video-intel
Fedora:
sudo dnf install xorg-x11-drv-intel
Verify Intel
Check installation:
# Check OpenGL
glxinfo | grep "OpenGL renderer"
Hybrid Graphics (Dual GPU)
Understanding Dual GPU
Dual GPU systems have two graphics cards:
- Dedicated GPU: High-performance card (NVIDIA or AMD)
- Integrated GPU: Built into CPU (Intel or AMD)
Common configurations:
- NVIDIA + Intel: Most common on laptops
- AMD + Intel: Common on laptops
- NVIDIA + AMD: Rare, usually workstations
NVIDIA + Intel Setup
Install both drivers:
# Install NVIDIA
sudo pacman -S nvidia nvidia-utils
# Install Intel
sudo pacman -S mesa vulkan-intel
# Install PRIME support
sudo pacman -S nvidia-prime
Switch GPU:
# Use NVIDIA
prime-run application
# Or set default
prime-select nvidia
# Use Intel
prime-select intel
AMD + Intel Setup
Install both drivers:
# Install AMD
sudo pacman -S mesa xf86-video-amdgpu
# Install Intel
sudo pacman -S mesa xf86-video-intel
Switch GPU:
# Use AMD
DRI_PRIME=1 application
# Use Intel (default)
application
NVIDIA Optimus
For automatic switching:
# Install optimus-manager
yay -S optimus-manager
# Configure
sudo optimus-manager --switch nvidia
sudo optimus-manager --switch intel
CachyOS CHWD Tool
What is CHWD?
CHWD (CachyOS Hardware Detection) is a CachyOS-specific tool for hardware detection and driver management.
What it does:
- Detects hardware: Identifies graphics cards automatically
- Installs drivers: Automatically installs correct drivers
- GPU migration: Switches between GPUs easily
- Driver management: Manages graphics drivers
Using CHWD
Detect hardware:
# Detect and show hardware
sudo chwd -h
# Auto-detect and install
sudo chwd -h -a
GPU migration:
# Migrate to NVIDIA
sudo chwd -h -a nvidia
# Migrate to AMD
sudo chwd -h -a amd
# Migrate to Intel
sudo chwd -h -a intel
What this does:
- Detects your GPU automatically
- Installs appropriate drivers
- Configures system for selected GPU
- Much easier than manual installation
CHWD for Dual GPU
Detect dual GPU:
# CHWD detects both GPUs
sudo chwd -h
# Install drivers for both
sudo chwd -h -a
See CachyOS CHWD GPU Migration for detailed CHWD usage.
See CachyOS Dual GPU Setup for detailed dual GPU configuration.
Verifying Installation
Check Drivers
NVIDIA:
# Check NVIDIA
nvidia-smi
# Should show GPU info and driver version
AMD/Intel:
# Check OpenGL
glxinfo | grep "OpenGL renderer"
# Check Vulkan
vulkaninfo | grep deviceName
Test Graphics
Run test:
# Install test tools
sudo pacman -S mesa-utils
# Test OpenGL
glxgears
# Test Vulkan
vkcube
Troubleshooting
Driver Not Loading
Check kernel modules:
# Check loaded modules
lsmod | grep -E "nvidia|amdgpu|intel"
# Load module manually
sudo modprobe nvidia
Black Screen
NVIDIA issues:
# Check Xorg logs
cat /var/log/Xorg.0.log | grep -i error
# Reinstall drivers
sudo pacman -S nvidia nvidia-utils
Performance Issues
Check GPU usage:
# NVIDIA
nvidia-smi
# AMD/Intel
sudo intel_gpu_top
Summary
This guide covered graphics driver installation for Arch Linux, CachyOS, and other distributions, including NVIDIA, AMD, Intel, hybrid graphics, and CachyOS-specific CHWD tool.
Next Steps
- Hardware Acceleration - GPU acceleration
- Multiple Monitors - Multi-monitor setup
- CachyOS CHWD GPU Migration - CHWD detailed guide
- CachyOS Dual GPU Setup - Dual GPU detailed guide
- ArchWiki NVIDIA: https://wiki.archlinux.org/title/NVIDIA
- ArchWiki AMD: https://wiki.archlinux.org/title/AMDGPU
This guide covers Arch Linux, CachyOS, and other Linux distributions. CachyOS-specific CHWD tool is highlighted where applicable.