
Professional gamers remember that computer games were CPU-based. Nvidia Corporation is a technology company that is well-known for creating graphics processing units (GPUs) which they believe are required for advancements in computer graphics. Install Nvidia Drivers on Ubuntu is what this article covers by explaining three different methods to satisfy all users with any knowledge level.
Nvidia has grown into high-performance computing (HPC) and artificial intelligence (AI) since becoming recognized as the top supplier of graphics chips for video games. To do those many computational tasks, the same gaming processors are used. Every generation of the company’s enterprise architecture solutions is given a great scientist’s name, such as Maxwell, Turing, or Tesla. GeForce, Nvidia Quadro/RTX, Tegra, DGX servers, BlueField, Spectrum, and Jetson are some of the popular Nvidia products.
After reading this guide, according to your business, you can use Nvidia graphics processing units (GPUs) for gaming and business purposes in workplaces, data centers, visualization, the automobile industry, or artificial intelligence. Since GPUs have computing potential, they are much better than CPUs and are used in high-performance workloads. Let’s get started to install and use Nvidia drivers on your Ubuntu!
Prerequisites to Install Nvidia Drivers on Ubuntu
Before installing Nvidia Drivers in Ubuntu, make sure your system is meeting below specifications:
- A Server running Ubuntu VPS.
- A non-root user with
sudo
privileges. - An Nvidia GPU.
Multiple Methods to Install Nvidia Drivers on Ubuntu
This tutorial covers 3 quick ways to Install Nvidia Drivers on Ubuntu:
- Command Line
- GUI
- PPA Repository
So, you can skip to your preferred solution to install Nvidia Drivers on Ubuntu or review all of them to check which one is better for you according to your Linux knowledge and system equipment. You are recommended to use only one method. When you select your final method, do not try other commands.
Before beginning, you can check whether your computer has an NVIDIA GPU installed and check which NVIDIA GPU drivers are being used on your Ubuntu system.
You can only install the Nvidia driver if your computer is equipped with an Nvidia GPU. To learn more about your GPU, type:
hwinfo --gfxcard --short
OR
sudo lshw -C display
The first step you should take after installing Ubuntu Desktop if your machine is equipped with an NVIDIA GPU is to install the NVIDIA GPU drivers. To Find out whether NVIDIA GPU is installed on your system, run:
$ lspci | grep VGA
We mentioned the most popular Nvidia products earlier. In the output, you can see which NVIDIA is installed on your system.
Since Ubuntu uses open-source Nouveau or proprietary NVIDIA GPU drivers, you can check which one is currently used in your system. By the way, Ubuntu uses the open-source Nouveau drivers by default for NVIDIA graphics cards. The proprietary NVIDIA drivers are not being used until you install them.
Run the command below to check if your Ubuntu system is using the open-source Nouveau drivers:
$ lsmod | grep nouveau
To check if Nvidia drivers are installed, run the command below to see whether the proprietary NVIDIA drivers are shown in the output. Then, you can start using it after searching the NVIDIA X Server Settings app in the Application Menu of your Ubuntu Desktop.
$ lsmod | grep nvidia
Method 1: Install Nvidia Drivers on Ubuntu Using Command Line
Terminal adherents can use this method to install Nvidia on Ubuntu. Just follow the below steps to Install Nvidia Driver via Command Line.
1. First, you need to search for Nvidia drivers. To do this, press Ctrl+Alt+T/ type ”terminal” in the Application menu to open the Terminal and run the command below:
apt search nvidia-driver
A list of your GPU’s available drivers is displayed in the output. Also, you can run the following command to search the package:
apt-cache search nvidia-driver
2. As always, you will continue with updating your system package repository. Run the following command to do this before installing the driver:
sudo apt update
sudo apt upgrade
3. Now, you are ready to install your considered Driver according to your GPU. From the list of available GPU drivers, select one to install. Usually, the latest tested proprietary version can be the right choice. Here is the syntax for installing a driver:
sudo apt install [driver_name]
The necessary packages will all be downloaded and installed. It will take some time to finish. So once the right driver is installed on your Ubuntu system, use the following command to reboot it:
sudo reboot
As a verification, you can use the command below to view GPU information and the process which are using Nvidia GPU.
nvidia-smi
Method 2: Install Nvidia Drivers on Linux Ubuntu Using GUI
Ubuntu ships out of the box with open-source Nouveau drivers for Nvidia GPUs. The Nouveau driver sometimes underutilizes the GPU’s potential and makes the system unstable or performs poorly. Exclusive Nvidia drivers are far more dependable and stable. Using the GUI Software & Updates program is the primary method for installing Nvidia drivers.
Let’s go through the below steps to check out the way you can Install Nvidia Drivers on Ubuntu via GUI:
1. On the App Menu, type ”Software and Updates” and open it.
2. Click on the Settings button.
3. Click the Additional Drivers Tab and wait for the application to download a list of any new GPU drivers that are available.
Your computer’s driver that is currently installed is the default choice. Usually, an open-source Nouveau display driver.
4. Here is where you can choose a driver. To do this, choose the most recent Nvidia driver with the designation “proprietary, tested” from the list. This is the most recent stable driver for your GPU that Nvidia has released.
Enter your password and watch for the installation to be completed, after clicking on Apply Changes As you see above.
5. Finally, to make the modifications effective, restart your Ubuntu Linux computer. You can also use the below commands to do this:
sudo shutdown -r now
OR
sudo reboot
In this way, the Nvidia drivers will be used on the next time boot up.
Method 3: Install Nvidia Drivers on Ubuntu Using PPA Repository
Let’s review the third method to Install Nvidia drivers in Ubuntu. Software that is not offered in the official Ubuntu repositories can be distributed by developers thanks to the PPA repository. This implies that installing the most recent beta drivers comes with the risk of a system that is unstable. Follow these procedures to install the most recent Nvidia drivers via the PPA repository:
1. First, you need to add the PPA GPU repository to your Ubuntu system. To do this, run:
sudo add-apt-repository ppa:graphics-drivers/ppa
When prompted to add the repository, enter your password and press Enter.
2. Once the graphics drivers repository is added, it is time to verify the model of the GPU and view all available drivers. To do this, use the command below to identify your current GPU model and view a list of available drivers for that GPU:
ubuntu-drivers devices
3. Now that you have detected which GPU model you are using, you are ready to install the Nvidia driver. The syntax of installing a specific driver is something like below:
sudo apt install [driver_name]
Also, you can use the following command to install recommended drivers automatically:
sudo ubuntu-drivers autoinstall
If you see no changes on your output, it means that the recommended driver has been already installed.
4. For the modifications to take effect, restart the computer.
How to Configure NVIDIA Graphics Driver
So far, you learned How to Install Nvidia on Ubuntu in three ways. In this part, you will see how you can configure Nvidia graphics driver on Ubuntu. The nvidia-settings command launches a GUI application for customizing the graphics driver from NVIDIA. This can be used to configure numerous external screens or monitors that are attached to your system or to view all GPU information.
nvidia-settings
Starting it as follows will save your settings:
sudo nvidia-settings
How to Change Drivers Using Terminal
While Ubuntu comes with a ubuntu-drivers command which allows users to manage binary drivers for Nvidia and other devices with a non-GUI method, you can use the below commands to change drivers.
- To view all driver packages (Apply on the current system), run:
sudo ubuntu-drivers list
In this way, all apply driver packages on the current system would be listed.
- To show all enabled OEM packages, type:
sudo ubuntu-drivers list-oem
In this way, all OEM enablement packages that apply to your system will be displayed.
- Regardless of Linux commands you can use to Get System and Hardware Information, the below command allows you to view all Nvidia hardware devices that require drivers and which software packages:
sudo ubuntu-drivers devices
- To install a specific driver Nvidia version, you can use the following command and install it automatically:
sudo ubuntu-drivers install
How to Switch to the Nouveau Drivers
You can switch to the open-source Nouveau drivers if you’re experiencing issues with the proprietary NVIDIA drivers or if you simply no longer wish to use them.
Open Ubuntu Desktop’s Software & Updates application from the Application Menu to switch to the open-source Nouveau drivers.
Select the Using X.Org X server – Nouveau display driver from the list on the Additional Drivers tab and then click Apply Changes, as indicated in the image below.
Once the Authentication Required page is opened, enter your password and click on Authenticate to log in.
After a successful login, the Software & Updates app will transition to the Nouveau open-source drivers. It’ll take a while to finish.
The Software & Updates app should now switch to the Nouveau open-source drivers.
When you are finished, open the Terminal application, then restart your machine to make the changes effective:
$ sudo reboot
Certainly, the next time your computer boots, the open-source Nouveau drivers will be used.
How to Uninstall Nvidia Driver in Ubuntu
Due to any reason, if you need to uninstall Nvidia driver, follow the below steps and simply stop using it on your system:
1. First, you can start by viewing which packages are installed on your Ubuntu. Run the following command to see all installed packages:
dpkg -l | grep -i nvidia
In this way, a list of all Nvidia packages on your Ubuntu system will be displayed.
2. Now, use the command below to uninstall Nvidia driver on Ubuntu:
sudo apt-get remove --purge '^nvidia-.*'
After running the above command, all Nvidia packages will be purged from your system.
3. Since the ubuntu-desktop package is a dependency of the nvidia-common package, it might be purged too. So, you can run the command below to reinstall the ubuntu-desktop package when you find it removed.
sudo apt-get install ubuntu-desktop
4. As you guessed, the last step is the restart recommendation. Run the following command to reboot the system:
sudo reboot
During boot, the system automatically loads the open-source Nouveau driver.
Conclusion
In this article, you learned How to Install Nvidia drivers on Ubuntu. Three different methods were explained to help all users with different knowledge levels and systems to Install Nvidia drivers on Ubuntu. Changing drivers, Switching to the Nouveau drivers, Configuring Nvidia graphics driver, and finally uninstalling Nvidia drivers were thought to present a complete guide for interested Ubuntu users. Using this guide, you can also check if you have Nvidia GPU installed or not and find out the GPU drivers you are using on your Ubuntu system.
If you follow the steps of each method properly then you can smoothly install Nvidia driver on Ubuntu without any errors but do not hesitate to contact us if you encounter any problems. Our technical support team will try their best to solve your problems.