canonical / lightdm

Display Manager
GNU General Public License v3.0
845 stars 139 forks source link

Login screen not showing till you hold any key #17

Open es20490446e opened 6 years ago

es20490446e commented 6 years ago

As reported in Manjaro:

After the latest update the login screen no longer shows in LightDM 1.26.0. Happens in various desktop environments and computers from different users.

No error messages are printed, only the usual stuff when booting up. It simply doesn’t pass the latest screen, although the computer is still responsive to the shutdown button and holding any key brings up the login screen.

In the Terminal if you enter: sudo lightdm --test-mode --debug

It shows:

[+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log
[+0.00s] DEBUG: Starting Light Display Manager 1.26.0, UID=0 PID=1331
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /usr/share/lightdm/lightdm.conf.d/60-deepin.conf
[+0.00s] DEBUG: Loading configuration dirs from /usr/local/share/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/lightdm/lightdm.conf.d
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/lightdm.conf
[+0.00s] DEBUG: Using Xephyr for X servers
[+0.00s] DEBUG: Registered seat module local
[+0.00s] DEBUG: Registered seat module xremote
[+0.00s] DEBUG: Registered seat module unity
[+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager
[+0.01s] DEBUG: Monitoring logind for seats
[+0.01s] DEBUG: New seat added from logind: seat0
[+0.01s] DEBUG: Seat seat0: Loading properties from config section Seat:*
[+0.01s] DEBUG: Seat seat0: Starting
[+0.01s] DEBUG: Seat seat0: Creating greeter session
[+0.01s] DEBUG: Seat seat0: Creating display server of type x
[+0.01s] DEBUG: Could not run plymouth --ping: Failed to execute child process ?plymouth? (No such file or directory)
[+0.01s] DEBUG: Using VT 1
[+0.01s] DEBUG: Seat seat0: Starting local X display on VT 1
[+0.01s] DEBUG: XServer 1: Logging to /var/log/lightdm/x-1.log
[+0.01s] DEBUG: XServer 1: Can't launch X server Xephyr, not found in path
[+0.01s] DEBUG: XServer 1: X server stopped
[+0.01s] DEBUG: Releasing VT 1
[+0.01s] DEBUG: Seat seat0: Display server stopped
[+0.01s] DEBUG: Seat seat0: Can't create display server for greeter
[+0.01s] DEBUG: Seat seat0: Session stopped
[+0.01s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+0.01s] DEBUG: Seat seat0: Stopping
[+0.01s] DEBUG: Seat seat0: Stopped
[+0.01s] DEBUG: Failed to start seat: seat0
jonathonf commented 6 years ago

This appears to be related to available entropy. Holding a key/moving the mouse etc. will generate entropy which is why this works for some people. The other (more robust) workaround is to install and enable havaged.

ghost commented 6 years ago

I had the exact same trouble, so far the only solution available is that the other DM has a dependency on xorg-server (in Arch and derivatives this is the name of the package, in Ubuntu or other distros I am not sure), after installing this particular package and pulling the required dependencies LightDM is able to start successfully. Tested on a couple of clean installs of Arch (and Antergos specifically as that is the distro I use) and at least for me works.

@es20490446e : I am not sure if this should help you somehow on Manjaro but on Antergos helped me, if that can help you to solve the problem you can report it to the others and we might need to shout to the LightDM packager that he needs to add xorg-server as a required dependency

es20490446e commented 6 years ago

@SamBurgos We are experiencing it with xorg-server installed. So likely your problem is a different one, not having xorg-server as a dependency.

hdino commented 6 years ago

I experience a similar problem: After entering my credentials the system hangs until I wiggle the mouse or press some keys. The cause for this seems to be a call to getrandom without GRND_NONBLOCK as discussed here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897572. As long as there is not enough entropy the getrandom call will block.

To validate this I waited ca. 5 minutes and then wiggled the mouse. Output of dmesg | grep "random" is:

[    0.000000] random: get_random_bytes called from start_kernel+0x94/0x478 with crng_init=0
[    4.426793] random: fast init done
[    5.305730] random: systemd: uninitialized urandom read (16 bytes read)
[    5.306079] random: systemd: uninitialized urandom read (16 bytes read)
[    5.309089] random: systemd: uninitialized urandom read (16 bytes read)
[    5.309237] random: systemd: uninitialized urandom read (16 bytes read)
[    5.309399] random: systemd: uninitialized urandom read (16 bytes read)
[    5.309598] random: systemd: uninitialized urandom read (16 bytes read)
[    5.309751] random: systemd: uninitialized urandom read (16 bytes read)
[    5.309900] random: systemd: uninitialized urandom read (16 bytes read)
[    5.310030] random: systemd: uninitialized urandom read (16 bytes read)
[    5.310093] random: systemd: uninitialized urandom read (16 bytes read)
[  313.172388] random: crng init done

Update: This problem was caused by libbsd and is fixed now.

yash-bansod commented 5 years ago

@es20490446e I am facing the same issue. Have you found out a permanent solution to the problem?

diresi commented 5 years ago

@yash-bansod Yes, run haveged. It's an entropy thing.

martinpelikan commented 4 years ago

I've been using lightdm since ~2014 and only ran into this issue now. Unlike the others, no amount of keyboard mashing helped. I couldn't find anything in the logs pointing me to entropy being an issue. I did find this log entry: Kernel entropy pool is not initialized yet, waiting until it is. but it has been showing up since Oct 2nd, 2019 and I haven't encountered a problem until Feb 8th, 2020.

It was by luck that I left my black screen session open for 20 minutes and finally got a login prompt that I started to suspect this issue, and installing haveged fixed it. But what gives? Why does a DM need entropy, and where is someone supposed to look to find logs hinting at this problem?

unhammer commented 4 years ago

Update: This problem was caused by libbsd and is fixed now.

@hdino which version fixed it?

hdino commented 4 years ago

@unhammer Have a look at the Debian bug report 898088.

ta3pks commented 3 years ago

I had similar issue with lightdm and seems the problem was in my case cpupower setting the governor to powersave which made things incredibly slow the moment I disabled cpupower service things were back to fine