-
-
Notifications
You must be signed in to change notification settings - Fork 2
CachyOS Dual GPU Setup
This guide covers setting up systems with multiple graphics cards (dual GPU), including NVIDIA + Intel, AMD + Intel, and NVIDIA + AMD configurations. Learn how to switch between GPUs and configure applications to use specific GPUs.
- Understanding Dual GPU Systems
- NVIDIA + Intel Setup
- AMD + Intel Setup
- NVIDIA + AMD Setup
- Switching Between GPUs
- Configuring Applications
- Power Management
- Troubleshooting
A dual GPU system has two graphics processing units:
- Dedicated GPU: High-performance card (NVIDIA or AMD)
- Integrated GPU: Built into CPU (Intel or AMD)
Common configurations:
- NVIDIA + Intel: NVIDIA dedicated + Intel integrated
- AMD + Intel: AMD dedicated + Intel integrated
- NVIDIA + AMD: Both dedicated (rare, usually workstations)
Benefits:
- Power saving: Use integrated GPU for light tasks
- Performance: Use dedicated GPU for gaming/rendering
- Flexibility: Switch based on workload
- Battery life: Better on laptops
Use cases:
- Laptops: Switch between power saving and performance
- Workstations: Use integrated for display, dedicated for compute
- Gaming: Use dedicated GPU for games
Two main approaches:
- PRIME (Linux standard)
- One GPU drives display
- Applications can use either GPU
- Requires manual configuration
- NVIDIA Optimus (NVIDIA specific)
- Automatic switching
- Uses integrated for desktop
- Uses NVIDIA for applications
- Requires special drivers
NVIDIA + Intel is the most common dual GPU configuration, especially on laptops.
Step 1: Install NVIDIA drivers
# Use chwd (recommended)
sudo chwd -h -a nvidia
# Or manually
sudo pacman -S nvidia nvidia-utils nvidia-settingsStep 2: Install Intel drivers
# Intel drivers usually included, but ensure installed:
sudo pacman -S mesa vulkan-intel lib32-mesa lib32-vulkan-intelStep 3: Install PRIME support
# Install PRIME utilities
sudo pacman -S nvidia-primeStep 1: Configure X server (X11)
Edit X server configuration:
sudo nano /etc/X11/xorg.conf.d/nvidia.confAdd configuration:
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:1:0:0" # Check with: lspci | grep VGA
EndSection
Section "Screen"
Identifier "nvidia"
Device "nvidia"
Option "AllowEmptyInitialConfiguration"
EndSection
Find your PCI bus ID:
lspci | grep -i vgaWhat this command does:
-
lspci: Lists all PCI devices (hardware connected to your motherboard) - PCI: Peripheral Component Interconnect - how hardware connects to your computer
-
|: Pipe symbol - sends output of first command to second command -
grep -i vga: Searches for "vga" (video graphics adapter) in the output -
-i: Case-insensitive search (matches VGA, vga, Vga, etc.) -
grep: A search tool that finds matching text
Example output you might see:
00:02.0 VGA compatible controller: Intel Corporation UHD Graphics 630 (rev 02)
01:00.0 VGA compatible controller: NVIDIA Corporation GA106 [GeForce RTX 3060] (rev a1)
Understanding the output:
- 00:02.0: This is the bus ID for Intel graphics
- Format:
XX:YY.Zwhere XX=bus, YY=device, Z=function - For X config: Convert to
PCI:0:2:0(remove leading zeros, use colons) - 01:00.0: This is the bus ID for NVIDIA graphics
- For X config: Convert to
PCI:1:0:0
How to convert bus ID format:
-
lspcishows:01:00.0 - X config needs:
PCI:1:0:0 - Rule: Remove leading zeros, add "PCI:" prefix, use colons between numbers
In the configuration file:
- Use the converted format:
BusID "PCI:1:0:0" - This tells X server where to find your NVIDIA card
Step 2: Configure Wayland (if using Wayland)
For GNOME on Wayland:
- NVIDIA doesn't work well with Wayland
- Consider using X11 or different DE
For KDE on Wayland:
- Better NVIDIA support
- May need additional configuration
Method 1: Use NVIDIA for all (X11)
# Set NVIDIA as primary
sudo prime-select nvidia
# Log out and back inMethod 2: Use Intel for desktop, NVIDIA for apps
# Set Intel as primary
sudo prime-select intel
# Run apps with NVIDIA
prime-run application-nameMethod 3: Use NVIDIA Optimus (automatic switching)
# Install optimus-manager
sudo pacman -S optimus-manager
# Configure
sudo optimus-manager --switch nvidia # Use NVIDIA
sudo optimus-manager --switch intel # Use Intel
sudo optimus-manager --switch hybrid # Hybrid modeCheck which GPU is active:
# Check NVIDIA
nvidia-smiWhat this command does:
-
nvidia-smi: NVIDIA System Management Interface - Shows information about your NVIDIA GPU
- Only works if NVIDIA drivers are installed and GPU is active
Example output:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 535.xx Driver Version: 535.xx CUDA Version: 12.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 On | N/A |
| 0% 45C P8 15W / 170W | 1234MiB / 12288MiB | 0% Default |
+-----------------------------------------------------------------------------+
Understanding the output:
- GPU 0: Your NVIDIA graphics card
- Name: Model of your GPU (e.g., GeForce RTX 3060)
- Temp: GPU temperature (45°C in example)
- Memory-Usage: How much GPU memory is being used
- GPU-Util: GPU usage percentage (0% = idle, 100% = fully used)
If you see an error:
-
NVIDIA-SMI has failed: NVIDIA drivers not installed or GPU not active -
No devices were found: NVIDIA GPU not detected - Solution: Install NVIDIA drivers or switch to NVIDIA GPU
# Check Intel
intel_gpu_topWhat this command does:
-
intel_gpu_top: Shows Intel GPU information (liketopfor CPU, but for Intel GPU) - Shows GPU usage, frequency, and power consumption
- Only works if Intel GPU is active
Example output:
intel_gpu_top - 14:45:30
Render/3D/0 BLT/2 VE/1 Video/0
RC6: 100% Freq: 350 MHz
Understanding the output:
- Render/3D: 3D graphics usage
- BLT: Bit Block Transfer (2D graphics)
- VE: Video Engine usage
- RC6: Power saving state (100% = in power saving mode)
- Freq: GPU frequency (350 MHz = low power mode)
If command not found:
# Install intel-gpu-tools
sudo pacman -S intel-gpu-tools# Check current GPU
glxinfo | grep "OpenGL renderer"What this command does:
-
glxinfo: Shows OpenGL (graphics API) information - OpenGL: A graphics library used by many applications
-
| grep "OpenGL renderer": Searches for the renderer line - Renderer: The actual GPU being used for graphics
Example output (NVIDIA active):
OpenGL renderer string: NVIDIA GeForce RTX 3060/PCIe/SSE2
Example output (Intel active):
OpenGL renderer string: Mesa Intel(R) UHD Graphics 630 (CML GT2)
Understanding the output:
- Shows which GPU is currently being used for graphics
- NVIDIA GeForce RTX 3060: NVIDIA GPU is active
- Mesa Intel: Intel GPU is active
- Mesa: Open-source graphics driver (works with Intel, AMD, some NVIDIA)
If command not found:
# Install mesa-utils
sudo pacman -S mesa-utilsAMD + Intel configuration is less common but works well with open-source drivers.
Step 1: Install AMD drivers
# AMD open-source drivers
sudo pacman -S mesa vulkan-radeon lib32-mesa lib32-vulkan-radeon
# For newer AMD GPUs
sudo pacman -S mesa vulkan-radeon xf86-video-amdgpuStep 2: Install Intel drivers
# Intel drivers
sudo pacman -S mesa vulkan-intel lib32-mesa lib32-vulkan-intelAMD + Intel uses PRIME by default:
- Usually works automatically
- May need manual configuration
Configure X server:
sudo nano /etc/X11/xorg.conf.d/20-amdgpu.confAdd configuration:
Section "ServerLayout"
Identifier "layout"
Screen 0 "amd"
Inactive "intel"
EndSection
Section "Device"
Identifier "amd"
Driver "amdgpu"
BusID "PCI:1:0:0" # Check with lspci
EndSection
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "PCI:0:2:0" # Check with lspci
EndSection
Run applications with AMD:
# Use DRI_PRIME
DRI_PRIME=1 application-name
# Or use prime-run (if installed)
prime-run application-nameSet AMD as default:
- Configure in X server config
- Or use environment variables
NVIDIA + AMD is rare, usually found in workstations or high-end systems.
Install both drivers:
# NVIDIA
sudo pacman -S nvidia nvidia-utils
# AMD
sudo pacman -S mesa vulkan-radeonConfigure X server for both:
sudo nano /etc/X11/xorg.conf.d/dual-gpu.confAdd configuration for both GPUs:
- Similar to NVIDIA + Intel setup
- Configure each GPU separately
- Set primary GPU
Run with NVIDIA:
prime-run application-nameRun with AMD:
DRI_PRIME=1 application-namechwd can help switch GPUs:
# Switch to NVIDIA
sudo chwd -h -a nvidia
# Switch to Intel
sudo chwd -h -a intel
# Switch to AMD
sudo chwd -h -a amdSee CachyOS Tools Guide for chwd usage.
Install optimus-manager:
sudo pacman -S optimus-managerSwitch GPUs:
# Use NVIDIA
sudo optimus-manager --switch nvidia
# Use Intel
sudo optimus-manager --switch intel
# Hybrid mode
sudo optimus-manager --switch hybridAfter switching:
- Log out and back in
- Or restart system
Edit X server configuration:
- Change primary GPU in config
- Restart X server or log out/in
NVIDIA (with PRIME):
# Run application with NVIDIA
prime-run application-name
# Or
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia application-nameAMD (with PRIME):
# Run application with AMD
DRI_PRIME=1 application-nameIntel:
# Usually default, but can specify:
DRI_PRIME=0 application-nameConfigure Steam to use dedicated GPU:
For NVIDIA:
# Launch Steam with NVIDIA
prime-run steam
# Or set in Steam launch options:
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia %command%For AMD:
# Launch Steam with AMD
DRI_PRIME=1 steamGNOME:
- May need X11 for NVIDIA
- Wayland works better with AMD/Intel
KDE:
- Better NVIDIA Wayland support
- Can configure GPU selection
i3/Window Managers:
- Configure in X server config
- Use environment variables
Use integrated GPU for power saving:
# Switch to Intel (lower power)
sudo prime-select intel # For NVIDIA systemsBenefits:
- Lower power consumption
- Better battery life
- Less heat generation
Use dedicated GPU for performance:
# Switch to NVIDIA/AMD (higher performance)
sudo prime-select nvidia # For NVIDIA systemsBenefits:
- Better performance
- Higher frame rates
- Better for gaming/rendering
optimus-manager can auto-switch:
- Configure in optimus-manager settings
- Switch based on AC/battery
- Switch based on application
Configure auto-switching:
# Edit optimus-manager config
sudo nano /etc/optimus-manager/optimus-manager.confSolutions:
-
Check drivers are installed:
# Check NVIDIA nvidia-smi # Check AMD lspci | grep -i amd
-
Check X server configuration:
cat /etc/X11/xorg.conf.d/*.conf -
Try different switching method:
- Try optimus-manager
- Try manual configuration
- Try chwd
Solutions:
-
Explicitly specify GPU:
# For NVIDIA prime-run application-name # For AMD DRI_PRIME=1 application-name
-
Check application settings:
- Some apps have GPU selection in settings
- Check Steam launch options
-
Verify GPU is working:
# Check NVIDIA nvidia-smi # Check which GPU is active glxinfo | grep "OpenGL renderer"
Solutions:
-
Check X server logs:
cat /var/log/Xorg.0.log | grep -i error -
Try different GPU:
# Switch to integrated sudo prime-select intel -
Check cables:
- Ensure monitor is connected
- Try different ports
Solutions:
-
Verify correct GPU is being used:
glxinfo | grep "OpenGL renderer"
-
Check drivers are up to date:
sudo pacman -Syu
-
Check power settings:
- Ensure not in power-saving mode
- Check CPU/GPU frequencies
- CachyOS Tools Guide - Using chwd for hardware
- CachyOS Performance Guide - Performance optimization
- Arch Linux Wiki - PRIME: https://wiki.archlinux.org/title/PRIME
- Arch Linux Wiki - NVIDIA: https://wiki.archlinux.org/title/NVIDIA
- Arch Linux Wiki - AMD: https://wiki.archlinux.org/title/AMDGPU
This guide covered:
- Understanding dual GPU systems - What they are and why use them
- NVIDIA + Intel setup - Most common configuration
- AMD + Intel setup - Open-source friendly
- NVIDIA + AMD setup - Workstation configuration
- Switching between GPUs - How to change active GPU
- Configuring applications - Running apps with specific GPU
- Power management - Optimizing for battery/performance
- Troubleshooting - Common issues and solutions
Key Takeaways:
- Dual GPU systems offer flexibility and power savings
- NVIDIA + Intel is most common (especially laptops)
- Use PRIME for switching between GPUs
- Use optimus-manager for automatic switching (NVIDIA)
- Configure applications to use specific GPUs
- Balance between power saving and performance
This guide is based on the CachyOS Wiki and expanded with detailed explanations for beginners. For the most up-to-date dual GPU information, always refer to the official CachyOS documentation.