Solution of linux Server Graphics Crash
- 2021-08-17 01:47:03
- OfStack
When the resolution of the login interface is particularly large, the whole graphical interface is particularly large, and you can't log in at all
In this case, 1 is the reason why the graphics card driver collapsed, so we can first check whether there is a problem with the graphics card driver
nvidia -smi
If there is a problem that says the driver link is not connected, it means that there is a problem with your graphics card driver
The following treatment methods are mainly adopted
1. Access the ubuntu system
First CTRL+ALT_F1 arrives at the character processing interface
Then enter the administrator account and password to log in, at this time you are equivalent to entering the terminal
Problems encountered: In this step, because we are a server with multiple accounts, login incorrect always appears when logging in to the administrator account, but you can log in through ordinary users, so log in through ordinary users, then su and then enter the password
2. Download the official NVIDIA graphics card driver
Download address: http://www.geforce.cn/drivers
Choose the graphics driver version number for your own system, mine is 1080, so I chose NVIDIA-Linux-x86_64-384.130. run
After downloading it, save it on the USB disk. This process should be completed on the computer with graphical interface
3. Disable integrated nouveau drivers
The integrated graphics card driver of Ubuntu system is nouveau, which is an open source driver developed by the third party for NVIDIA. We need to shield it before installing the official driver of NVIDIA.
The following steps are mainly used for prohibition
View Properties
sudo ls -lh /etc/modprobe.d/blacklist.conf
Modify attributes
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 1 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
Step 4 Install
Since mine is a server system, I need to manually mount the U disk containing the run file into the mnt/usb directory
4.1 Manually mount the U disk containing the run file into the mnt/usb directory
(1) The version number of USB flash drive should be determined first
Enter twice before and after inserting the USB flash drive
cat /proc/partitions
Note that the USB flash drive is inserted twice before and after, and the device number of U disk is added in the second display result. Because the computer has a dual hard disk, the U disk is/dev/sdc1 in the system (sdc1 represents one partition in sdc)
In the process of operation, I just ignored the two times before and after inserting the USB flash drive, so there was no extra result displayed for the second time
(2) mount command mounts USB flash drive
Before mounting the USB flash drive, you need to create your own mnt/usb path as follows:
First navigate the path below/mnt
cd /mnt
After success, create a folder named usb under/mnt. The folder name is optional:
mkdir /mnt/usb
Start mounting the USB flash drive below
sudo mount /dev/sdc1 mnt/usb
After mounting, you can access the contents of the U disk through mnt/usb. The following command is to display the contents directory of the U disk
cd mnt/usb
ls
4.2 Installation
Enter this directory through the command cd/mnt/usb
If you have installed the video card driver before, you need to uninstall it first
sudo ls -lh /etc/modprobe.d/blacklist.conf
0
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 Uninstall USB flash drive
sudo umount /dev/sdc1
sudo umount /mnt/usb
Finally CTRL+ALT+F1 returns to the graphical interface