Solution to Linux server graphics card crash

Solution to Linux server graphics card crash

When the resolution of the login interface is particularly large, the entire graphical interface is particularly large, and you cannot log in no matter what.

In this case, it is usually because the graphics card driver crashes, so we can first check whether there is a problem with the graphics card driver.

nvidia -smi

If the driver cannot be linked, it means that there is a problem with your graphics card driver.

The following treatment methods are mainly used

1. Enter the Ubuntu system

First, press CTRL+ALT_F1 to reach the character processing interface

Then enter the administrator account and password to log in. At this time, you are equivalent to entering the terminal

Problem encountered: In this step, since we are a multi-account server, when logging in to the administrator account, there is always a login incorrect error, but it is possible to log in through a normal user, so log in through a normal user, then su and enter the password

2. Download the official NVIDIA graphics card driver

Download address: http://www.geforce.cn/drivers

Select the graphics driver version number corresponding to your own system. Mine is 1080, so I chose NVIDIA-Linux-x86_64-384.130.run

After downloading, save it in a USB flash drive. This process must be completed on a computer with a graphical interface.

3. Disable the integrated nouveau driver

The graphics card driver integrated into the Ubuntu system is nouveau, which is an open source driver developed by a third party for NVIDIA. We need to block it before installing the official NVIDIA driver.

The following steps are mainly used to prohibit

View Properties

sudo ls -lh /etc/modprobe.d/blacklist.conf

Modify properties

sudo chmod 666 /etc/modprobe.d/blacklist.conf

Open with vim editor

sudo vim /etc/modprobe.d/blacklist.conf

Add the following lines of code to the last line of the file

blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist rivatv
blacklist nvidiafb

And execute

sudo update-initramfs -u

Execute after restart

lsmod | grep nouveau

4. Installation

Since I am using a server system, I need to manually mount the USB drive containing the run file to the mnt/usb directory.

4.1 Manually mount the USB disk containing the run file to the mnt/usb directory

(1) First, determine the version number of the USB flash drive.

Enter twice before and after inserting the USB drive

cat /proc/partitions

Please note that this is done twice, before and after inserting the USB flash drive. The extra number in the second display result is the device number of the USB flash drive. Because the computer has dual hard disks, the USB flash drive is /dev/sdc1 in the system (sdc1 represents a partition in sdc)

During the operation, I ignored the two times before and after inserting the USB drive, so there was no extra result displayed the second time.

(2) Use the mount command to mount the USB drive

Before mounting the USB drive, you first need to create the mnt/usb path yourself. The path is as follows:

First, locate the path to /mnt

cd /mnt

After success, first create a folder called usb under /mnt, the folder name is arbitrary:

mkdir /mnt/usb

Start mounting the USB drive below

sudo mount /dev/sdc1 mnt/usb

After mounting, you can access the contents of the USB disk through mnt/usb. The following command displays the contents of the USB drive:

cd mnt/usb
ls

4.2 Installation

Enter the directory through the cd /mnt/usb command

If you have installed the graphics driver before, you need to uninstall it first.

sudo apt-get --purge remove nvidia-*

The installation instructions are as follows

sudo chmod a+x NVIDIA-Linux-x86_64-384.130.run
sudo ./NVIDIA-Linux-x86_64-384.130.run -no-x-check -no-nouveau-check -no-opengl-files

4.3 Unmount the USB drive

sudo umount /dev/sdc1
sudo umount /mnt/usb

Finally, press CTRL+ALT+F1 to return to the graphical interface

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Trash-Cli: Command-line Recycle Bin Tool on Linux
  • 101 scripts to create a Linux recycle bin script
  • Linux uses suid vim.basic file to achieve privilege escalation
  • Quickly solve the Chinese input method problem under Linux
  • Use MySQL to open/modify port 3306 and open access permissions in Ubuntu/Linux environment
  • Detailed explanation of commands to read and write remote files using Vim in Linux system
  • Detailed explanation of the implementation process and usage of the Linux Recycle Bin mechanism

<<:  React implements double slider cross sliding

>>:  MySQL scheduled backup solution (using Linux crontab)

Recommend

MySQL example of getting today and yesterday's 0:00 timestamp

As shown below: Yesterday: UNIX_TIMESTAMP(CAST(SY...

How InnoDB implements serialization isolation level

Serialization implementation InnoDB implements se...

Implementation of setting fixed IP when starting docker container

Network type after docker installation [root@insu...

Vue3 compilation process-source code analysis

Preface: Vue3 has been released for a long time. ...

CSS float property diagram float property details

Using the CSS float property correctly can become...

6 inheritance methods of JS advanced ES6

Table of contents 1. Prototype chain inheritance ...

HTML table mouse drag sorting function

Effect picture: 1. Import files <script src=&q...

How to use CSS to achieve two columns fixed in the middle and adaptive

1. Use absolute positioning and margin The princi...

HTML cellpadding and cellspacing attributes explained in pictures

Cell -- the content of the table Cell margin (tabl...

Detailed explanation of nginx forward proxy and reverse proxy

Table of contents Forward Proxy nginx reverse pro...

Example of pre-rendering method for Vue single page application

Table of contents Preface vue-cli 2.0 version vue...

MySQL turns off password strength verification

About password strength verification: [root@mysql...

JavaScript to achieve window display effect

This article shares the specific code of JavaScri...