How to Install NVIDIA Drivers on Ubuntu 22.04 LTS
Most modern Linux Desktop systems such as Ubuntu come with an Nvidia driver pre-installed in the Nouveau open-source graphics device driver for Nvidia video cards. For the most part, this is acceptable; however, if you use your Linux system for graphical design or gaming, you may get better drivers.
Historically, the Nouveau drivers are slower than Nvidia’s proprietary drivers, lacking the latest features, software technology, and support for the latest graphics card hardware. The tutorial will cover both options.
In the following tutorial, you will learn how to install NVIDIA Graphic Drivers on Ubuntu 22.04 LTS Jammy Jellyfish using three methods that should suit most user requirements.
Update Ubuntu
Before proceeding with the tutorial, it is highly advised to run an update in your terminal to ensure all packages are up-to-date to avoid any conflicts during the installation. This is important when installing packages such as new kernels and graphic card drivers, especially.
sudo apt update && sudo apt upgrade
Next, select the two choices from the first option of the standard Ubuntu repository drivers or the second with the latest bleeding-edge stable drivers straight from the PPA.
Install NVIDIA Drivers — APT Method — Ubuntu Repository
The first option is to install NVIDIA drivers for your system using the command line. Advanced users prefer using command-based commands, but the beginner can quickly achieve this with the following.
Open your terminal “CTRL+ALT+T“ and find the information on your graphics card first.
ubuntu-drivers devices
From the example output, you can see our operating system module is “TU117 [GeForce GTX 1650]“, and the recommended Nvidia driver is “Nvidia-driver-510″. Remember, this is just an example. Everyone will have different Nivida graphic cards, and look for the recommended option if there is one.
Next, we will install the “nvidia-driver-510“ driver package. This can be done in two ways.
Second, specify below if you want to install the driver package directly or choose another version. Below in order, are some of the newest to oldest. Anything below 5xx is considered legacy at this point.
First, if you are happy with the recommended version, use this command:
sudo ubuntu-drivers autoinstall
Second, specify below if you want to install the driver package directly or choose another version.
Remember, these version numbers will change over time; these are just examples.
Nvidia Drivers 515.x:
sudo apt install nvidia-driver-515
Nvidia Drivers 510.x:
sudo apt install nvidia-driver-510
Once installed, you must reboot your Ubuntu operating system and enter the following command.
reboot
After you log back into your system, you can view the graphic card status with the “nvidia-smi” command.
nvidia-smi
Install NVIDIA Drivers — GUI Method
The second solution in installing your Nvidia Drivers is to use the GUI method. This is recommended for beginners in Linux, especially.
Firstly, go to your application menu and open up “Additional Drivers“ as per the below example.
The full path for users new to Linux and Ubuntu is as follows.
Activities (left-hand corner) > Search bar > Additional Drivers.
Next, the “Software & Updates“ window will appear, where you can see all the available drivers for your Nvidia graphics card to install. Note that some users will see different list sizes depending on the age and popularity of the graphics card.
The next step is to select the Nvidia diver you want to install and click the “Apply Changes“ button.
Note that the installation will take 2 to 3 minutes, depending on your system and its resources.
Once installed, reboot your desktop, which can be done immediately if you would like by typing the following command in your terminal.
reboot
That’s it. You have installed Nvidia Drivers using the GUI method. A handy tip is to view the settings and information of your graphic card, which can be done in your terminal, invoking the following command.
nvidia-settings
Install NVIDIA PPA Drivers
The following repository to install NVIDIA drivers is a PPA known for having the most up-to-date NVIDIA proprietary drivers available. This is recommended for users wishing to update their cards regularly.
First, install the required dependencies.
sudo apt install software-properties-common -y
Next, add the PPA
sudo add-apt-repository ppa:graphics-drivers/ppa -y
With the PPA now imported, run an APT update.
sudo apt update
Next, type in the terminal command to bring up recommendations on your graphics card.
ubuntu-drivers devices
You will get a new output compared to before with the original device’s printout using the standard Ubuntu APT repository.
As you can see, we now have a third-party recommended driver. To install, follow the command options again.
First, if you are happy with the recommended version, use this command:
sudo ubuntu-drivers autoinstall
Second, specify below if you want to install the driver package directly or choose another version.
Nvidia Drivers 515.x:
sudo apt install nvidia-driver-515
Nvidia Drivers 510.x:
sudo apt install nvidia-driver-510
Nvidia Drivers 470.x:
sudo apt install nvidia-driver-470
Nvidia Drivers 450.x:
sudo apt install nvidia-driver-450
Nvidia Drivers 390.x:
sudo apt install nvidia-driver-390
Once done, reboot.
reboot
Now confirm using the “nvidia-smi” command the Nvidia driver version installed:
nvidia-smi