Quantcast
Channel: Tech Support
Viewing all articles
Browse latest Browse all 880

How To Install Latest Nvidia Graphics Driver on Ubuntu 18.04 or Ubuntu 19.04

$
0
0

This tutorial will help you to install latest Nvidia Graphics driver on your Ubuntu 18.04 or Ubuntu 19.04 machine. You will need to disable "Secure Boot" from the BIOS of your hardware unless correctly configured before performing the following steps or the Nvidia driver installation will fail.

Checking Graphic Adapter

You can check which graphic adapter is installed in your laptop, desktop or server machine using the following command:

sudo lspci

As you can see in the below screenshot that we have a laptop with dual graphics adapter, one is Intel and other is Nvidia GeForce GTX 950M.


After fresh installation of Ubuntu, we found that (VGA) Intel Integrated Graphics Controller is taken into account and Nvidia GeForce GTX 950M driver is not yet installed.


So, we need to install NVIDIA graphic driver on our Ubuntu 18.04 machine to make it functional.

Uninstalling Nouveau Driver

Remove generic nouveau driver from your Ubuntu using the following command and reboot:

sudo apt autoremove xserver-xorg-video-nouveau
sudo reboot

Adding Nvidia Repository

You can check the correct driver version for your graphic card from here. Afterwards, visit the graphic driver PPA homepage here and see if your graphic card is compatible with the drivers present in the repository.

sudo add-apt-repository ppa:graphics-drivers
sudo apt update

Installing Nvidia Drivers

First, you need to search for the latest available release of NVIDIA Graphics Driver:

sudo apt search *nvidia*

This will bring you all of the NVIDIA related packages but you will only need to locate and install the latest available packages on your Ubuntu like below:

sudo apt install xserver-xorg-video-nvidia-430 nvidia-utils-430 nvidia-kernel-source-430 nvidia-driver-430 nvidia-dkms-430

Output

Setting up libquadmath0:amd64 (8.3.0-6ubuntu1~18.04.1) ...
Setting up libedit2:i386 (3.1-20170329-1) ...
Setting up libncurses5:amd64 (6.1-1ubuntu1.18.04) ...
Setting up libgomp1:amd64 (8.3.0-6ubuntu1~18.04.1) ...
Setting up libatomic1:amd64 (8.3.0-6ubuntu1~18.04.1) ...
Setting up libatomic1:i386 (8.3.0-6ubuntu1~18.04.1) ...
Setting up libglvnd0:amd64 (1.0.0-2ubuntu2.3) ...
Setting up libglvnd0:i386 (1.0.0-2ubuntu2.3) ...
Setting up libexpat1:amd64 (2.2.5-3ubuntu0.1) ...
Setting up libexpat1:i386 (2.2.5-3ubuntu0.1) ...
Setting up libcc1-0:amd64 (8.3.0-6ubuntu1~18.04.1) ...
Setting up make (4.1-9.1ubuntu1) ...
Setting up nvidia-prime (0.8.8.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3) ...
Setting up zlib1g:i386 (1:1.2.11.dfsg-0ubuntu2) ...
Setting up nvidia-kernel-common-430 (430.40-0ubuntu0~gpu18.04.1) ...
update-initramfs: deferring update (trigger activated)
Setting up libelf1:amd64 (0.170-0.4ubuntu0.1) ...
Setting up libelf1:i386 (0.170-0.4ubuntu0.1) ...
Setting up libtsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ...
Setting up libxshmfence1:i386 (1.3-1) ...
Setting up linux-libc-dev:amd64 (4.15.0-55.60) ...
Setting up libdpkg-perl (1.19.0.5ubuntu2.1) ...
Setting up libnvidia-common-430 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libglapi-mesa:amd64 (19.0.2-1ubuntu1.1~18.04.2) ...
Setting up libglapi-mesa:i386 (19.0.2-1ubuntu1.1~18.04.2) ...
Setting up libbsd0:i386 (0.8.7-1) ...
Setting up libdrm-common (2.4.97-1ubuntu1~18.04.1) ...
Setting up liblsan0:amd64 (8.3.0-6ubuntu1~18.04.1) ...
Setting up gcc-7-base:amd64 (7.4.0-1ubuntu1~18.04.1) ...
Setting up libnvidia-cfg1-430:amd64 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libegl1:amd64 (1.0.0-2ubuntu2.3) ...
Setting up libmpx2:amd64 (8.3.0-6ubuntu1~18.04.1) ...
Setting up libx11-xcb1:amd64 (2:1.6.4-3ubuntu0.2) ...
Setting up libx11-xcb1:i386 (2:1.6.4-3ubuntu0.2) ...
Setting up dpkg-dev (1.19.0.5ubuntu2.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libnvidia-compute-430:amd64 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libnvidia-compute-430:i386 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up nvidia-kernel-source-430 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libfakeroot:amd64 (1.22-2ubuntu1) ...
Setting up screen-resolution-extra (0.17.3) ...
Setting up libalgorithm-diff-perl (1.19.03-1) ...
Setting up libpciaccess0:i386 (0.14-1) ...
Setting up libsensors4:i386 (1:3.4.0-4) ...
Setting up libgles2:amd64 (1.0.0-2ubuntu2.3) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up libffi6:i386 (3.2.1-8) ...
Setting up libc-dev-bin (2.27-3ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1) ...
Setting up libxdmcp6:i386 (1:1.1.2-3) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...
Setting up manpages-dev (4.15-1) ...
Setting up libc6-dev:amd64 (2.27-3ubuntu1) ...
Setting up libxcb1:amd64 (1.13-2~ubuntu18.04) ...
Setting up libitm1:amd64 (8.3.0-6ubuntu1~18.04.1) ...
Setting up libxau6:i386 (1:1.0.8-1) ...
Setting up libegl1-mesa:amd64 (19.0.2-1ubuntu1.1~18.04.2) ...
Setting up libxcb-present0:amd64 (1.13-2~ubuntu18.04) ...
Setting up libxcb-dri2-0:amd64 (1.13-2~ubuntu18.04) ...
Setting up libxcb-dri3-0:amd64 (1.13-2~ubuntu18.04) ...
Setting up libxcb-glx0:amd64 (1.13-2~ubuntu18.04) ...
Setting up libllvm8:i386 (1:8-3~ubuntu18.04.1) ...
Setting up libasan4:amd64 (7.4.0-1ubuntu1~18.04.1) ...
Setting up libdw1:amd64 (0.170-0.4ubuntu0.1) ...
Setting up xserver-xorg-video-nvidia-430 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libcilkrts5:amd64 (7.4.0-1ubuntu1~18.04.1) ...
Setting up nvidia-utils-430 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libubsan0:amd64 (7.4.0-1ubuntu1~18.04.1) ...
Setting up libx11-6:amd64 (2:1.6.4-3ubuntu0.2) ...
Setting up fakeroot (1.22-2ubuntu1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libgcc-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ...
Setting up cpp-7 (7.4.0-1ubuntu1~18.04.1) ...
Setting up libdrm2:amd64 (2.4.97-1ubuntu1~18.04.1) ...
Setting up libdrm2:i386 (2.4.97-1ubuntu1~18.04.1) ...
Setting up libxcb-sync1:amd64 (1.13-2~ubuntu18.04) ...
Setting up libstdc++-7-dev:amd64 (7.4.0-1ubuntu1~18.04.1) ...
Setting up nvidia-compute-utils-430 (430.40-0ubuntu0~gpu18.04.1) ...
Warning: The home dir /nonexistent you specified can't be accessed: No such file or directory
Adding system user `nvidia-persistenced' (UID 121) ...
Adding new group `nvidia-persistenced' (GID 127) ...
Adding new user `nvidia-persistenced' (UID 121) with group `nvidia-persistenced' ...
Not creating home directory `/nonexistent'.
Setting up libalgorithm-merge-perl (0.08-3) ...
Setting up pkg-config (0.29.1-0ubuntu2) ...
Setting up libdrm-intel1:amd64 (2.4.97-1ubuntu1~18.04.1) ...
Setting up libdrm-intel1:i386 (2.4.97-1ubuntu1~18.04.1) ...
Setting up libalgorithm-diff-xs-perl (0.04-5) ...
Setting up libdrm-radeon1:amd64 (2.4.97-1ubuntu1~18.04.1) ...
Setting up libdrm-radeon1:i386 (2.4.97-1ubuntu1~18.04.1) ...
Setting up libdrm-nouveau2:amd64 (2.4.97-1ubuntu1~18.04.1) ...
Setting up libdrm-nouveau2:i386 (2.4.97-1ubuntu1~18.04.1) ...
Setting up libxcb1:i386 (1.13-2~ubuntu18.04) ...
Setting up libxnvctrl0:amd64 (418.56-0ubuntu0~gpu18.04.1) ...
Setting up cpp (4:7.4.0-1ubuntu2.3) ...
Setting up libxcb-present0:i386 (1.13-2~ubuntu18.04) ...
Setting up libxcb-dri2-0:i386 (1.13-2~ubuntu18.04) ...
Setting up libxcb-dri3-0:i386 (1.13-2~ubuntu18.04) ...
Setting up libxcb-glx0:i386 (1.13-2~ubuntu18.04) ...
Setting up libdrm-amdgpu1:i386 (2.4.97-1ubuntu1~18.04.1) ...
Setting up gcc-7 (7.4.0-1ubuntu1~18.04.1) ...
Setting up libnvidia-decode-430:amd64 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up g++-7 (7.4.0-1ubuntu1~18.04.1) ...
Setting up libnvidia-gl-430:amd64 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libx11-6:i386 (2:1.6.4-3ubuntu0.2) ...
Setting up libgl1-mesa-dri:amd64 (19.0.2-1ubuntu1.1~18.04.2) ...
Setting up libgl1-mesa-dri:i386 (19.0.2-1ubuntu1.1~18.04.2) ...
Setting up gcc (4:7.4.0-1ubuntu2.3) ...
Setting up nvidia-settings (418.56-0ubuntu0~gpu18.04.1) ...
Setting up libxcb-sync1:i386 (1.13-2~ubuntu18.04) ...
Setting up dkms (2.3-3ubuntu9.5) ...
Setting up libnvidia-encode-430:amd64 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up g++ (4:7.4.0-1ubuntu2.3) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up nvidia-dkms-430 (430.40-0ubuntu0~gpu18.04.1) ...
update-initramfs: deferring update (trigger activated)
INFO:Enable nvidia
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/dell_latitude
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/lenovo_thinkpad
DEBUG:Parsing /usr/share/ubuntu-drivers-common/quirks/put_your_quirks_here
Loading new nvidia-430.40 DKMS files...
Building for 4.15.0-20-generic
Building for architecture x86_64
Building initial module for 4.15.0-20-generic
Done.

nvidia:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.0-20-generic/updates/dkms/

nvidia-modeset.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.0-20-generic/updates/dkms/

nvidia-drm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.0-20-generic/updates/dkms/

nvidia-uvm.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.15.0-20-generic/updates/dkms/

depmod...

DKMS: install completed.
Setting up libglx-mesa0:amd64 (19.0.2-1ubuntu1.1~18.04.2) ...
Setting up libxdamage1:i386 (1:1.1.4-3) ...
Setting up libxext6:i386 (2:1.3.3-1) ...
Setting up libxfixes3:i386 (1:5.0.3-1) ...
Setting up build-essential (12.4ubuntu1) ...
Setting up libnvidia-decode-430:i386 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libnvidia-gl-430:i386 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libnvidia-encode-430:i386 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libxxf86vm1:i386 (1:1.1.4-1) ...
Setting up libglx0:amd64 (1.0.0-2ubuntu2.3) ...
Setting up libglx-mesa0:i386 (19.0.2-1ubuntu1.1~18.04.2) ...
Setting up libgl1:amd64 (1.0.0-2ubuntu2.3) ...
Setting up libnvidia-ifr1-430:amd64 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libglx0:i386 (1.0.0-2ubuntu2.3) ...
Setting up libnvidia-fbc1-430:amd64 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up nvidia-driver-430 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libgl1-mesa-glx:amd64 (19.0.2-1ubuntu1.1~18.04.2) ...
Setting up libgl1:i386 (1.0.0-2ubuntu2.3) ...
Setting up libnvidia-ifr1-430:i386 (430.40-0ubuntu0~gpu18.04.1) ...
Setting up libnvidia-fbc1-430:i386 (430.40-0ubuntu0~gpu18.04.1) ...
Processing triggers for initramfs-tools (0.130ubuntu3) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-20-generic
Processing triggers for libc-bin (2.27-3ubuntu1) ...

When installation finished, reboot your Ubuntu machine:

sudo reboot

Verifying Nvidia Driver:

Once your Ubuntu machine reboot completed, type the following command:

sudo nvidia-smi

You will see the output similar to the following, confirms that your Nvidia Graphics Driver installation was successful


Type the following command to open up Nvidia X Server Settings Window

sudo nvidia-settings

and you will see the following Nvidia X Server Settings which means your Nvidia graphics adapter is working fine and running with the latest NVIDIA Driver Version 430.40


Now Navigate to Ubuntu Settings> Devices > About and you will see your NVIDIA Graphics adapter is taken into account.


Wrapping up

Congrats! You now have successfully installed latest NVIDIA graphic driver on your Ubuntu 18.04 machine.

Viewing all articles
Browse latest Browse all 880

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>