How to Install Nvidia Driver on Ubuntu 20.04
As Linux getting more user friendly, game developers are adding more support thanks to Steam. The performance of graphics processing units (GPUs) mainly depends on drivers. Ubuntu by default use open source video driver Nouveau which has limited support and features when compared with proprietary Nvidia drivers.
The proprietary Nvidia driver is essential to Ubuntu users looking to play games. However, if you are a basic user, there is no need to have this driver installed, as the open-source one works just fine.
In this tutorial, we are going to learn different ways to install Nvidia drivers on Ubuntu 20.04 LTS.
Check hardware Information of GPU
Before installing Nvidia drivers on Ubuntu, ensure that you have Nvidia GPU in your system. There are lots of commands available to get Linux hardware details.
To confirm this, simply run the following hwinfo command.
$ sudo hwinfo --gfxcard --short
You can check which card is being used by the
prime-select
command:$ sudo prime-select query
The lshw command can display hardware and driver details of the currently used Nvidia card.
$ sudo lshw -c display | grep NVIDIA
The lspci command is another option to get the GPU hardware details.
$ sudo lspci -nnk | grep -iA3 vga
or
$ sudo lspci | grep -i --color 'vga\|3d\|2d'
If you have installed inxi tool, run the following command.
$ sudo inxi -Gx
Install Nvidia drivers using from GUI
Lets first check how to install Nvidia driver from the graphical user interface. On the main menu, type "software update manager" and click on it to open.
On the software updater pop-up, click on the 'Settings & Livepatch' button as shown.
This will launch the 'Software and Updates' window as shown below:
At the top-most section of the 'Software and updates' windows, be sure to find a couple of options displayed which include Ubuntu software, other software, updates e.t.c. In this case, click on Additional Drivers, you can see there, the 'Nvidia - driver -435' (proprietary, tested) is set up as default driver used for Nvidia card, along with some proprietary divers listed.
Both, 'Nvidia - drivers 430' (proprietary) and 'Nvidia - drivers 390' (proprietary) are available for GeForce GTX 1080 Ti card. Select the first option to install Nvidia driver 430. When you are done, click on the Apply changes button to install the driver.
Then wait for the download to complete from the internet and click on the close button.
Reboot your computer for the changes to take effect. Run the following to reboot your PC.
$ sudo shutdown -r now
or
$ sudo reboot
Install Nvidia driver from the command line (CLI)
Then, run the following commands to check the list of driver devices available for the Nvidia card from the default Ubuntu repository.
$ sudo Ubuntu-drivers devices
There are four Nvidia drivers available for the GeForce MX130 model. They include the Nvidia driver -440 non-free (which is recommended for Ubuntu system), Nvidia driver -435, and -390 distro non-free and the nouveau distro free builtin open source video driver (default). Now you can run the following commands to install the specific driver you want.
$ sudo ubuntu-drivers autoinstall
$ sudo apt install nvidia-driver-390
After the Nvidia diver has been installed, we have to reboot the computer in order to allow Nvidia prime (which is the technology) to switch in between the Intel Graphics and the Nvidia Graphics card.
$ sudo shutdown -r now
Verify using nvidia-smi
The nvidia-smi
command line is a utility that is used for providing monitor and management capabilities for each and every devices i.e Nvidia Tesla, GRID, Quadro, and GeForce from Fermi and other higher architect families. Open the Terminal application and run the following command to see the Graphics Processing Unit and the process that is using the Nvidia GPU.
$ nvidia-smi
nvidia-smi
command line is a utility that is used for providing monitor and management capabilities for each and every devices i.e Nvidia Tesla, GRID, Quadro, and GeForce from Fermi and other higher architect families. Open the Terminal application and run the following command to see the Graphics Processing Unit and the process that is using the Nvidia GPU.