Installing NVIDIA Drivers on Arch Linux
Install NVIDIA Packages
Open a terminal and run the following command to install the necessary NVIDIA packages:
sudo pacman -S nvidia-dkms libglvnd nvidia-utils opencl-nvidia nvidia-settings lib32-nvidia-utils lib32-opencl-nvidia egl-waylandConfigure mkinitcpio
Open the
mkinitcpio.conffile:bashsudo nano /etc/mkinitcpio.confFind the
MODULESline and add the following modules:plaintextMODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)Remove
kmsfrom theHOOKSline to avoid conflicts. It might look something like this:plaintextHOOKS=(base udev autodetect modconf block filesystems keyboard fsck)
Save and exit the file (Ctrl + X, then Y, then Enter).
Create NVIDIA Configuration File
Create the /etc/modprobe.d/nvidia.conf file:
sudo nano /etc/modprobe.d/nvidia.confAdd the following line to the file:
options nvidia_drm modeset=1 fbdev=1Save and exit the file (Ctrl + X, then Y, then Enter).
Update GRUB Configuration
Open the GRUB configuration file:
bashsudo nano /etc/default/grubFind the line starting with
GRUB_CMDLINE_LINUX_DEFAULTand update it to include the following options:plaintextGRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 quiet nvidia_drm.modeset=1"Save and exit the file (Ctrl + X, then Y, then Enter).
Regenerate initramfs
Run the following command to regenerate the initramfs with your changes:
sudo mkinitcpio -PUpdate GRUB
Run the following command to update the GRUB configuration:
sudo grub-mkconfig -o /boot/grub/grub.cfgReboot
Finally, reboot your system to apply the changes:
sudo reboot