Switching between free and non-free Nvidia
Switching from free to non-free
As always, before installing or changing packages, make sure your system is fully updated:
sudo pacman -Syu
Remove the nouveau package (if installed):
sudo pacman -R xf86-video-nouveau
Time to install the non-free packages:
sudo pacman -S nvidia
If you use the linux-next kernel:
sudo pacman -S nvidia nvidia-next
If you have an older card (GeForce 600 - 900 series cards NVSx and Tesla
):
sudo pacman -S nvidia-470xx
If you use the linux-next kernel add:
sudo pacman -S nvidia-470xx-next
If you have an even older card (GeForce 400/500 series cards NVCx and NVDx
from around 2010-2011):
sudo pacman -S nvidia-390xx-next
If you use the linux-next kernel add:
sudo pacman -S nvidia-390xx
This will automatically install the needed nvidia-utils version too. If you want to use the GUI for nvidia, add nvidia-settings to what you install, this pulls in GTK, so it is packaged separately.
After all is installed, reboot to load the new driver.
Switch from non-free to free
With the changes in the kernel over the past ten, it is strongly recommended to at least try the free drivers.
Remove the nvidia packages. Check what nvidia packages you have installed with pacman -Qs nvidia
.
sudo pacman -R nvidia nvidia-utils
Add nvidia-next, nvidia-settings or any other nvidia version to the above line if the pacman -Qs nvidia command showed those too.
To install the Nouveau driver (not well maintained since at least 2018):
sudo pacman -S xf86-video-nouveau
Reboot to load the new drivers.