NVIDIA GPU Setup
This guide covers NVIDIA driver installation and power management for laptops with hybrid graphics.
Verifying GPU Acceleration
Section titled “Verifying GPU Acceleration”Install Verification Tools
Section titled “Install Verification Tools”sudo pacman -S --needed mesa-utilsCheck Direct Rendering
Section titled “Check Direct Rendering”glxinfo | grep "direct rendering"Expected output:
direct rendering: YesIf you see No, there’s a driver configuration issue.
Visual Test
Section titled “Visual Test”glxgearsA window with rotating gears confirms 3D acceleration is working.
Troubleshooting Direct Rendering
Section titled “Troubleshooting Direct Rendering”| Step | Action | Command |
|---|---|---|
| 1 | Verify drivers installed | Check NVIDIA packages |
| 2 | Check kernel modules | lsmod | grep -E "nvidia|i915|amdgpu" |
| 3 | Review Xorg logs | grep "(EE)" ~/.local/share/xorg/Xorg.0.log |
| 4 | Check user groups | groups $USER (should include video) |
Power Management (Hybrid Laptops)
Section titled “Power Management (Hybrid Laptops)”For laptops with Intel integrated + NVIDIA dedicated GPU.
Check GPU Power State
Section titled “Check GPU Power State”# Check power control modecat /sys/bus/pci/devices/0000:01:00.0/power/control
# Check current power featurescat /proc/driver/nvidia/gpus/0000:01:00.0/power
# Check runtime status (active/suspended)sudo cat /sys/bus/pci/devices/0000:01:00.0/power/runtime_statusEnable Deep Sleep (D3)
Section titled “Enable Deep Sleep (D3)”Create the modprobe configuration:
sudo tee /etc/modprobe.d/nvidia-pm.conf <<-EOFoptions nvidia NVreg_DynamicPowerManagement=0x02options nvidia NVreg_EnableGpuFirmware=0options nvidia NVreg_EnableS0ixPowerManagement=1EOFRebuild initramfs:
sudo mkinitcpio -PVerify Configuration Applied
Section titled “Verify Configuration Applied”grep -R "NVreg_" /sys/module/nvidia*/parameters/Check Loaded NVIDIA Modules
Section titled “Check Loaded NVIDIA Modules”lsmod | grep -E 'nvidia|nv'Common Issues
Section titled “Common Issues”Ollama Keeps GPU Awake
Section titled “Ollama Keeps GPU Awake”If you have the Ollama service running, it keeps the NVIDIA GPU active:
# Disable if not using constantlysudo systemctl disable ollama.serviceSwayNC GPU Issue
Section titled “SwayNC GPU Issue”SwayNC may render on the dedicated GPU. Fix with a systemd override:
mkdir -p ~/.config/systemd/user/swaync.service.d/nvim ~/.config/systemd/user/swaync.service.d/gpu-fix.confAdd:
[Service]ExecStart=ExecStart=/usr/bin/env VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json /usr/bin/swayncThis forces SwayNC to use the Intel GPU instead.