Loading...
X

How to fix Linux booting to black screen (SOLVED)

Pretty harmless video card settings (for example, installing drivers, choosing a video card for video output on a laptop, enabling 10-bit color depth) can lead to a serious problem for beginners: the Linux operating system boots into a black screen.

Since this problem cannot be solved by the usual methods in the graphical interface, novice Linux users often come to the conclusion that the OS is completely corrupted and reinstall Linux.

In fact, it is enough to simply roll back the changes made, and you can continue to use the OS. By the way, for this reason, remember what actions you performed so that it is easier to return to the previous Linux settings.

Unable to boot into GUI

If you cannot boot into the GUI, then try using the keyboard shortcuts Ctrl+Alt+F1, Ctrl+Alt+F2, Ctrl+Alt+F3 and so on to go to the console.

Log in there.

If you managed to log in, then you will have to perform all actions in the console without a graphical interface.

To view the history of entered commands, use the cursor key

If you created new configuration files to configure the OS, then most likely they can be deleted entirely. To do this, you can use a command like:

sudo rm /PATH/TO/FILE

Of course, be careful and make sure it's safe before you run the command to delete a file. To do this, for example, you can view the contents of the problem file:

sudo cat /PATH/TO/FILE

If you have made changes to the existing configuration files, then familiar text editors such as gedit will not work in the console. Use the console text editors nano and vim instead. If you're not familiar with either of these, then use nano as it's easier.

To open a file in the console for editing, use a command like

sudo nano /PATH/TO/FILE

For example:

sudo nano /etc/modprobe.d/blacklist-nouveau.conf

Don't forget to save your changes when you exit the text editor.

If the problematic settings are related to starting services at startup using “systemctl enable”, then remove these services from startup using “systemctl disable”. If the unsuccessful setting is related to switching to an alternative service, then disable the service that prevents booting and enable its counterpart.

For example, an attempt was made to switch from GDM to LightDM and, among other things, commands were executed that remove the GDM service from autoload and enable LightDM autoload:

sudo systemctl disable gdm
sudo systemctl enable lightdm

If after that the system cannot boot into the graphical interface, then you need to do the reverse steps to disable and enable autoload services:

sudo systemctl disable lightdm
sudo systemctl enable gdm

When you finish system restore, to reboot, run the command:

reboot

Conclusion

If Linux boots into a black screen as a result of incorrect configuration or installation of new packages, then this problem can almost always be fixed without reinstalling the operating system. The main thing is to understand what to do, or at least be able to log in without a graphical interface and be able to use the console and console text editors when the graphical interface is not available.

For other possible reasons why Linux does not boot and how to solve them, see the article “What to do if Linux does not boot”.


Leave Your Observation

Your email address will not be published. Required fields are marked *