Install Nvidia driver on Ubuntu can be very tricky. Sometimes it goes extremely smooth while sometime it just doesn’t work. Follow these following steps, it should make it easier.
-
Download Nvidia driver to your Ubuntu machine from its website. It is a .run file.
-
Install make and gcc.
sudo apt install make sudo apt install gcc
-
Disable Nouveau kernel driver.
# Create a file sudo nano /etc/modprobe.d/blacklist-nouveau.conf
with the following contents:
blacklist nouveau options nouveau modeset=0
Regenerate the kernel initramfs:
sudo update-initramfs -u
Then reboot
sudo reboot
-
Hit Ctrl+Alt+F1 and login using your credentials. Then kill your current X server session by typing sudo service lightdm stop or sudo lightdm stop. Enter runlevel 3 by typing:
sudo init 3
-
Install the driver
sudo ./Your_Nvidia_Driver.run
Ref: