This is a quick tutorial on how you can install proprietary nvidia drivers for Arch Linux. Please note if you are using anything other than the regular linux kernel, such as linux-lts, you need to make changes accordingly. All the commands marked with like this
are meant to be run on the terminal. Do not reboot before you have finished all the steps below!
- Update the system:
sudo pacman -Syu
- Install required packages:
sudo pacman -S base-devel linux-headers git --needed
- Install the AUR helper, yay
cd ~
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
- Enable multilib repository
sudo nano /etc/pacman.conf
- Uncomment lines that have
[multilib]
andInclude = /etc/pacman.d/mirrorlist
, and then runyay -Syu
, to update the system package database. Do not runyay -Syy
, as that may cause a partial upgrade.
- This step might be a bit confusing. First find your nvidia card from this list here
- Check what driver packages you need to install from the list below
Driver name | Base driver | OpenGL | OpenGL (multilib) |
---|---|---|---|
Maxwell (NV110) series and newer | nvidia | nvidia-utils | lib32-nvidia-utils |
Kepler (NVE0) series | nvidia-470xx-dkms | nvidia-470xx-utils | lib32-nvidia-470xx-utils |
GeForce 400/500/600 series cards [NVCx and NVDx] | nvidia-390xx | nvidia-390xx-utils | lib32-nvidia-390xx-utils |
- Install the correct packages, for example
yay -S nvidia-470xx-dkms nvidia-470xx-utils lib32-nvidia-470xx-utils
- I also recommend you to install nvidia-settings via
yay -S nvidia-settings
- Add the kernel parameter
- Go to your grub file with
sudo nano /etc/default/grub
- Find
GRUB_CMDLINE_LINUX_DEFAULT
- Append the line with
nvidia-drm.modeset=1
- For example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"
- Save the file with CTRL+O
- Finish the grub config with
sudo grub-mkconfig -o /boot/grub/grub.cfg
- Add the early loading
- Go to your mkinitcpio configuration file with
sudo nano /etc/mkinitcpio.conf
- Find
MODULES=()
- Edit the line to match
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
- Save the file with CTRL+O
- Finish the mkinitcpio configuration with
sudo mkinitcpio -P
- Adding the pacman hook
- Find the nvidia.hook in this repository, make a local copy and open the file with your preferred editor
- Find
Target=nvidia
- Replace the nvidia with the base driver you installed, e.g.
nvidia-470xx-dkms
- Save the file and move it to
/etc/pacman.d/hooks/
, for example withsudo mv ./nvidia.hook /etc/pacman.d/hooks/
You can now safely reboot and enjoy the proprietary nvidia drivers. If you have any problems check the Arch Linux Wiki or the forums for common pitfalls and questions.