Install NVIDIA Drivers on Arch Linux: Step-by-Step
In this article
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
sudoprivileges. - 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
- Update your system – Run
sudo pacman -Syuto ensure your kernel and packages are current. Reboot if the kernel was updated. - Identify your GPU and kernel – Use
lspci -k | grep -A 2 -i nvidiato see the GPU model and which kernel driver is currently in use. Also rununame -rto know your kernel version. - 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), usenvidia-390xx(available in AUR) ornvidia-340xx(legacy, but check if supported). For the open-source driver, installxf86-video-nouveau(but expect lower performance). - 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 neednvidia-dkmsinstead – install that and the corresponding headers (e.g.,linux-zen-headers). - Reboot – After installation, reboot your system. The driver should load automatically.
- Verify the driver is loaded – Run
nvidia-smito see GPU status and driver version. Also checklsmod | grep nvidiato confirm the module is loaded. - 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.confwith the following:Section "Device" Identifier "NVIDIA" Driver "nvidia" Option "NoLogo" "true" EndSectionThen restart X (log out and back in). - For Wayland (optional) – If you use Wayland (e.g., GNOME), the NVIDIA driver works with the
nvidia-drmmodule. Addnvidia_drm.modeset=1to your kernel parameters (edit/etc/default/gruband runsudo grub-mkconfig -o /boot/grub/grub.cfg, or use a bootloader like systemd-boot). Reboot. - Set up NVIDIA utilities – Install
nvidia-utils(usually pulled in) and optionallynvidia-settingsfor GUI control. Runnvidia-settingsto adjust resolution, refresh rate, and other options. - Handle kernel updates – If you use
nvidia-dkms, the module rebuilds automatically on kernel updates. For the standardnvidiapackage, you may need to reinstall after a kernel upgrade; usesudo pacman -Syuand it should handle it, but if the module fails, reinstall withsudo 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-dkmswith 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
nouveauif you install the proprietary driver (though pacman usually handles this).
Tips
- Use
nvidia-smito monitor temperatures, memory usage, and GPU utilization. - For gaming, consider installing
lib32-nvidia-utilsif you run 32-bit applications (e.g., Steam games). - If you have a laptop with hybrid graphics (Intel + NVIDIA), look into
optimus-managerorprime-runfor switching GPUs. - Keep the
nvidiapackage updated regularly withsudo pacman -Syuto get bug fixes and performance improvements. - If you experience screen tearing, add
Option "TripleBuffer" "true"andOption "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.