7

Ubuntu Bionic 18.04 SoftwareUpdater this morning installed updates including a new kernel version 4.15.0-24-generic #26-Ubuntu. Now when the system boots the screen displays the content of some log instead of the login prompt.

The log file is displayed after the normal red dots phase, except that there is a long pause after the 4th dot becomes red and the fifth dot never becomes red. Suddenly this log is displayed. Almost everything in it is [ OK ].

The last 3 lines of this log read

[ OK ] Started irqbalance daemon
[ OK ] System Logging Service.
[ OK ] Started GNOME DisplayManager. Dispatcher Service....upport.hanges.pp link was shut down. 

Further up is one non-OK line that might be related, but later in the line there is [ OK ]. Maybe the "Plymouth BootScreen" it refers to is what I am seeing.

[   .] A start job is running for Hold until boot process finishes up (28s / no limit)[ OK ] Started Show Plymouth BootScreen.

I tried booting the previous kernel but the same thing happens.

I am unable to scroll up to see the beginning of this log.

How can I get my system to boot properly and show the login screen?

I can ssh into the system so if I know what to change to fix this, I should be able to do it.

This is the latest in a depressingly long list of Ubuntu software updates that have ****ed up my system. It's no wonder users are reluctant to install updates.

I found Launchpad bug 1779476, opened 6/30, which matches this problem.

EDIT: Bug 1779476 is a different problem with similar symptoms. Bug 1779827 has matching symptom and cause.

3
  • This question was asked first so "asked before" should be applied to the other question. Other than that, they do describe the same problem. The answer over there says it is a kernel regression. That is not entirely clear at this point.
    – msc
    Jul 9, 2018 at 3:22
  • Question age does not matter in the determination of duplicates but answer quality does. The recommended work-arounds appear to be largely the same, so I'm voting to keep this question closed. Jul 12, 2018 at 10:24
  • Obviously quality is in the eye of the reader.
    – msc
    Jul 12, 2018 at 20:01

2 Answers 2

5

Hey I just had the same problem. I didn't investigated but I think the problem is GDM and maybe the kernel.

A quick workaround I use:

  1. (Re-)start computer.

  2. Press Shift till you get the Grub menu.

  3. Choose a previous kernel 4.15.0.23. (This may not be necessary, but I get weird behaviour with the 4.15.0.24 kernel.)

  4. When you see the log or boot screen press Ctrl+Alt+F2 till you get a login shell. (If nothing happens just press Ctrl+Alt+F1, Ctrl+Alt+F2, Ctrl+Alt+F1, Ctrl+Alt+F2 and so on till you get the login shell.)

  5. In the login shell enter your user name and password. (If it seems that it is frozen and not reacting any more just hit Ctrl+Alt+F2 again.)

  6. Enter:

    sudo systemctl stop gdm
    
  7. Now just install a new display manager:

    sudo apt install lightdm
    

    If LightDM is already installed run:

    sudo dpkg-reconfigure lightdm
    
  8. It will ask you which one to use as default, GDM or LightDM, choose LightDM.

  9. Maybe not required but I removed the kernel:

    sudo apt purge linux-image-4.15.0-24-generic linux-headers-4.15.0-24\*
    

    If you booted with this kernel 4.15.0-24 the removal process will ask your to confirm the dangerous removal of a currently running kernel. Abort and don't confirm this operation, which is the default option!

  10. After this just reboot.

@David Foerster Thanks looks much better now

6
  • lightdm is already installed. How to I tell the system to use it instead of gdm?
    – msc
    Jul 3, 2018 at 0:22
  • I did sudo dpkg-reconfigure lightdm to choose lightdm. My system is still not working properly. After login the screen goes black for a while then the login screen appears again. I tried all the login options. I'll try going back to the previous kernel next.
    – msc
    Jul 3, 2018 at 0:57
  • Thanks ! This worked for me. I installed and selected lightdm by default, then rebooted, a black screen came up, but after pressing ctrl-alt-F2, the login screen showed up. And thanks for the "frozen" tip in the login shell, I was stupidly stuck thinking it was really frozen...
    – raph
    Jul 3, 2018 at 7:53
  • Nice :D. Are you still on kernel 4.15.0-24?
    – Eugen M
    Jul 3, 2018 at 8:09
  • Turns out if you just wait, possibly as much as 4 minutes, after the screen goes black during boot, then the desktop eventually appears, albeit somewhat messed up, with a message box asking you to "unlock the login keychain" because it "was not unlocked when you logged in". After entering the password, the desktop is redrawn correctly and everything works. I'm still on kernel 4.15.0.24. It seems lightdm is just very slow starting. If you touch the mouse during that initial black screen then the login screen appears and if you login it cycles as I described in my comment above.
    – msc
    Jul 4, 2018 at 4:30
2

Give this a try:

sudo apt install haveged
sudo systemctl enable haveged

This issue only seems to affect kernel 4.15.0-24. getrandom() is called when starting Xorg and for some reason in 4.15.0-24, it hangs for a bit until the entropy is high enough to generate a random number to use as a magic cookie for xauth. Xorg, LightDM, and GDM won't start until xauth is given a random number to use. Any kind of mouse/keyboard input probably raises entropy, which explains why pressing keys or moving the mouse fixes the problem. Haveged generates enough entropy at boot, eliminating the problem.

It's been reported as a bug, so hopefully haveged won't be necessary in future kernels once the bug is fixed.

The previous 4.15.0-23 kernel doesn't have this problem, so booting into that instead would also work.

EDIT: According to this bug report a fix has been committed. I would imagine it'll be released to the repo soon.

4

Not the answer you're looking for? Browse other questions tagged .