How to Install and Configure NVIDIA Drivers on Arch Linux
Categories:
5 minute read
Arch Linux is renowned for its simplicity, flexibility, and cutting-edge software. However, these benefits come at the cost of more hands-on configuration—especially when dealing with proprietary drivers like NVIDIA’s. While open-source drivers often work out of the box, NVIDIA’s proprietary drivers offer better performance, especially for gaming, 3D applications, or CUDA-based computing.
This guide provides a comprehensive walkthrough on how to install and configure NVIDIA drivers on Arch Linux. Whether you’re a gamer, developer, or power user, this guide ensures your system leverages the full capabilities of your NVIDIA GPU.
1. Preliminary Steps
Before diving into installation, make sure your Arch system is fully updated:
sudo pacman -Syu
Then, reboot if a new kernel has been installed:
reboot
It’s also a good idea to install essential base development tools in case you need to compile kernel modules later:
sudo pacman -S base-devel linux-headers
Note: Replace
linux-headers
with the appropriate headers for your kernel if you are using a custom one (e.g.,linux-lts-headers
,linux-zen-headers
, etc.).
2. Checking Your GPU Model
To ensure you’re using the correct driver version, check your GPU model:
lspci | grep -E "VGA|3D"
Example output:
01:00.0 VGA compatible controller: NVIDIA Corporation TU117 [GeForce GTX 1650] (rev a1)
Once you know your GPU model, cross-reference it with the official NVIDIA driver list: https://www.nvidia.com/Download/index.aspx
There are three main NVIDIA drivers in Arch:
nvidia
: For most recent GPUs.nvidia-dkms
: Dynamic kernel module support.nvidia-390xx
: For legacy cards (older than 2014).
3. Installing the NVIDIA Driver
3.1 For Most Users (standard nvidia
package)
Install the NVIDIA driver with:
sudo pacman -S nvidia nvidia-utils nvidia-settings
This command installs:
- The main NVIDIA driver (
nvidia
) - NVIDIA utilities and OpenGL libraries (
nvidia-utils
) - NVIDIA control panel GUI (
nvidia-settings
)
If you’re using a custom kernel (like linux-zen
or linux-lts
), use the nvidia-dkms
variant:
sudo pacman -S nvidia-dkms nvidia-utils nvidia-settings
Also install kernel headers that match your kernel:
sudo pacman -S linux-zen-headers # if using zen kernel
4. Verifying Driver Installation
After installation, reboot your system:
reboot
Then check if the driver is active:
nvidia-smi
You should see your GPU, the driver version, and usage stats.
Example output:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 550.54 Driver Version: 550.54 CUDA Version: 12.3 |
|-------------------------------+----------------------+----------------------+
If nvidia-smi
fails, check the logs:
dmesg | grep -i nvidia
Or review the Xorg log:
cat /var/log/Xorg.0.log | grep -i nvidia
5. Configuring Xorg (Optional)
Modern systems often don’t need an xorg.conf
file. However, you can generate one manually:
sudo nvidia-xconfig
This will create /etc/X11/xorg.conf
. Only use this if you’re facing display issues or need specific configurations like multi-monitor setup.
For systems using hybrid graphics (e.g., laptops with both Intel and NVIDIA), consider installing nvidia-prime
or optimus-manager
.
Install Optimus Manager:
yay -S optimus-manager
sudo systemctl enable optimus-manager.service
Use optimus-manager --switch nvidia
to switch to NVIDIA mode.
6. Managing Screen Tearing
NVIDIA cards may suffer from screen tearing, especially in Xorg. You can fix this by enabling the Force Composition Pipeline.
Option 1: nvidia-settings
- Run:
nvidia-settings
- Go to X Server Display Configuration.
- Click “Advanced” and enable Force Composition Pipeline.
- Save to X configuration file.
Alternatively, manually edit or create the Xorg config file:
sudo nano /etc/X11/xorg.conf.d/20-nvidia.conf
Add:
Section "Screen"
Identifier "Screen0"
Device "Device0"
Option "ForceCompositionPipeline" "On"
EndSection
7. Dealing with Secure Boot (if enabled)
If your system has Secure Boot enabled (common in modern laptops and UEFI systems), the NVIDIA kernel modules will not load unless signed.
You have two choices:
- Disable Secure Boot in your BIOS/UEFI settings.
- Manually sign the modules, which is more advanced and requires creating a Machine Owner Key (MOK).
For most users, disabling Secure Boot is the simplest solution.
8. Tips for Wayland Users
As of recent updates, NVIDIA has made considerable progress supporting Wayland. GNOME and KDE now work relatively well under Wayland with proprietary drivers.
However:
- Xwayland apps may not perform as well.
- Screen recording or sharing might have issues.
- Tear-free rendering generally works fine under Wayland.
To enable Wayland:
- Ensure you’re using GDM or SDDM with Wayland support.
- Choose “GNOME on Wayland” or “Plasma (Wayland)” from your login manager.
Check your session type:
echo $XDG_SESSION_TYPE
It should output wayland
or x11
.
9. Uninstalling NVIDIA Drivers
If you need to remove NVIDIA drivers (e.g., switching to Nouveau or troubleshooting), do:
sudo pacman -Rns nvidia nvidia-utils nvidia-settings
To switch to open-source Nouveau drivers:
sudo pacman -S xf86-video-nouveau
And remove any blacklist of Nouveau (check /etc/modprobe.d/
).
Rebuild the initramfs if needed:
sudo mkinitcpio -P
Then reboot.
10. Conclusion
Installing and configuring NVIDIA drivers on Arch Linux isn’t as daunting as it may first appear. Thanks to the Arch Wiki and community, the process is well-documented and flexible. Whether you’re running Xorg or Wayland, using a modern GPU or a legacy one, Arch provides all the necessary tools for a stable and performant setup.
By following this guide, you’ve taken control of your graphics stack—from driver installation to screen tearing mitigation, hybrid GPU support, and Wayland compatibility. Arch may make you work a little harder, but the payoff is a system tailored to your needs.
References
If you’re ever in doubt, the Arch Wiki is your best friend. Happy computing!
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.