How to install & configure nvidia driver on arch linux

Nvidia is a graphics processing chip manufacturer that currently generates most of its revenue from the sales of graphics processing units (GPUs), which are used for competitive gaming, professional visualization, and cryptocurrency mining.

1. Install nvidia driver using pacman command

sudo pacman -S nvidia

Note: add pacman hook to compile module on kernel upgrades

2. Blacklist nouveau driver

sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"

3. Add graphics card configuration in Xorg server

/etc/X11/xorg.conf.d/20-nvidia.conf

4. Load nvidia modules on boot – update firmware

/etc/mkinitcpio.conf

MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

sudo mkinitcpio -P linux

5. Finally, update ~/.xinitrc

use this command to list providers and update in xinitrc file

xrandr --listproviders

~/.xinitrc

Test the GPU processes now

Using nvidia-smi

Using nvtop