Install NVIDIA driver on your ubuntu
Install the official NVIDIA driver using a third-party library and disable the open-source driver.
1. add third-party repositpry PPA
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update2. disable the open-source driver nouveau
Ubuntu uses the open-source driver nouveau by default, so you need to disable nouveau before installing the NVIDIA driver.
sudo bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
sudo bash -c "echo options nouveau modeset=0 >> /etc/modprobe.d/blacklist-nvidia-nouveau.conf"Then you can enter the following command to verify that the above command was entered into the file “/etc/modprobe.d/blacklist-nvidia-nouveau.conf”.
cat /etc/modprobe.d/blacklist-nvidia-nouveau.confIt works if the following message is displayed:
$ cat /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nouveau
options nouveau modeset=03. Install the official NVIDIA driver
Uninstall the old NVIDIA driver (if needed):
sudo apt-get purge nvidia*Add drivers to PPA repository:
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get updateSearch for latest NVIDIA drivers:
sudo apt-cache search nvidiaSearch for recommanded NVIDIA drivers:
ubuntu-drivers devicesOpen “Ubuntu Software” in your system, then click “Software & Updates” in the upper left corner, then click “Additional Drivers,” select one of the drivers (I find it best to choose a newer, proprietary driver), and then click “Apply Changes.” After installation, the system will ask you to restart. If the screen looks great after restarting, you’re all done!
View the current driver:
nvidia-smi