12

This is a recent installation which appeared to be working just fine. While sorting out some teething troubles with ESP-IDF I got a warning about some update failure - no details - and then nothing seemed to work. I'm guessing automatic updates in the background. Pretty sure I wasn't doing anything controversial. Upon rebooting I briefly see a message that "sda4 is clean" and then a flashing cursor forever. I have tried CTRL+SHIFT+F1 but this does nothing.

Is there any way to recover this? I have an nvidia graphics card, as that seems to come up in similar questions. I guess I can boot from the DVD again, but hopefully can avoid re-installation.

  • 2
    Can you get to the CLI by entering CTRL-ALT-F3? – Ollie Jun 16 '20 at 20:48
  • I can. I thought I'd tried all the Fn, but I guess not. Thanks. – Alan Chambers Jun 16 '20 at 21:24
  • So I have run jounalctl -xe as advised elsewhere. The log is full of warnings about tasks timing out. The top of the file appears to have a whole bunch of failures around xorg, and we have "GdmDisplay: Session never registered, failing" just before "systemd[1]: session-c5.scope: Succeeded". After that there is a ton more, including failures around something called Tracker file system data miner, a virtual file system and others. Not sure if those are important or just checking for things that aren't there. – Alan Chambers Jun 16 '20 at 21:42
  • Your issue may have been caused by the failed update. However, it won’t hurt to try this first, if you are looking to avoid a reinstall: https://askubuntu.com/a/1319463/100356. Since you can’t boot to a GUI or terminal, you’ll first have to boot into recovery mode or use a live iso, and then mount your / root partition in order to edit the /lib/udev/rules.d/61-gdm.rules file. – Enterprise Mar 17 '21 at 15:57

4 Answers4

26

I also encountered the black screen with my new installation, and it was a relatively easy fix. Press CTRL-ALT-F3 to trigger the CLI, and, once logged in, type:

sudo nano /etc/default/grub

Find the line with the variable GRUB_CMDLINE_LINUX_DEFAULT, and add nomodeset to the variables, so it looks like this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

Then update-grub:

sudo update-grub 

And it should boot. I also ran apt-get update -y && apt-get upgrade -y once in just to make sure everything is good to go. Best of luck!

Ollie
  • 2,932
  • 1
    Sadly that didn't work. I have booted into Windows because I feared something might be wrong with the graphics card after looking at the kernel log. Seems fine. – Alan Chambers Jun 16 '20 at 22:00
  • 2
    I wish I could upvote this 100 times! Saved my life thank you!! – Chris Kempen Jan 18 '21 at 19:20
  • Thank you! This worked for me. Now that I think about it, the Nvidia drivers I installed did do something that made me boot into command line the first time too. But then I removed them because I installed it in a haphazard way and needed to reinstall everything, so it let me go to desktop when I restarted gdm3. This time restarting gdm3 service didn't work, probably because Nvidia drivers kept on forcing me into command line or something? I have no idea. Oh well. – qwyxivi Feb 02 '21 at 07:00
  • It worked for me well. It would be good to know what 'nomodeset' does? Should I leave this entry or delete it? – as5 Feb 17 '22 at 09:39
  • Just to note that it seems indeed something with nvidia. I had a fresh install of ubuntu 21.10 and did the offered updates. Now, after booting I could choose the proprietary drivers. I use dell precision 3561 and nvidia t600 4gb. – as5 Feb 17 '22 at 09:40
  • I ran also the updates with apt-get update ... before rebooting. Maybe it is good to state if it does make sense when to do it. Bcs. I was unsure. – as5 Feb 17 '22 at 09:41
  • Following this broke my machine even more and prevented me from even logging into a non-GUI terminal using Ctrl+Alt+F3. This solution worked for me in the end: https://askubuntu.com/a/1319463/855813 – Peter Feb 24 '22 at 12:45
  • This fixed the problem for me on my 2013 Macbook Pro with Ubuntu 22.04. – Clint Jun 30 '22 at 00:31
  • NOTE: this only worked for me when also running sudo apt-get purge nvidia* and then sudo reboot. – mhdadk Aug 18 '22 at 21:18
  • Awesome man. Thanks a lot! You saved my day! Upvoted! – Deepak Ahire Dec 28 '23 at 17:49
7

On Ubuntu 20.04 I fixed this by doing:

  1. Ctrl+Alt+F3

  2. Log in.

    sudo ubuntu-drivers autoinstall
    
  3. Reboot.

  • After I applied the solution by @Ollie, I still had some troubles with graphics (no resolution changes possible, 2nd screen does not work). I applied the command above. At next reboot I again stack in the black screen with cursor. When opened the terminal and tried the solution by Ollie again which did not work. Then I removed the "nomodeset" and reinstalled the drivers again. I could log in iinto Ubuntu now and the issues mentioned above were fixed. – as5 Feb 17 '22 at 10:15
  • Note that there were problems when opening terminal: I was logged out back to the black screen with cursors. holding f3 helped to stick in the terminal. After logging in Ubuntu the error appeared: "gdm3 crashed with SIGSEGV in g_colsure_invoke() – as5 Feb 17 '22 at 10:15
  • This saved me, my Nvidia driver install went sideways and I didn't realize it, the given command fixed it, thanks for the suggestion – Eman Aug 07 '23 at 03:17
1

I experienced a similar issue after a system update that required a reboot. However, I couldn't open a text console with any CTRL-ALT-F# key combinations.

Ultimately what fixed it for me were the following steps:

  1. Booted into recovery mode and ran the "dpkg Repair broken packages" option.

  2. Then ran the "root Drop to root shell prompt" option and from the command line uninstalled and reinstalled my AMD Radeon graphics card drivers.

  3. Rebooted and pressed the 'e' key to edit the "*Ubuntu" boot option in GRUB and added "noresume" at the end of the line that starts with "linux", then pressed Ctrl-X to boot from the modified line.

Hope this helps someone...

John U
  • 11
0
sudo apt update 
sudo apt upgrade
sudo apt autoremove
sudo apt remove ubuntu-desktop
sudo apt autoremove
sudo apt install ubuntu-desktop

or:

sudo apt-get install ubuntu-gnome-desktop

or one could try:

sudo apt-get install --reinstall ubuntu-gnome-desktop

or whatever desktop you have (can be xfce4, KDE, or something else although I have not tried all of the options, but xfce4 seems to work flawlessly).