How to install Nvidia driver on Ubuntu 20.04

As Linux became more user-friendly, Steam added more support for game developers. The performance of the graphics processing unit (GPU) depends mainly on the driver. By default, Ubuntu uses the open source video driver Nouveau, which has limited support and features compared to the proprietary Nvidia driver.

The proprietary Nvidia driver is essential for Ubuntu users who want to play games. However, if you are a basic user, you do not need to install this driver because the open source driver can work normally.

In this tutorial, we will learn different ways to install Nvidia driver on Ubuntu 20.04 LTS.

Check GPU hardware information

Before installing the Nvidia driver on Ubuntu, make sure that Nvidia GPU is installed on your system. There are many commands available to get detailed information about Linux hardware.

To confirm this, just run the following hwinfo command.

$ sudo hwinfo  --gfxcard --short

Install NVIDIA driver on Ubuntu 20.0420.04

You can check which card is in use prime-select command:

$ sudo prime-select query

Preferred query

The lshw command can display the details of the hardware and driver of the currently used Nvidia card.

$ sudo lshw -c display | grep NVIDIA

Only show NVIDIA drivers

The lspci command is another option for obtaining detailed information about GPU hardware.

$ sudo lspci -nnk | grep -iA3 vga
$ sudo lspci | grep -i --color 'vga|3d|2d'

If you have installed the inxi tool, please run the following command.

$ sudo inxi -Gx

Install Nvidia driver using GUI

First let us check how to install the Nvidia driver from the graphical user interface. On the main menu, type “software update manager” and click to open.

Software and Update Manager

In the software updater pop-up window, click “Settings and live patches‘Button as shown.

Software Updater

This will start “Software and updates‘The window is shown below:

Install Nvidia driver on Ubuntu 20.04

At the very top of the “Software and Updates” window, make sure to find several options displayed, including Ubuntu software, other software, update e.t.c. In this case, click Other drivers, Where you can see that “Nvidia-driver-435” (proprietary, tested) is set as the default driver for Nvidia cards, and lists some proprietary divers.

Both “Nvidia-Driver 430” (proprietary) and “Nvidia-Driver 390” (proprietary) are available for GeForce GTX 1080 Ti cards. Select the first option to install Nvidia driver 430. When finished, click Apply changes Button to install the driver.

Then wait for the download to complete and click the close button.

Restart the computer for the changes to take effect. Run the following command to restart the PC.

$ sudo shutdown -r now


$ sudo reboot

Install Nvidia driver from the command line (CLI)

Then, run the following command to check the list of driver devices available for Nvidia cards in the default Ubuntu repository.

$ sudo Ubuntu-drivers devices

sudo ubuntu driver device

GeForce MX130 models have four Nvidia drivers. They include Nvidia driver -440 non-free (recommended for Ubuntu systems), Nvidia driver -435 and -390 distro non-free and nouveau distro free built-in open source video driver (default). Now you can run the following command to install the specific driver required.

$ sudo ubuntu-drivers autoinstall

Ubuntu driver automatic installation

$ sudo apt install nvidia-driver-390

Install NVIDIA driver on Ubuntu 20.04

After installing the Nvidia header, we must restart the computer to allow Nvidia prime (which is a technology) to switch between Intel Graphics and Nvidia graphics cards.

$ sudo shutdown -r now

Use nvidia-smi for verification

of nvidia-smi The command line is a utility used to provide monitoring and management functions for each device (ie Nvidia Tesla, GRID, Quadro and GeForce of Fermi and other senior architect families). Open the terminal application, and then run the following command to view the graphics processing unit and the process using Nvidia GPU.

$ nvidia-smi


Configure Nvidia graphics driver

On the Nvidia setup command, start the graphical user interface (GUI) tool used to configure the Nvidia graphics driver. This allows you to browse all GPU information and even configure a large number of external monitors connected to the system. Run the following command to start “Nvidia and server settingsWindow.

$ sudo nvidia-settings

NVIDIA X server settings

How to uninstall the proprietary Nvidia driver

In an open forum, I noticed that many users eventually encountered the problem of deleting the Nvidia driver and reinstalling it. Let me share the steps followed to successfully uninstall the Nvidia driver and switch to the nouveau driver.

step 1: Run the following command to uninstall the proprietary Nvidia driver.

$ sudo dpkg -p $(dpkg -l | grep nvidia-driver | awk '{print $2}')
$ sudo apt autoremove
$ sudo apt purge nvidia-*

Step 2: Run these commands to switch back to the nouveau driver.

$ sudo apt install xserver-xorg-video-nouveau

Instead, you can choose to switch directly to the nouveau driver from the graphical user interface. On software and update applications, select Other drivers. Then, select nouveau display driver and click Apply changes.

third step: After that, restart the system.

$ sudo shutdown -r now

the fourth step: After the system reboots, run the following command to confirm the installed nouveau module.

$ lsmod | grep nouveau

in conclusion

In this tutorial, we introduced two methods that can be used to install the Nvidia driver on Ubuntu 20.04 LTS.

Having said that, Nvidia is about to introduce Vulkan to Linux, which aims to provide an alternative to OpenGL to provide higher performance and more balanced CPU / GPU usage drivers.

In recent years, Redhat developers are adding additional code to Nouveau to improve the open source code to make it more complete, and we hope that we can use it for modern games in the near future.

If you have any questions or feedback, please feel free to comment.

Related Posts