How to Install Nvidia Drivers on Ubuntu 20.04

In this article, you will learn how to install the NVIDIA drivers on Ubuntu 20.04.

If you have an Ubuntu machine with an NVIDIA GPU, you can take between the open-source driver Nouveau and NVIDIA’s exclusive drivers. By default, Ubuntu applies Nouveau drivers frequently much slower than the exclusive drivers and lacks support for the most advanced hardware and software technology.

Installing NVIDIA drivers on Ubuntu is a simple task that can be completed in less than a minute. Ubuntu involves a tool that can recognize the graphics card model and install the relevant NVIDIA drivers. Alternatively, you can download and install the drivers from the NVIDIA site also.

Installing the NVIDIA Drivers Using a GUI

This is the most relaxed and the suggested way to install NVIDIA drivers on Ubuntu Desktop systems.

  1. In the Activities screen, seek “driver” and click on the “Additional Drivers” icon.
  2. The “Software & Updates” window will start to see all available drivers for your graphic card.
  3. Depending on the installed card, you will be offered a list of one or more NVIDIA drivers.
  4. Choose the NVIDIA diver you need to install and then click on the “Apply Changes” button.
  5. The installation process may take a few minutes, so be patient.
  6. Once the drivers and installed, then you will need to reboot your machine.

The new NVIDIA driver will be activated after the system is boot up. If you need to view or change the driver set, begin the Nvidia-settings utility:

$ sudo Nvidia-settings

Later, if you need to update or modify the driver, repeat the same steps.

Installing the NVIDIA Drivers Using the Command-Line

If you favor the command-line interface, you can use the ubuntu-drivers tool.

Open your terminal (Ctrl+Alt+T), and run the subsequent command to get data about your graphic card and open drivers:

$ ubuntu-drivers devices

The output following shows that this system has “GeForce GTX 1650,” and the suggested driver is “Nvidia-driver-440”. You may see various outcomes depending on your system.

Output:

== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001F95sv00001028sd0000097Dbc03sc02i00
vendor   : NVIDIA Corporation
model    : TU117M [GeForce GTX 1650 Ti Mobile]
driver   : nvidia-driver-440 - distro non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Usually, it is best to install the suggested driver. To do so, use the apt package manager:

$ sudo apt install Nvidia-driver-440

Once the installation is finished, reboot your system:

$ sudo reboot

When the system is back, you can view the status of the graphic card using the Nvidia-smi monitoring tool:

 $ Nvidia-smi

The command will represent the version of the used driver and other data about the NVIDIA card:

Output:

Wed Nov 11 22:45:21 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 165...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   41C    P3    14W /  N/A |      4MiB /  3914MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2323      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+

Installing the Latest NVIDIA Drivers

Most users should stick with the firm NVIDIA drivers that are available in the default Ubuntu repositories. If you want to live on the edge, you can install the latest drivers from the NVIDIA site or the “Graphics Drivers” PPA.

We will use the PPA method as it is more comfortable to install and update the drivers.

Add the PPA repository using the following command:

$ sudo add-apt-repository ppa:micahflee/ppa

Use the ubuntu-drivers tool to view the available drivers:

$ ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00001F95sv00001028sd0000097Dbc03sc02i00
vendor   : NVIDIA Corporation
model    : TU117M [GeForce GTX 1650 Ti Mobile]
driver   : nvidia-driver-440-server - distro non-free
driver   : nvidia-driver-450-server - third-party non-free
driver   : nvidia-driver-455 - third-party non-free recommended
driver   : xserver-xorg-video-nouveau - distro free builtin

Install the desired driver:

$ sudo apt install nvidia-driver-455

Reboot the system to activate the new driver.

Conclusion

In this article, you have learned how to install NVIDIA Driver on Ubuntu 20.04. If you want more information about NVIDIA drivers, then you can contact us now.

Leave a Reply

Your email address will not be published. Required fields are marked *