Skip to content

NVIDIA GPU Setup

This guide covers NVIDIA driver installation and power management for laptops with hybrid graphics.

Terminal window
sudo pacman -S --needed mesa-utils
Terminal window
glxinfo | grep "direct rendering"

Expected output:

direct rendering: Yes

If you see No, there’s a driver configuration issue.

Terminal window
glxgears

A window with rotating gears confirms 3D acceleration is working.

StepActionCommand
1Verify drivers installedCheck NVIDIA packages
2Check kernel moduleslsmod | grep -E "nvidia|i915|amdgpu"
3Review Xorg logsgrep "(EE)" ~/.local/share/xorg/Xorg.0.log
4Check user groupsgroups $USER (should include video)

For laptops with Intel integrated + NVIDIA dedicated GPU.

Terminal window
# Check power control mode
cat /sys/bus/pci/devices/0000:01:00.0/power/control
# Check current power features
cat /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_status

Create the modprobe configuration:

Terminal window
sudo tee /etc/modprobe.d/nvidia-pm.conf <<-EOF
options nvidia NVreg_DynamicPowerManagement=0x02
options nvidia NVreg_EnableGpuFirmware=0
options nvidia NVreg_EnableS0ixPowerManagement=1
EOF

Rebuild initramfs:

Terminal window
sudo mkinitcpio -P
Terminal window
grep -R "NVreg_" /sys/module/nvidia*/parameters/
Terminal window
lsmod | grep -E 'nvidia|nv'

If you have the Ollama service running, it keeps the NVIDIA GPU active:

Terminal window
# Disable if not using constantly
sudo systemctl disable ollama.service

SwayNC may render on the dedicated GPU. Fix with a systemd override:

Terminal window
mkdir -p ~/.config/systemd/user/swaync.service.d/
nvim ~/.config/systemd/user/swaync.service.d/gpu-fix.conf

Add:

[Service]
ExecStart=
ExecStart=/usr/bin/env VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/intel_icd.x86_64.json /usr/bin/swaync

This forces SwayNC to use the Intel GPU instead.