Installing Nvidia driver in Ubuntu 22.04
- Remove all the nvidia packages.
sudo apt update
sudo apt-get remove ‘^nvidia’
sudo apt autoremove
- If you have added an Nvidia PPA to /etc/apt/sources.list remove that PPA by prefacing its line in sources.list with a # to comment it out. Run sudo apt update to refresh the list of available software.
- Reboot with sudo reboot
- Run the following commands to install the Nvidia 450 driver.
sudo apt install nvidia-driver-450
sudo reboot
After you have installed the nvidia-driver-450 graphics driver in Ubuntu 20.04 it may be updated from nvidia-driver-450 to nvidia-driver-460 by the normal software update activity.
As an alternative to step 4 you can let the ubuntu-drivers program automatically select the proprietary Nvidia packages that are most compatible with your GPU instead of guessing which Nvidia driver packages to install. This method would especially apply in 2022 and later because nvidia-driver-450 is currently a transitional package for nvidia-driver-460 in Ubuntu 20.04. To install the Nvidia proprietary driver this way run the following command instead of the commands in step 4.
sudo ubuntu-drivers install && sudo reboot
These steps are still working for nvidia-driver-470.
