2.5 KiB
2.5 KiB
Step 1: Installing required packages and enabling multilib
- Update the system:
sudo pacman -Syu
- Install required packages:
sudo pacman -S base-devel linux-headers git nano --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 the following lines by removing the # -character at the start them
- [multilib]
- Include = /etc/pacman.d/mirrorlist
- Save the file with CTRL+S and close nano with CTRL+X
- Run
yay -Syu
, to update the system package database
Step 2: Installing the driver packages
yay -S nvidia nvidia-utils lib32-nvidia-utils nvidia-settings
Step 3: Enabling DRM kernel mode setting
- Edit the GRUB configuration file:
sudo nano /etc/default/grub
- Find the line with GRUB_CMDLINE_LINUX_DEFAULT
- Append the words inside the quotes with nvidia-drm.modeset=1
- Example: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nvidia-drm.modeset=1"
- Save the file with CTRL+S and close nano with CTRL+X
- Update the GRUB configuration:
sudo grub-mkconfig -o /boot/grub/grub.cfg
Add Early Loading of NVIDIA Modules:
- Edit the mkinitcpio configuration file:
sudo nano /etc/mkinitcpio.conf
- Find the line that says MODULES=()
- Update the line to: MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)
- Find the line that says HOOKS=()
- On the HOOKS=() line, find the word kms inside the parenthesis and remove it
- Save the file with CTRL+S and close nano with CTRL+X
- Regenerate the initramfs with
sudo mkinitcpio -P
Adding the Pacman Hook:
- Get the nvidia.hook -file from this repository
cd ~
wget https://raw.githubusercontent.com/korvahannu/arch-nvidia-drivers-installation-guide/main/nvidia.hook
- Move the file to /etc/pacman.d/hooks/ with:
sudo mv ./nvidia.hook /etc/pacman.d/hooks/
[Trigger] Operation=Install Operation=Upgrade Operation=Remove Type=Package Target=nvidia Target=linux
Adjust line(6) above to match your driver, e.g. Target=nvidia-470xx-dkms
Change line(7) above, if you are not using the regular kernel For example, Target=linux-lts
[Action] Description=Update Nvidia module in initcpio Depends=mkinitcpio When=PostTransaction NeedsTargets Exec=/bin/sh -c 'while read -r trg; do case $trg in linux) exit 0; esac; done; /usr/bin/mkinitcpio -P'