First disable nouveau free/libre software drivers for NVIDIA using blacklist:
$ sudo vim /etc/modprobe.d/blacklist.conf
And include:
blacklist nouveau
blacklist lbm-nouveau
options nouveau modeset=0
alias nouveau off
alias lbm-nouveau off
Check if the nouveau has been disabled correctly:
$ lsmod | grep nouveau //It should output a negative value
Reboot the machine and stop the display manager or your OS (gmd3, sddm, kdm, lightdm are different display managers) by accessing to the TeleTYpewriter (TTY) using Ctrl+Alt+F1:
sudo service lightdm stop
sudo /etc/init.d/gdm stop
Remove the current Nvidia drivers:
$ sudo apt purge nvidia*
Install the drivers using a repository or downloading the package:
Using your repository
$ sudo apt-get update
$ sudo apt-cache search nvidia-* //Look which version do you want to install
$ sudo apt install nvidia-xxx //Replace the 'x' by the specific version
Using latest version from ppa repository
$ sudo add-apt-repository ppa:graphics-drivers
$ sudo apt update
$ sudo apt install nvidia-driver-xxx
You can also download the driver from the NVIDIA website.
https://www.nvidia.com/Download/index.aspx
Reboot the computer and test the installation:
$ lsmod | grep nvidia //Check status. It should not be empty
or
$ nvidia-smi //Must show the state of GPU
or
$ nvidia-settings //Must open a window with the GPU information and usage.
-
If you have problems with nouveau try to update the initramfs and repeat the proces *
sudo update-initramfs -u
TL;DR:
TTY in Ubuntu 18.04 goes from Ctrl+Alt+F3 up to Ctrl+Alt+F7 and Ctrl+Alt+F2 to go back to the desktop environment.