Score:1

Ubuntu 20.04 boots to black screen with mouse pointer

mx flag

I can't boot ubuntu. It hangs at a black screen with a mouse pointer that doesn't respond to mouse movement. I've read a number of other threads on this but nothing's worked so far. In particular, I have very limited terminal access: with Ctrl + Alt + F<anything> or Alt + F<anything> I can login and type commands, but I often can't see what I'm typing and after a short time it stops working.

I can get to a grub prompt if I choose a different boot option (not the one which shows you a list of options to boot into, but the one with a prompt).

Other details:

  • The mouse pointer is large and low resolution, as though the graphics drivers aren't loading
  • I have been using this Ubuntu install without problems for weeks
  • I'm dual booting Windows. That runs fine
  • I have a GTX 1070 with drivers installed
  • I think I installed docker the last time I used Ubuntu
  • I have a 20.04 usb pen, which runs fine, and which I've used to copy most of my important files onto an external drive (though not all because files have varying permissions)

UPDATE got to normal grub screen, previous kernel version works (mostly) OK

sancho.s ReinstateMonicaCellio avatar
Did you have a chance of testing what was suggested?
joel avatar
mx flag
@sancho.sReinstateMonicaCellio I'd actually already reformatted before I got any answers, so I can't test any of them. I'll probably just take an educated guess when awarding the bounty
Score:1
pl flag

You could boot into a working kernel (you mentioned you have that) and

  1. Try debugging, and then fixing the problem
  2. Try to come to a clean state, regardless of the problem

Debugging the problem

To start debugging the causes of the problem, use journalctl and other commands. For instance,

$ journalctl --list-boots

lists all available logs. To see log for the previous boot,

$ journalctl -b -1

By default, journalctl pages output. If you want to avoid that, e.g. to grep or wc the output, and/or logs are very long, use

$ journalctl --no-pager -b -1

or flag -e to go straight to the end (but you may not have the complete log available for scrolling back).

To see the kernel ring buffer, use dmesg. Important flags are: -e or -T to use human-readable times, -P to avoid paging, -H for a human-readable output. See the complete list here.

Possible straight solution

Whenever a newer kernel becomes available, an update will install it and set it as the default option in grub. So your system may be fully functional again, regardless of the problem.

Post the output of

$ uname -a
$ lsb_release -a

to check this.

Sources

  1. https://www.loggly.com/ultimate-guide/using-journalctl/
  2. How to find previous boot log after Ubuntu 16.04+ restarts?
  3. https://unix.stackexchange.com/questions/159221/how-do-i-display-log-messages-from-previous-boots-under-centos-7
  4. https://unix.stackexchange.com/questions/181067/how-to-read-dmesg-from-previous-session-dmesg-0
  5. https://superuser.com/questions/565927/differences-in-var-log-syslog-dmesg-messages-log-files
Score:1
it flag

From a TTY terminal (the ones you said you can access) try running

sudo apt update && sudo apt upgrade

I know this sounds like an overly simplified solution, but it will most likely upgrade your kernel. If it doesn't work, keep trying every few days until yuo get a new kernel build. It will say so in the output.

Score:1
in flag

Rather than give instructions on how to repair this, let me explain what probably happened.

Very likely, either you installed updates, or unattended-upgrades installed updates, and the updates included a new kernel which failed to install for some reason. Most likely reasons would be the disk was full (or maybe just /boot was full), or the install was interrupted somehow and didn't complete.

The correct solution at this point would have been to select an older kernel until you find one that boots correctly, and then check logs and correct the error and then rerun updates. That should have fixed this. If an older kernel booted successfully, then there would be no need to reformat -- you could even have just kept using the system normally using the older kernel.

Since you have already reinstalled, there are probably no logs left to check, so it's hard to say exactly why it failed.

Score:0
mx flag

I repeatedly pressed esc on startup to get to the grub screen* (with the list of options to boot) and used a previous kernel version. From there, I collected my files together and reformatted my drive.

Somewhat of a nuclear option. Would be interested to hear of an easier one.

*as suggested in a number of other threads

Kunal Shah avatar
us flag
It seems that your kernel somehow is corrupted. Just as you boot into previous kernel, performing a fresh kernel upgrade from there should fix the problem. However, you need to ensure that most of the kernel modules, especially nvidia is loaded into new kernel after the upgrade.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.