Ubuntu18.04 install Nvidia graphics driver tutorial (graphic)

0、 Preliminary preparation

Disable the secure boot of the BIOS, that is, disable it. If it is not closed, installing the graphics card driver using a third-party source will not work after installation.

1、 Disable nouveau

1、 Create a file, if you haven’t downloaded the vim editor, just change vim to gedit

$ sudo vim /etc/modprobe.d/blacklist-nouveau.conf

2、 Insert the following content in the file to add nouveau to the blacklist, which is not enabled by default

blacklist nouveau
options nouveau modeset=0

3、 Enter the following command to make the disable effective and then restart

$ sudo update-initramfs -u
$ sudo reboot

4、 Verify after restart

lsmod | grep nouveau

If there is no response after pressing Enter, then disable successfully

2、 Install graphics driver

First completely uninstall the graphics driver installed before:
Uninstall the ppa source file:

$ sudo apt-get remove --purge nvidia*

Runfile source file uninstall:

$ sudo ./NVIDIA-Linux-x86_64-384.59.run --uninstall

Now introduce the easiest installation method-ppa source driver installation
Query the most suitable graphics card driver version for the computer

ubuntu-drivers devices

As shown in the figure, the best graphics driver version for my computer is nvidia-driver-435
Then use the command line to install

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt-get update
$ sudo apt-get install nvidia-driver-435 #The number here should correspond to the version number queried above
$ sudo apt-get install mesa-common-dev

Note: If you have not disabled secure boot before, you will be prompted to set a password during the installation process, and you need to enter the password verification to disable secure boot when restarting. A blue screen will appear after restarting. At this time, you cannot directly select continue, but press the button , Select Enroll MOK, after confirming, select continue in the next option, then enter the password set during driver installation, and turn on the computer.

Restart after installation

$ sudo reboot

Verify in terminal after restart

$ nvidia-smi

If the GPU list appears, the installation is successful

Recommended Posts

Ubuntu18.04 install Nvidia graphics driver tutorial (graphic)
Install nvidia graphics driver under Ubuntu (easy installation method)
Install MySQL under Ubuntu 18.04 (graphic tutorial)
Ubuntu20.04 steps to install cuda10.1 (graphic tutorial)
How to install Ubuntu20.04 and install NVIDIA driver
Ubuntu16.04 install Mongodb tutorial
Ubuntu 18.10 configure Nvidia driver
ubuntu: install camera driver
ubuntu14.04 install jdk1.8 tutorial
Windows10 install ubuntu20.04 dual system detailed graphic tutorial
ubuntu19.04 installation tutorial (graphic steps)
5.1. CentOS@ install JDK1.8 graphic tutorial
Lenovo Y480 ubuntu install wired driver
Install Tenda u12 driver on Ubuntu
Ubuntu 20.04 CUDA&cuDNN installation method (graphic tutorial)
Ubuntu 16.04 installation graphic tutorial under VMware 12
Ubuntu Intel graphics driver installation (Ubuntu 14.04--Ubuntu 16.10 + Intel® Graphics Update Tool)
Ubuntu 14.04 16.04 Linux nvidia driver download and installation
Ubuntu 18.04 install Odoo14 tutorial through source code
Ubuntu20.04 install Python3 virtual environment tutorial detailed explanation
ubuntu18.04 install python2
Ubuntu operation tutorial
ubuntu18.04 install docker
ubuntu12.04 install python3
Ubuntu install guide
ubuntu 16 install asp.net
ubuntu install leanote
ubuntu install Jenkins
docker install ubuntu
ubuntu install elasticsearch
ubuntu16.0.1 install pagoda
ubuntu18.04 install python
ubuntu 18.04 install teamviewer
ubuntu install sendmail
A simple tutorial to install Sogou Pinyin on ubuntu18.04
Install apache+PHP under Ubuntu
Install mysql-pytho in Ubuntu
Install Redis on Ubuntu
Install R4 on ubuntu20
Install nvtop on Ubuntu 18.04
Install postgresql-10 on Ubuntu 18.04
Install python3.6 under Ubuntu 16.04
Centos install MYSQL8.X tutorial
Ubuntu18.04 install opencv 3.2.0 solution
Install mysql under Ubuntu 16.04
Install Thrift under ubuntu 14.10
Centos install elasticsearch tutorial
Install OpenJDK10 under Ubuntu
Install Caffe under Ubuntu 14.04
Install Docker on ubuntu18.04
ubuntu install harbor warehouse
Install mysql on Ubuntu 14.04
Install Django on ubuntu
Install Pytorch+CUDA on Ubuntu 16.04
2018-09-11 Install arduino under Ubuntu
Centos7 install kubernetes tutorial
Centos7 install Mysql8 tutorial
Install Python3 on Ubuntu 14.04
Ubuntu18.04 install Asterisk16.10 + FreePBX15.0
Ubuntu19 install MySQL pit
ubuntu16.04 install node.js, npm