CachyOS Dual GPU Setup - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
CachyOS Dual GPU Setup Guide
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.
Table of Contents
- Understanding Dual GPU Systems
- NVIDIA + Intel Setup
- AMD + Intel Setup
- NVIDIA + AMD Setup
- Switching Between GPUs
- Configuring Applications
- Power Management
- Troubleshooting
Understanding Dual GPU Systems
What is a Dual GPU System?
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)
Why Use Dual GPU?
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
How Dual GPU Works
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 Setup
Overview
NVIDIA + Intel is the most common dual GPU configuration, especially on laptops.
Installation
Step 1: Install NVIDIA drivers
# Use chwd (recommended)
sudo chwd -h -a nvidia
# Or manually
sudo pacman -S nvidia nvidia-utils nvidia-settings
Step 2: Install Intel drivers
# Intel drivers usually included, but ensure installed:
sudo pacman -S mesa vulkan-intel lib32-mesa lib32-vulkan-intel
Step 3: Install PRIME support
# Install PRIME utilities
sudo pacman -S nvidia-prime
Configuration
Step 1: Configure X server (X11)
Edit X server configuration:
sudo nano /etc/X11/xorg.conf.d/nvidia.conf
Add 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 vga
What 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 commandgrep -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
Using NVIDIA GPU
Method 1: Use NVIDIA for all (X11)
# Set NVIDIA as primary
sudo prime-select nvidia
# Log out and back in
Method 2: Use Intel for desktop, NVIDIA for apps
# Set Intel as primary
sudo prime-select intel
# Run apps with NVIDIA
prime-run application-name
Method 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 mode
Verifying Configuration
Check which GPU is active:
# Check NVIDIA
nvidia-smi
What 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 activeNo devices were found: NVIDIA GPU not detected- Solution: Install NVIDIA drivers or switch to NVIDIA GPU
# Check Intel
intel_gpu_top
What 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-utils
AMD + Intel Setup
Overview
AMD + Intel configuration is less common but works well with open-source drivers.
Installation
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-amdgpu
Step 2: Install Intel drivers
# Intel drivers
sudo pacman -S mesa vulkan-intel lib32-mesa lib32-vulkan-intel
Configuration
AMD + Intel uses PRIME by default:
- Usually works automatically
- May need manual configuration
Configure X server:
sudo nano /etc/X11/xorg.conf.d/20-amdgpu.conf
Add 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
Using AMD GPU
Run applications with AMD:
# Use DRI_PRIME
DRI_PRIME=1 application-name
# Or use prime-run (if installed)
prime-run application-name
Set AMD as default:
- Configure in X server config
- Or use environment variables
NVIDIA + AMD Setup
Overview
NVIDIA + AMD is rare, usually found in workstations or high-end systems.
Installation
Install both drivers:
# NVIDIA
sudo pacman -S nvidia nvidia-utils
# AMD
sudo pacman -S mesa vulkan-radeon
Configuration
Configure X server for both:
sudo nano /etc/X11/xorg.conf.d/dual-gpu.conf
Add configuration for both GPUs:
- Similar to NVIDIA + Intel setup
- Configure each GPU separately
- Set primary GPU
Using Specific GPU
Run with NVIDIA:
prime-run application-name
Run with AMD:
DRI_PRIME=1 application-name
Switching Between GPUs
Using chwd
chwd 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 amd
See CachyOS Tools Guide for chwd usage.
Using optimus-manager (NVIDIA)
Install optimus-manager:
sudo pacman -S optimus-manager
Switch GPUs:
# Use NVIDIA
sudo optimus-manager --switch nvidia
# Use Intel
sudo optimus-manager --switch intel
# Hybrid mode
sudo optimus-manager --switch hybrid
After switching:
- Log out and back in
- Or restart system
Manual Switching
Edit X server configuration:
- Change primary GPU in config
- Restart X server or log out/in
Configuring Applications
Running Applications with Specific GPU
NVIDIA (with PRIME):
# Run application with NVIDIA
prime-run application-name
# Or
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia application-name
AMD (with PRIME):
# Run application with AMD
DRI_PRIME=1 application-name
Intel:
# Usually default, but can specify:
DRI_PRIME=0 application-name
Steam/Gaming
Configure 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 steam
Desktop Environment
GNOME:
- 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
Power Management
Laptop Power Saving
Use integrated GPU for power saving:
# Switch to Intel (lower power)
sudo prime-select intel # For NVIDIA systems
Benefits:
- 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 systems
Benefits:
- Better performance
- Higher frame rates
- Better for gaming/rendering
Automatic Switching
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.conf
Troubleshooting
Problem: Can't Switch GPUs
Solutions:
-
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
Problem: Applications Use Wrong GPU
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"
Problem: Display Not Working
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
Problem: Performance Issues
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
Additional Resources
- 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
Summary
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.