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

How to reset your Linux password if lost

1. The startup menu is to move the cursor to the ...

IE6 space bug fix method

Look at the code: Copy code The code is as follows...

MySQL series 9 MySQL query cache and index

Table of contents Tutorial Series 1. MySQL Archit...

Detailed example of changing Linux account password

Change personal account password If ordinary user...

Solution for Vue routing this.route.push jump page not refreshing

Vue routing this.route.push jump page does not re...

MySQL 5.6.23 Installation and Configuration Environment Variables Tutorial

This article shares the installation and configur...

How to implement the paging function of MyBatis interceptor

How to implement the paging function of MyBatis i...

Tutorial on downloading, installing, configuring and using MySQL under Windows

Overview of MySQL MySQL is a relational database ...

How to write object and param to play flash in firefox

Copy code The code is as follows: <object clas...

MySQL database development specifications [recommended]

Recently, we have been capturing SQL online for o...

Install and configure ssh in CentOS7

1. Install openssh-server yum install -y openssl ...