How to Install NVIDIA Drivers on Ubuntu

Currently, many people in the computer install Nvidia Drivers to play games. Earlier Nvidia Drivers only supported Windows and Mac, but now they also support the Linux operating system, so now you can enjoy gaming on Linux too. Nvidia makes top gaming graphics cards but Nvidia driver installed on a Linux desktop is not easy, but it is now easier. In this article am going to show you ‘How to Install NVIDIA Drivers on Ubuntu’.

Install NVIDIA Drivers on Ubuntu

Install NVIDIA Drivers on Ubuntu

Follow the below Steps to Install NVIDIA Drivers on Ubuntu:

Now just enter the following command and start adding GPU driver PPA to the package sources in the Ubuntu system.

itsmarttricks@mangesh:~$ sudo add-apt-repository ppa:graphics-drivers/ppa
[sudo] password for itsmarttricks:
Fresh drivers from upstream, currently shipping Nvidia.

## Current Status

Current short-lived branch release: `nvidia-396` (396.24)
Dropped support for Fermi series (https://nvidia.custhelp.com/app/answers/detail/a_id/4656)

Current long-lived branch release: `nvidia-390` (390.48)
Old long-lived branch release: `nvidia-384` (384.130)

For G8x, G9x and GT2xx GPUs use `nvidia-340` (340.106)
For NV4x and G7x GPUs use `nvidia-304` (304.137) End-Of-Life!

http://www.ubuntu.com/download/desktop/contribute
More info: https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
Press [ENTER] to continue or Ctrl-c to cancel adding it.

Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease
Reading package lists... Done

update your system package by entering following command.

itsmarttricks@mangesh:~$ sudo apt update
Hit:1 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 http://dl.google.com/linux/chrome/deb stable Release
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Get:7 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:9 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
Fetched 172 kB in 2s (94.3 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.

Also Read- How to Install Latest GIMP 2.10 in Ubuntu 18.04.1

Enter the following command to install Nvidia’s latest version. Writing the article Nvidia-390 is the latest version so Nvidia-390 is entered in the command.

itsmarttricks@mangesh:~$ sudo apt install nvidia-390
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
The following additional packages will be installed:
libnvidia-cfg1-390 libnvidia-common-390 libnvidia-compute-390
Need to get 85.5 MB of archives.
After this operation, 366 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic/main amd64 libnvidia-cfg1-390 amd64 390.77-0ubuntu0~gpu18.04.1 [70.7 kB]
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
Loading new nvidia-390.77 DKMS files...
Building initial module for 4.15.0-33-generic
Done.

nvidia:
Running module version sanity check.
- Installing to /lib/modules/4.15.0-33-generic/updates/dkms/

nvidia-modeset.ko:
Running module version sanity check.
- Installing to /lib/modules/4.15.0-33-generic/updates/dkms/

nvidia-drm.ko:
Running module version sanity check.
- Installing to /lib/modules/4.15.0-33-generic/updates/dkms/

nvidia-uvm.ko:
Running module version sanity check.
- Installing to /lib/modules/4.15.0-33-generic/updates/dkms/

depmod.......

DKMS: install completed.
Setting up libnvidia-gl-390:amd64 (390.77-0ubuntu0~gpu18.04.1) ...
Setting up libnvidia-gl-390:i386 (390.77-0ubuntu0~gpu18.04.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

After installing the Nvidia driver, reboot the system and check Nvidia driver. To check Nvidia drivers, go to the application and search for ‘Nvidia’

How to Install NVIDIA Drivers on Ubuntu

Search Install Nvidia drivers

Also Read- How to Install Kernel Headers in Ubuntu.

Now you can see NVIDIA Drivers is successfully installed. Now you can enjoy gaming.  You can check NVIDIA using the following grep command.

itsmarttricks@mangesh:~$ lsmod | grep nvidia

If the Nvidia driver does not work in your Ubuntu system, use the following command to remove it.

itsmarttricks@mangesh:~$ lsmod | grep nvidia 
itsmarttricks@mangesh:~$ sudo apt-get purge nvidia*
[sudo] password for itsmarttricks: 
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Note, selecting 'nvidia-390-dev' for glob 'nvidia*'
Note, selecting 'nvidia-325-updates' for glob 'nvidia*'
Note, selecting 'nvidia-346-updates' for glob 'nvidia*'
Package 'nvidia-vdpau-driver' is not installed, so not removed
Package 'nvidia-legacy-340xx-vdpau-driver' is not installed, so not removed
Package 'nvidia-driver' is not installed, so not removed
Package 'nvidia-legacy-340xx-driver' is not installed, so not removed
Package 'nvidia-legacy-304xx-driver' is not installed, so not removed
Package 'nvidia-kernel-dkms' is not installed, so not removed
Package 'nvidia-legacy-340xx-kernel-dkms' is not installed, so not removed
Package 'nvidia-legacy-304xx-kernel-dkms' is not installed, so not removed
The following packages were automatically installed and are no longer required:
gconf-service gconf-service-backend gconf2-common libde265-0 libgconf-2-4
libheif1 libjavascriptcoregtk-1.0-0 libmecab2 libnvidia-cfg1-390
libnvidia-common-390 libnvidia-compute-390 libnvidia-compute-390:i386
libnvidia-decode-390 libnvidia-decode-390:i386 libnvidia-encode-390
libnvidia-encode-390:i386 libnvidia-fbc1-390 libnvidia-fbc1-390:i386
libnvidia-gl-390 libnvidia-gl-390:i386 libnvidia-ifr1-390
libnvidia-ifr1-390:i386 libwayland-client0:i386 libwayland-server0:i386
libwebkitgtk-1.0-0 libxnvctrl0 mecab-ipadic mecab-ipadic-utf8 mecab-utils
mypaint-brushes pkg-config screen-resolution-extra
xserver-xorg-video-nvidia-390
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
nvidia-390* nvidia-compute-utils-390* nvidia-dkms-390* nvidia-driver-390*
nvidia-kernel-common-390* nvidia-kernel-source-390* nvidia-prime*
nvidia-settings* nvidia-utils-390*
0 upgraded, 0 newly installed, 9 to remove and 5 not upgraded.
After this operation, 31.5 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 171310 files and directories currently installed.)
Removing nvidia-390 (390.77-0ubuntu0~gpu18.04.1) ...
Removing nvidia-driver-390 (390.77-0ubuntu0~gpu18.04.1) ...
Removing nvidia-compute-utils-390 (390.77-0ubuntu0~gpu18.04.1) ...
Removing nvidia-dkms-390 (390.77-0ubuntu0~gpu18.04.1) ...
Removing all DKMS Modules
Done.
INFO:Disable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
update-initramfs: deferring update (trigger activated)
Removing nvidia-kernel-common-390 (390.77-0ubuntu0~gpu18.04.1) ...
update-initramfs: deferring update (trigger activated)
Removing nvidia-kernel-source-390 (390.77-0ubuntu0~gpu18.04.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
(Reading database ... 170844 files and directories currently installed.)
Purging configuration files for nvidia-prime (0.8.8) ...
Purging configuration files for nvidia-settings (396.54-0ubuntu0~gpu18.04.1) ...
Purging configuration files for nvidia-dkms-390 (390.77-0ubuntu0~gpu18.04.1) ...
update-initramfs: deferring update (trigger activated)
Purging configuration files for nvidia-kernel-common-390 (390.77-0ubuntu0~gpu18.04.1) ...
update-initramfs: deferring update (trigger activated)
Purging configuration files for nvidia-compute-utils-390 (390.77-0ubuntu0~gpu18.04.1) ...
Processing triggers for initramfs-tools (0.130ubuntu3.1) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-33-generic

Also Read- How to Install VLC Media Player on Ubuntu.

If you want to uninstall graphics-drivers completely then you can use the following command.

itsmarttricks@mangesh:~$ sudo apt-add-repository --remove ppa:graphics-drivers/ppa
Fresh drivers from upstream, currently shipping Nvidia.

## Current Status

Current short-lived branch release: `nvidia-396` (396.24)
Dropped support for Fermi series (https://nvidia.custhelp.com/app/answers/detail/a_id/4656)

Current long-lived branch release: `nvidia-390` (390.48)
Old long-lived branch release: `nvidia-384` (384.130)

For G8x, G9x and GT2xx GPUs use `nvidia-340` (340.106)
For NV4x and G7x GPUs use `nvidia-304` (304.137) End-Of-Life!

Support timeframes for Unix legacy GPU releases:
https://nvidia.custhelp.com/app/answers/detail/a_id/3142

## What we're working on right now:

- Normal driver updates
- Help Wanted: Mesa Updates for Intel/AMD users, ping us if you want to help do this work, we're shorthanded.

## WARNINGS:

This PPA is currently in testing, you should be experienced with packaging before you dive in here:

Volunteers welcome! See also: https://github.com/mamarley/nvidia-graphics-drivers/

### How you can help:

## Install PTS and benchmark your gear:

    sudo apt-get install phoronix-test-suite

Run the benchmark:

    phoronix-test-suite default-benchmark openarena xonotic tesseract gputest unigine-valley

and then say yes when it asks you to submit your results to openbechmarking.org. Then grab a cup of coffee, it takes a bit for the benchmarks to run. Depending on the version of Ubuntu you're using it might preferable for you to grabs PTS from upstream directly: http://www.phoronix-test-suite.com/?k=downloads

## Share your results with the community:

Post a link to your results (or any other feedback to): https://launchpad.net/~graphics-drivers-testers

Remember to rerun and resubmit the benchmarks after driver upgrades, this will allow us to gather a bunch of data on performance that we can share with everybody.

If you run into old documentation referring to other PPAs, you can help us by consolidating references to this PPA.

If someone wants to go ahead and start prototyping on `software-properties-gtk` on what the GUI should look like, please start hacking!

## Help us Help You!

We use the donation funds to get the developers hardware to test and upload these drivers, please consider donating to the "community" slider on the donation page if you're loving this PPA:

http://www.ubuntu.com/download/desktop/contribute
More info: https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa
Press [ENTER] to continue or Ctrl-c to cancel removing it.

Also Read- How to Create GIF File from Video on Linux Using Gifcurry.

That’s all, In this article, we have explained How to Install NVIDIA Drivers on Ubuntu. I hope you enjoy this article. If you like this article, then just share it. If you have any questions about this article, please comment.

Mangesh Dhulap

This is Mangesh Dhulap the Founder and Editor of IT SMART TRICKS have 6+ years of Industrial Experience. We expect from our visitors to like, share, and comment on our posts.

You may also like...

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.