After "security update" to 4.15.0-24-generic #26-Ubuntu screen shows log content not login [duplicate]

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.


Solution 1:

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

Solution 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.