The solution to the problem that the ubuntu system cannot be started due to a black screen when restarting after installing

The solution to the black screen that cannot be started when the ubuntu20.04 system restarts just after installation

Code words are not easy, I hope you can pay more attention to the WeChat public account: Algorithm House in the Rain , exchange more ubuntu system usage and more algorithm knowledge seminars, learn together, and make progress together. If you have any questions, you can also follow the public account and add me to WeChat to contact me. I'll do my best to help out.

1. First, use Ctrl+Alt+F2 to enter the command line mode on the black screen interface, first enter the user name set when you entered after login and press enter, and then enter the password enter, and you will find that you have successfully entered the system! This shows that the system is running perfectly fine! Then the reason for the black screen of the system is probably that the Nouveau graphics card driver that comes with the Ubuntu system is not compatible with the Nvidia graphics card. At this time, you can enter after the command line:

sudo vi /etc/default/grub

Find quiet splash and add nomodeset after it. As shown in the figure below: (here you need to use vim-related operations, if you don’t know how to do it, you can use Baidu)
insert image description here

Then enter the following command to update the grub configuration file

sudo update-grub

After updating the grub configuration file, enter reboot to restart

reboot

At this time, the latter can enter the system.

Reference link:
http://t.csdn.cn/2PL7n
http://t.csdn.cn/9tZRx
2. There is another way to temporarily enter the system
(1) Enter the following interface when starting up, and select the second option (advanced options for ubuntu)
insert image description here
(2) At this time, you will see the following content, first select the clean below, and then select the first resume after confirmation to enter the ubuntu system, but this method must be done every time you enter the system , is more troublesome, so it can be completely solved with the first method.
insert image description here
Reference link:
https://www.cnblogs.com/masbay/p/10718514.html
http://t.csdn.cn/Bbyap
http://t.csdn.cn/lR6cL

Then you need to install the driver:
1. Ubuntu installs the third-party open source driver nouveau by default. To install the nvidia graphics card driver, you first need to disable nouveau, otherwise you will encounter conflicts and cannot install the nvidia graphics card driver.
Edit the file blacklist.conf:

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

Insert the following two lines at the end of the file

blacklist nouveau
options nouveau modeset=0

update system

sudo update-initramfs -u

Reboot the system (be sure to reboot)
to verify that nouveau is disabled

lsmod | grep nouveau

insert image description here
No information is displayed, indicating that nouveau has been disabled, and the nvidia graphics card driver can be installed next.
2. Enter the command line interface under ubuntu
and then enter in the command line interface: (//This is to close the graphical interface, if it is not executed, an error will occur. I think it is useless)

 sudo service lightdm stop     

Then uninstall the original driver: (If you have installed other versions or installed the driver in other ways, execute this item)

 sudo apt-get remove nvidia-*  

3. Enter the following command to install the Nvidia driver ( #Check the Nvidia version recommended by the system)

ubuntu-drivers devices 

With the "recommended" option, it is the recommended version of the system. As shown in the figure below, mine is nvidia-driver-515
insert image description here
4. Find software and updates in the nine dots in the lower left corner of ubuntu, select additional drivers, change the last option to the corresponding driver version just queried, and application.
After setting, be sure to shut down and restart again! ! !
insert image description here
5. Finally, enter in the terminal

nvidia-smi

If the following figure appears, it means the driver installation is successful.
insert image description here
Reference link:
http://t.csdn.cn/lsN6b
http://t.csdn.cn/1n5j2
http://t.csdn.cn/sDAtO

Code words are not easy, I hope you can pay more attention to the WeChat public account: Algorithm House in the Rain , exchange more ubuntu system usage and more algorithm knowledge seminars, learn together, and make progress together. If you have any questions, you can also follow the public account and add me to WeChat to contact me. I'll do my best to help out.

Guess you like

Origin blog.csdn.net/yuzhongmanbu99/article/details/125700897