Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Install NVIDIA Drivers on Arch Linux: Step-by-Step

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Installing NVIDIA drivers on Arch Linux gives you hardware-accelerated graphics, proper resolution scaling, and support for CUDA and gaming. This guide covers the proprietary nvidia package for modern GPUs, plus the open-source nouveau fallback. You need a working Arch system with internet access and basic command-line comfort.

What You'll Need

  • An Arch Linux installation with a non-root user that has sudo privileges.
  • An NVIDIA GPU (check with lspci | grep -i nvidia).
  • Internet connection for downloading packages.
  • Optional: a backup of your current kernel modules if you're upgrading from a previous driver.

Step-by-Step

  1. Update your system – Run sudo pacman -Syu to ensure your kernel and packages are current. Reboot if the kernel was updated.
  2. Identify your GPU and kernel – Use lspci -k | grep -A 2 -i nvidia to see the GPU model and which kernel driver is currently in use. Also run uname -r to know your kernel version.
  3. Choose the right driver package – For most modern GPUs (Kepler and newer), install the proprietary driver: sudo pacman -S nvidia. For older GPUs (pre-Kepler), use nvidia-390xx (available in AUR) or nvidia-340xx (legacy, but check if supported). For the open-source driver, install xf86-video-nouveau (but expect lower performance).
  4. Install the driver – Run sudo pacman -S nvidia (or the package you chose). This will also install the matching kernel module. If you use a custom kernel (e.g., linux-zen), you may need nvidia-dkms instead – install that and the corresponding headers (e.g., linux-zen-headers).
  5. Reboot – After installation, reboot your system. The driver should load automatically.
  6. Verify the driver is loaded – Run nvidia-smi to see GPU status and driver version. Also check lsmod | grep nvidia to confirm the module is loaded.
  7. Configure Xorg (if using X11) – For X11, the driver should be auto-detected. If you need a manual config, create /etc/X11/xorg.conf.d/20-nvidia.conf with the following:
    Section "Device"
        Identifier "NVIDIA"
        Driver "nvidia"
        Option "NoLogo" "true"
    EndSection
    Then restart X (log out and back in).
  8. For Wayland (optional) – If you use Wayland (e.g., GNOME), the NVIDIA driver works with the nvidia-drm module. Add nvidia_drm.modeset=1 to your kernel parameters (edit /etc/default/grub and run sudo grub-mkconfig -o /boot/grub/grub.cfg, or use a bootloader like systemd-boot). Reboot.
  9. Set up NVIDIA utilities – Install nvidia-utils (usually pulled in) and optionally nvidia-settings for GUI control. Run nvidia-settings to adjust resolution, refresh rate, and other options.
  10. Handle kernel updates – If you use nvidia-dkms, the module rebuilds automatically on kernel updates. For the standard nvidia package, you may need to reinstall after a kernel upgrade; use sudo pacman -Syu and it should handle it, but if the module fails, reinstall with sudo pacman -S nvidia.

Common Mistakes

  • Forgetting to reboot – The driver won't load until you reboot.
  • Using the wrong package for your kernel – If you have a custom kernel, you must use nvidia-dkms with matching headers.
  • Not updating the system first – Outdated kernels may not have compatible headers.
  • Editing xorg.conf incorrectly – A typo can prevent X from starting. Always back up the file.
  • Ignoring Wayland modeset – Without nvidia_drm.modeset=1, Wayland may not work or may fall back to software rendering.
  • Installing both nouveau and nvidia – They conflict; remove nouveau if you install the proprietary driver (though pacman usually handles this).

Tips

  • Use nvidia-smi to monitor temperatures, memory usage, and GPU utilization.
  • For gaming, consider installing lib32-nvidia-utils if you run 32-bit applications (e.g., Steam games).
  • If you have a laptop with hybrid graphics (Intel + NVIDIA), look into optimus-manager or prime-run for switching GPUs.
  • Keep the nvidia package updated regularly with sudo pacman -Syu to get bug fixes and performance improvements.
  • If you experience screen tearing, add Option "TripleBuffer" "true" and Option "SyncToVBlank" "true" to your xorg.conf.

Troubleshooting

Driver not loading after reboot – Run dmesg | grep nvidia to see errors. If you see "failed to load module", reinstall the driver and ensure your kernel headers match. Also check pacman -Qs nvidia to see installed packages.

X server fails to start – Check /var/log/Xorg.0.log for errors. If the NVIDIA driver is mentioned, remove your xorg.conf and let X auto-detect. If you have a backup, restore it.

Black screen after boot – This often happens with Wayland. Add nvidia_drm.modeset=1 to kernel parameters. If still black, try booting with nomodeset temporarily to get to a terminal and fix the config.

nvidia-smi shows "No devices were found" – Ensure the GPU is properly seated and powered. Check lspci to see if the GPU is detected. If it's a laptop, make sure the NVIDIA GPU is enabled in BIOS.

Performance is poor – Check if you're using the open-source nouveau driver instead. Remove it and install the proprietary driver. Also verify your power settings – some laptops underclock the GPU.

Kernel update breaks the driver – Reinstall the driver with sudo pacman -S nvidia (or nvidia-dkms). If using DKMS, run sudo dkms autoinstall to rebuild modules.

Frequently Asked Questions

How do I check which NVIDIA driver version I have?

Run nvidia-smi – it shows the driver version in the top-right corner. Alternatively, pacman -Q nvidia shows the package version.

Can I use the open-source nouveau driver instead?

Yes, but it lacks 3D acceleration and power management features. It's fine for basic desktop use, but not for gaming or CUDA.

What is the difference between nvidia and nvidia-dkms?

The nvidia package is precompiled for the standard kernel. nvidia-dkms compiles the module on your system, which is necessary for custom kernels or when you update kernels frequently.

Do I need to install nvidia-utils separately?

No, it's a dependency of nvidia and gets installed automatically. But you might want nvidia-settings for GUI configuration.

Why is my external monitor not detected?

Try running xrandr to list outputs. If nothing appears, check your xorg.conf and ensure the NVIDIA driver is using the correct output. For laptops, you may need to enable the NVIDIA GPU in BIOS.

How do I uninstall NVIDIA drivers?

Run sudo pacman -Rns nvidia nvidia-utils (and nvidia-dkms if installed). Then remove any custom xorg.conf files you created. Reboot to revert to nouveau.