Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Latest Nvidia Driver in Ubuntu 18.04

Install Latest Nvidia Driver in Ubuntu 18.04 LTS

Step: 1

Remove previous installation

sudo apt-get purge nvidia*
sudo apt-get autoremove 

Step: 2

Install Dependencies

sudo apt-get install build-essential gcc-7 gcc-multilib dkms

Step: 3

Blacklist for Nouveau Driver

Create a new file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents-

blacklist nouveau
options nouveau modeset=0

then excute

sudo update-initramfs -u

And Restart (sudo reboot)


Step: 4

Stop gdm

sudo service gdm stop

Step: 5

Excuting the Runfile

Download latest driver from here

cd Downloads

chmod +x NVIDIA-Linux-x86_64-430.14.run
sudo ./NVIDIA-Linux-x86_64-430.14.run --dkms -s --no-cc-version-check

Note: --no-cc-version-check is for Compiler Mismatch problem



Common Problems and Solutuins

Problem 1:

ERROR: An NVIDIA kernel module 'nvidia' appears to already be loaded in your kernel.

Solutuins:

dkms status

if the output is something like this nvidia-410, 410.78, 4.4.0-138-generic, x86_64: installed, then we need comma seperated first three string- nvidia-410, 410.78, 4.4.0-138-generic

$ sudo dkms remove nvidia-410/410.78 -k 4.4.0-138-generic
@gowrishankarin

This comment has been minimized.

Copy link

gowrishankarin commented Aug 3, 2020

This is very useful. What happens afterwards... I got some error

nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.51.06 Driver Version: 450.51.06 CUDA Version: 11.0 |
|-------------------------------+----------------------+----------------------+
| 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 108... On | 00000000:01:00.0 Off | N/A |
|ERR! 53C P0 ERR! / 250W | 1MiB / 11175MiB | 100% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.