Skip to content

Instantly share code, notes, and snippets.

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
sudo ./ --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.


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
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.