[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: lightdm (testing): Long waiting time after login



On 17.05.2018 00:43 Ben Caradoc-Davies wrote:
On 16/05/18 19:28, work@hllmnn.de wrote:
I just did a fresh install of testing with XFCE. After entering the login
credentials the screen was black for 30-60 seconds before the desktop
environment showed up. Assuming a bug in XFCE, I performed another fresh install with MATE, but a similar effect occured: after login the background image is
shown for 30-60 seconds before the desktop is fully loaded.

What happens if you wiggle your mouse or provide keyboard activity while waiting? For example, if you wiggle your mouse vigorously for two seconds or press the Alt key 20 times? Does the wait end sooner?

In Linux 4.16, the getrandom system call (without the GRND_NONBLOCK flag) blocks until sufficient entropy is available in the pool. This is the documented behaviour, and Linux 4.16 now enforces it to fix CVE-2018-1108. This has caught out several services that try to use getrandom (without the GRND_NONBLOCK flag) at early boot, including plymouth (via fontconfig) and gdm3. What you see might have the same cause. For details of my investigation, see:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=897572

Wiggling your mouse or providing keyboard activity adds entropy to the pool. If this reduces the waiting time, you might be affected by the same bug.

Kind regards,

Hi Ben,

Yes, you're right! When I wiggle the mouse the wait ends sooner. Indeed, if I don't move the mouse at all and don't press any key the screen just stays blank (I waited approx. 5 minutes and it still was black).

I attached the output of dmesg | grep "random". As you can see, "crng init done" appears after the 5 minutes I waited.

Since there is no "splash" in my kernel command line in grub, I added "noplymouth" to it, but that didn't help. Maybe it's another package that calls getrandom without GRND_NONBLOCK. Let me know if I can support the investigation somehow.

Kind regards,
Dino
[    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

Reply to: