In this article, I am going to show you how to install the proprietary NVIDIA drivers on Ubuntu Desktop 22.04 LTS.
Table of Contents:
- Finding Out Whether You Have NVIDIA GPU Installed
- Checking the GPU Drivers Currently Being Used
- Installing NVIDIA Drivers using the Graphical User Interface
- Installing NVIDIA Drivers from the Command Line
- Checking if NVIDIA Drivers are Installed Correctly
- Switching to the Nouveau Drivers
- Uninstalling the NVIDIA Drivers
- Conclusion
- References
Finding Out Whether You Have NVIDIA GPU Installed:
You can check whether your computer has an NVIDIA GPU installed with the following command:
As you can see, I have an NVIDIA GeForce GTX 1050 Ti GPU installed on my computer. You may have a different NVIDIA GPU installed.
Checking the GPU Drivers Currently Being Used:
You can check which NVIDIA GPU drivers (open-source Nouveau or proprietary NVIDIA) Ubuntu is using from the command line.
To check whether Ubuntu is using the open-source Nouveau drivers, run the following command:
As you can see, Ubuntu is using the open-source nouveau drivers by default.
As you have not installed the proprietary NVIDIA drivers yet, they are not being used.
Installing NVIDIA Drivers using the Graphical User Interface:
To install the proprietary NVIDIA drivers, open the Software & Updates app from the Application Menu of Ubuntu Desktop 22.04 LTS as marked in the screenshot below.
The Software & Updates app should be opened.
Navigate to the Additional Drivers tab and you should see that Nouveau drivers are being used.
To use the proprietary NVIDIA drivers, select Using NVIDIA driver metapackage from nvidia-drivers-510 (proprietary, tested) from the list and click on Apply Changes as marked in the screenshot below.
Type in your login password and click on Authenticate.
The Software & Updates app will download all the required packages from the internet and install the proprietary NVIDIA drivers on your computer. It will take a while to complete.
Once the installation is complete, you will see a Restart button as marked in the screenshot below. Click on it to restart your computer for the changes to take effect.
Click on Restart. Your computer should reboot and the NVIDIA drivers will be used on the next boot.
Installing NVIDIA Drivers from the Command Line:
You can also install the proprietary NVIDIA drivers from the command line.
To install the proprietary NVIDIA drivers from the command line, open the Terminal app and run the following command:
To confirm the installation, press Y and then press <Enter>.
All the required packages will be downloaded and installed. It will take a while to complete.
NVIDIA drivers are being installed…
NVIDIA drivers should be installed at this point.
For the changes to take effect, reboot your computer with the following command:
Checking if NVIDIA Drivers are Installed Correctly:
Once the NVIDIA drivers are installed, the nouveau drives will no longer be used as you can see in the screenshot below.
If the NVIDIA drivers were installed correctly, the proprietary NVIDIA drives will be used instead as you can see in the screenshot below.
If you have installed the proprietary NVIDIA drivers, you will find the NVIDIA X Server Settings app in the Application Menu of Ubuntu Desktop 22.04 LTS. Click on the NVIDIA X Server Settings app as marked in the screenshot below.
If the NVIDIA drivers were installed correctly, the NVIDIA X Server Settings app should run without errors.
It will also show you information on your installed NVIDIA GPU as you can see in the screenshot below.
Switching to the Nouveau Drivers:
If you’re having problems with the proprietary NVIDIA drivers for some reason or you just don’t want to use the proprietary NVIDIA drivers anymore, you can switch to the open-source Nouveau drivers.
To switch to the open-source Nouveau drivers, open the Software & Updates app from the Application Menu of Ubuntu Desktop 22.04 LTS as marked in the screenshot below.
From the Additional Drivers tab1, select Using X.Org X server – Nouveau display driver from xserver-xorg-video-nouveau (open source) from the list and click on Apply Changes2 as marked in the screenshot below.
Type in your login password and click on Authenticate.
The Software & Updates app will be switching to the open-source Nouveau drivers. It will take a while to complete.
At this point, the Software & Updates app should switch to the open-source Nouveau drivers.
For the changes to take effect, open the Terminal app and reboot your computer with the following command:
The open-source Nouveau drivers will be used the next time your computer boots.
Uninstalling the NVIDIA Drivers:
To uninstall the proprietary NVIDIA drivers completely, open a Terminal app and run the following command:
To confirm the operation, press Y and then press <Enter>.
The proprietary NVIDIA drivers are being removed. It will take a while to complete.
At this point, most of the NVIDIA drivers packages will be removed.
To remove the dependency packages of the NVIDIA drivers, run the following command:
To confirm the operation, press Y and then press <Enter>.
The dependency packages of the NVIDIA drivers are being removed. It will take a while to complete.
At this point, all the NVIDIA drivers dependency packages should be removed.
For the changes to take effect, reboot your computer with the following command:
Conclusion:
In this article, I have shown you how to install the proprietary NVIDIA drivers on Ubuntu Desktop 22.04 LTS. I have also shown you how to check whether the NVIDIA drivers are working. I have shown you how to uninstall the proprietary NVIDIA drivers as well.