Ubuntu18.04 install Nvidia graphics card driver record

Ubuntu18.04 install Nvidia [graphics card driver] record

Ubuntu18.04 install Nvidia graphics card driver record

The new machine, installed the driver, installed it many times, but did not record it, this time, it is convenient to check and refer to the next installation. This time the graphics card is 1080Ti, and the system is Ubuntu18.04.

1. New machine, no [gcc] .

I got an error when installing the driver, so I installed gcc first, and installed some dependency packages by the way. If it exists, it can be ignored.

sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler

sudo apt-get install --no-install-recommends libboost-all-dev

sudo apt-get install libopenblas-dev liblapack-dev libatlas-base-dev

sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev

sudo apt-get install git cmake build-essential

If the installation fails, you can repeat the installation.

2. Disable new

First disable nouveau, terminal input:

sudo gedit /etc/modprobe.d/blacklist-nouveau.conf

No content after opening, write:

blacklist new option new modeset= 0

After writing and saving, the update enables the disabled nouveau to take effect:

sudo update-initramfs -u

3. Download the driver

Log in to the NVIDIA official website and download the driver. Select the driver version corresponding to the graphics card, this time the graphics card is 1080ti, and the downloaded driver version is: NVIDIA-Linux-x86_64-440.100.run.
After the download is complete, put it in the square home directory for easy installation.

4. Driver installation

Ctrl + Alt + F1 to enter the text mode, enter the account password to log in, and Ctrl + Alt + F7 to return to the graphical mode.
(1) Ctrl + Alt + F1 to enter the text mode, enter the account password in the text mode, and then execute:

sudo service lightdm stop        # close the desktop service

Then through Ctrl + Alt + F7, it is found that the graphical mode cannot be successfully returned, indicating that the desktop service has been successfully closed. Note that this step is particularly important for the next NVIDIA driver installation, and it is necessary to ensure that the desktop service is closed.
(2) If the driver has been installed, you can uninstall it first and install it to avoid errors.

sudo apt-get remove nvidia-*

(3) Ctrl + Alt + F1 to enter text mode, and then run the NVIDIA installation file to install, we have moved the NVIDIA installation file to HOME before, and run the installation file directly through the sh command:

sudo sh NVIDIA-Linux-x86_64- 440 . 100 .run - no -nouveau-check - no -x-check - no -opengl-files         # Disabling opengl can solve the problem of looping login during installation

-no-x-check: Turn off the X service when installing the driver;
-no-nouveau-check: Disable nouveau when installing;
-no-opengl-files: Only install the driver, not the opengl files.
Note: For reference in this part: /yunshangyue/article/details/104983122
You can also refer to this link for some options during the installation process, thank you here!

5. After the installation is complete, restart.

sudo reboot

6. Terminal to view driver information

nvidia-smi

The installation is complete!

Leave a Comment

Your email address will not be published. Required fields are marked *