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
- After reading if you still don't know what driver you need, take a look of that list on gentoo wiki here that lists the latest driver that supports your CHIPSET. For example, if you have a GTX 3060, you need to install the latest version of nvidia, so just
yay -S nvidia nvidia-utils lib32-nvidia-utils
. - 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
That's a great initiative! I appreciate your efforts to contribute back to the community. Here's an updated section of your guide that includes information on setting kernel parameters for both GRUB and systemd-boot
:
- Edit the GRUB configuration file:
sudo nano /etc/default/grub
- Find
GRUB_CMDLINE_LINUX_DEFAULT
. - Append the line with
nvidia-drm.modeset=1
. - Example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"
. - Save the file with CTRL+O.
- Update the GRUB configuration:
sudo grub-mkconfig -o /boot/grub/grub.cfg
.
- Navigate to the bootloader entries directory:
/boot/loader/entries/
. - Edit the appropriate
.conf
file for your Arch Linux boot entry. - Append
nvidia-drm.modeset=1
to theoptions
line. - Save and exit.
- Edit the
mkinitcpio
configuration file:sudo nano /etc/mkinitcpio.conf
- Find
MODULES=()
. - Update the line to:
MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
. - Save the file with CTRL+O.
- Regenerate the initramfs:
sudo mkinitcpio -P
.
- Locate the
nvidia.hook
in this repository and make a local copy. - Open the file with your preferred editor.
- Find
Target=nvidia
. - Replace
nvidia
with the base driver you installed, e.g.,nvidia-470xx-dkms
. - Save the file.
- Move it to
/etc/pacman.d/hooks/
:sudo 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.