Tutorial on installing Nvidia graphics card driver in Ubuntu 18.04 (with pictures and text)

Tutorial on installing Nvidia graphics card driver in Ubuntu 18.04 (with pictures and text)

0. Preliminary preparation

Disable secure boot in BIOS. If it is not disabled, the graphics card driver installed using a third-party source will not be usable after installation.

1. Disable nouveau

1. Create a file. If you have not downloaded the vim editor, replace vim with gedit.

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

2. Insert the following content into 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 disablement 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, the function is disabled successfully.

2. Install the graphics card driver

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

$ sudo apt-get remove --purge nvidia*

Runfile source file uninstallation:

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

Now let me introduce the simplest installation method - ppa source driver installation to query the most suitable graphics driver version for your computer

ubuntu-drivers devices 


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

$ 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 secure boot is not disabled before, you will be prompted to set a password during the installation process. You will need to enter the password to disable secure boot when restarting. A blue screen will appear after restarting. At this time, you cannot directly select continue. Instead, you should press the button and select Enroll MOK. After confirmation, select continue in the next option, then enter the password set when installing the driver and start the computer.

Restart after installation is complete

$ sudo reboot

Verify in terminal after restart

$ nvidia-smi

If a GPU list appears, the installation is successful.

This is the end of this article about the tutorial (pictures and text) on installing Nvidia graphics driver in Ubuntu 18.04. For more information about installing Nvidia graphics driver in Ubuntu 18.04, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Install nvidia graphics driver under Ubuntu (simple installation method)
  • How to check whether the graphics driver has been successfully installed in Ubuntu
  • Detailed tutorial on installing nvidia driver + CUDA + cuDNN in Ubuntu 16.04
  • How to install RTX2080 Nvidia graphics card driver in Ubuntu18.04.2
  • Ubuntu installation graphics driver and cuda tutorial

<<:  Detailed explanation of query examples within subqueries in MySql

>>:  Example of disabling browser cache configuration in Vue project

Recommend

Detailed discussion of several methods for deduplicating JavaScript arrays

Table of contents 1. Set Deduplication 2. Double ...

The process of installing and configuring nginx in win10

1. Introduction Nginx is a free, open source, hig...

A very detailed explanation of the Linux DHCP service

Table of contents 1. DHCP Service (Dynamic Host C...

How to implement https with nginx and openssl

If the server data is not encrypted and authentic...

WeChat applet implements text scrolling

This article example shares the specific code for...

Should the Like function use MySQL or Redis?

Table of contents 1. Common mistakes made by begi...

About WSL configuration and modification issues in Docker

https://docs.microsoft.com/en-us/windows/wsl/wsl-...

In-depth understanding of Mysql logical architecture

MySQL is now the database used by most companies ...

Web Design Experience: 5 Excellent Web Design Concepts Full Analysis (Pictures)

Unlike other types of design, web design has been ...

How to remove the blue box that appears when the image is used as a hyperlink

I recently used Dreamweaver to make a product pres...

Summary of Docker common commands and tips

Installation Script Ubuntu / CentOS There seems t...

Practical method of deleting a row in a MySql table

First, you need to determine which fields or fiel...

Vue globally introduces scss (mixin)

Table of contents 1. mixin.scss 2. Single file us...

The whole process of Vue page first load optimization

Table of contents Preface 1. Image Optimization 2...