[SOLVED] Login screen takes too long to appear

Kernels & Hardware, configuring network, installing services

Re: Debian Strech - boot problem

Postby lbrunosouzati » 2018-05-06 08:59

Another test I did discovered that the error only appears when I use a ssd (kingston or sandisk) and specifically on this computer (Asus x202e). Interestingly the Lenovo G40-80 works perfectly with the same SSD.
lbrunosouzati
 
Posts: 7
Joined: 2018-02-02 06:44

Re: Debian Strech - boot problem

Postby debiman » 2018-05-06 14:07

wow, quite a few people.
first off: the guy who uses SLIM is disqualified; slim is abandoned.
the guy who said fsckd is the culprit: can you reproduce the same output after every boot?
it's quite normal that a filesystem check takes a while, but it shouldn't be doing it at every boot.
so try again, and we don't need the plot, i think the 'systemd-analyze blame' version is enough.
are all the others using gdm as displaymanager? that is, the default display manager for the default debian desktop (which i believe to be gnome nowadays)?
you could check if gdm has its own logs, or search journalctl; maybe that's the common denominator.
User avatar
debiman
 
Posts: 2209
Joined: 2013-03-12 07:18

Re: Debian Strech - boot problem

Postby kevinthefixer » 2018-05-06 17:01

Well, I might be disqualified, but you can't shut me up that easy. At any rate I'll bet whatever fix we find works for me also. I tried journalctl -b but got so much output I got lost, and it seemed to keep right on going, almost as fast as the terminal could scroll. Here is output of systemd-analyze blame, no joy there; this follows a 4-minute boot that I just let go:

Code: Select all
kevin@DellLatE4300:~$ systemd-analyze blame
          5.745s NetworkManager-wait-online.service
          2.041s networking.service
          1.578s ModemManager.service
          1.233s colord.service
          1.210s apt-daily-upgrade.service
           764ms upower.service
           751ms dev-sda1.device
           462ms exim4.service
           404ms lircd-setup.service
           337ms acpi-support.service
           332ms i8kmon.service
           332ms vdr.service
           329ms speech-dispatcher.service
           316ms NetworkManager.service
           296ms lm-sensors.service
           278ms keyboard-setup.service
           268ms systemd-journald.service
           220ms tvoe.service
           219ms pppd-dns.service
           214ms alsa-restore.service
           201ms systemd-rfkill.service
           183ms rtkit-daemon.service
           178ms systemd-udev-trigger.service
           169ms systemd-logind.service
           156ms avahi-daemon.service
           142ms systemd-fsck@dev-disk-by\x2duuid-da8ede17\x2d5039\x2d4abb\x2d9f
           134ms polkit.service
           116ms systemd-timesyncd.service
            91ms rsyslog.service
            77ms systemd-udevd.service
            64ms wpa_supplicant.service
            62ms udisks2.service
            54ms bluetooth.service
            54ms user@1000.service
            43ms systemd-tmpfiles-setup-dev.service

This system normally boots in 18 seconds from pushing the power button, I have GRUB set up for a one-second delay. I'm wondering about Sandisk SSDs? I have no way to update the firmware on mine, Sandisk only supplies a Windows utility to do that and all I have is Debian.. I sincerely doubt WINE would do it. Anyway it's a Sandisk SDSSDA240G, firmware version Z33130RL according to GSmartControl, and it's healthy. Is everybody else using the same thing?
kevinthefixer
 
Posts: 28
Joined: 2018-05-05 22:30

Re: Debian Strech - boot problem

Postby smalltimer » 2018-05-06 17:43

The guy who said filestytem check takes a while. It doesn't on an SSD. My boot is normally 5-7 seconds. If you look at the graph it says the startup finished in 5.5 seconds. But gdm takes much longer to load. I'm guessing this is because systemd-fsckd.service is still not deactivated within the 5.5 seconds considered as 'startup' by systemd-analyze (and for a good few minutes after that), and this delays the load of gdm. It would be great to have the graphs generated by 'systemd-analyze plot > graph.svg' from other people too.

Using both lightdm and slim gets rid of this problem.
smalltimer
 
Posts: 4
Joined: 2018-05-05 20:48

Re: Debian Strech - boot problem

Postby old-timer » 2018-05-06 18:30

I'm getting a similar problem - not exactly identical but close enough to believe it's the same cause.
I'm using Stretch with XFCE and lightdm. My boot time (with an SSD) is usually about 5 seconds, and the desktop appears almost immediately after that. After the kernel upgrade the boot time is the same but loading the desktop takes a long time - by long, I mean go-and-make-a-cup-of-coffee-and-a-sandwich-then-come-back time. Several minutes. This only happens on initial boot, not when I logout and log back in. It happens regardless of which user I login as. I even created a new user with default properties to check.
I first suspected lightdm but can't find anything in the log or in journalctl. It happens whether I autologin or not. Oddly, the only time it didn't happen was when I booted in advanced mode and tried 'startxfce4'. Frankly, I'm baffled.
Like several people, I've got round it by installing the previous version of the kernel. This is a workhorse machine and I can't afford to play around with it for too long, so I have to take the quick solution. However, if anyone comes up with something more satisfactory than losing the security updates, I'll be delighted to hear about it.
old-timer
 
Posts: 1
Joined: 2018-05-06 18:11

Re: Debian Strech - boot problem

Postby debiman » 2018-05-06 18:37

old-timer wrote:Like several people, I've got round it by installing the previous version of the kernel.

this is an important hint.
can the others confirm that?
and ALL are using SSDs???
User avatar
debiman
 
Posts: 2209
Joined: 2013-03-12 07:18

Re: Debian Strech - boot problem

Postby kevinthefixer » 2018-05-06 18:49

Where do I find the list of packages that were in that update? Should have copied it down, I knew it was a kernel UD after all. System won't let me attach an svg, and when I made it .svg.gz it says "Sorry, the board attachment quota has been reached." There were some 4 files in the update IIRC. And how would I see which DM I'm using, and how to change it? I already have SLIM and if I'm also using lightDM then it didn't fix it for me.
kevinthefixer
 
Posts: 28
Joined: 2018-05-05 22:30

Re: Debian Strech - boot problem

Postby cgirerd » 2018-05-06 19:18

debiman wrote:
old-timer wrote:Like several people, I've got round it by installing the previous version of the kernel.

this is an important hint.
can the others confirm that?
and ALL are using SSDs???


Yes, I confirm that. I only have a SSD on my computer, with everything running on it. I tried switching tty as my login window didn't appear. I logged in in tty2, ran startx. Everything runs fine, and then my computer swiches on tty1 by itself, with the login window diplayed this time. Maybe it corresponds to the delay for tty1 to launch the login window. It takes a couple of minutes for that.
The temporarily fix for me is to boot on another kernel, but it doesn't seem to work all the time, as this other person says:

lbrunosouzati wrote:Well, I did some more tests here and I noticed that this error persists. In 10 attempts to boot a 3 may show error. I did a clean install of Debian 9 with LXDE and noticed that this error does not happen even in the newer kernel. Something tells me that the network manager used in GNOME in XFCE and KDE in the kernel is causing this slowness. 24 minutes to boot is not a very normal time. Best to leave the topic open even. :D


Here is my output of 'systemd-analyze blame', and here is the output of 'systemd-analyze plot > graph.svg': https://filesender.renater.fr/?s=download&token=eab439ee-8e9b-bf0b-46a8-eaf33073d25b. Let me know if I can do anything else to help solve this problem.

Code: Select all
         13.939s NetworkManager-wait-online.service
          1.137s exim4.service
           678ms apt-daily.service
           524ms apt-daily-upgrade.service
           290ms dev-sda6.device
           155ms systemd-timesyncd.service
           120ms ModemManager.service
           114ms winbind.service
            98ms accounts-daemon.service
            92ms keyboard-setup.service
            85ms colord.service
            78ms tlp.service
            76ms lm-sensors.service
            75ms NetworkManager.service
            74ms speech-dispatcher.service
            71ms systemd-logind.service
            69ms systemd-fsck@dev-disk-by\x2duuid-36f0c99c\x2d8ed0\x2d41c3\x2d9b62\x2d3a35cb93dbb9.service
            64ms rsyslog.service
            63ms pppd-dns.service
            56ms avahi-daemon.service
            54ms networking.service
            54ms rtkit-daemon.service
            53ms systemd-journald.service
            49ms upower.service
            47ms bluetooth.service
            47ms systemd-udevd.service
            45ms systemd-udev-trigger.service
            39ms packagekit.service
            34ms user@1000.service
            33ms user@117.service
            33ms dev-disk-by\x2duuid-8b1921b7\x2d801f\x2d4803\x2d966a\x2da623b8dbed27.swap
            26ms minissdpd.service
            22ms wpa_supplicant.service
            20ms udisks2.service
            19ms systemd-modules-load.service
            19ms polkit.service
            18ms systemd-tmpfiles-setup-dev.service
            15ms gdm.service
            14ms systemd-tmpfiles-clean.service
            13ms systemd-journal-flush.service
            12ms var-log.mount
            10ms sys-kernel-debug.mount
            10ms home.mount
            10ms dev-mqueue.mount
             9ms systemd-update-utmp-runlevel.service
             9ms systemd-user-sessions.service
             9ms systemd-remount-fs.service
             8ms systemd-backlight@backlight:intel_backlight.service
             8ms systemd-tmpfiles-setup.service
             8ms dev-hugepages.mount
             7ms systemd-random-seed.service
             6ms tmp.mount
             6ms systemd-sysctl.service
             5ms kmod-static-nodes.service
             5ms systemd-update-utmp.service
             4ms sys-fs-fuse-connections.mount
             3ms console-setup.service
             3ms var-cache-apt-archives.mount
cgirerd
 
Posts: 19
Joined: 2018-05-03 19:24

Re: Debian Strech - boot problem

Postby kevinthefixer » 2018-05-06 19:29

Not sure how to downgrade the kernel? Found the history in Synaptic and tried this:
Code: Select all
kevin@DellLatE4300:~$ sudo apt install linux-image-4.9.0-6-amd64 (4.9.82-1+deb9u3)
bash: syntax error near unexpected token `('
kevinthefixer
 
Posts: 28
Joined: 2018-05-05 22:30

Re: Debian Strech - boot problem

Postby kevinthefixer » 2018-05-06 19:37

OK, told GRUB to boot with an earlier kernel (4.9.0.5) and I'm back to an 18-second boot, so I'm confirming that the latest kernel update is not playing nicely with something. Can I simply uninstall the 4906 kernel, will the system revert back to 4905 since it's still installed?
kevinthefixer
 
Posts: 28
Joined: 2018-05-05 22:30

Re: Debian Strech - boot problem

Postby cgirerd » 2018-05-06 19:39

kevinthefixer wrote:Not sure how to downgrade the kernel? Found the history in Synaptic and tried this:
Code: Select all
kevin@DellLatE4300:~$ sudo apt install linux-image-4.9.0-6-amd64 (4.9.82-1+deb9u3)
bash: syntax error near unexpected token `('

I am running an up-to-date Debian Stretch. Latest kernel is linux-image-4.9.0-6-amd64. When starting my laptop, I select "Advanced options for Debian GNU/Linux" in GRUB and can select the previous version of my kernel to boot (linux-image-4.9.0-5-amd64).
cgirerd
 
Posts: 19
Joined: 2018-05-03 19:24

Re: Debian Strech - boot problem

Postby smalltimer » 2018-05-06 20:14

Yeah you're probably right debiman - seems like something to do with SSDs. Thanks for uploading the bootplot cgirerd - systemd-fsckd.service is still active after systemd-analyze says the boot is over (~18 sec).

I am chasing a couple of deadlines, so switching to lightdm for the time being. But it would be nice to have the gnome-consistent gdm greeter back at some point :( Will keep an eye on the thread.
smalltimer
 
Posts: 4
Joined: 2018-05-05 20:48

Re: Debian Strech - boot problem

Postby cgirerd » 2018-05-06 20:20

Oh sorry I generated this log while using Debian with kernel linux-image-4.9.0-5-amd64 (this is my temparily fix). I guess you need a log generated while the problem occurs - I boot on linux-image-4.9.0-6-amd64, wait the necessary time to get to the login page, then login and generate the log? Sorry :mrgreen:
cgirerd
 
Posts: 19
Joined: 2018-05-03 19:24

Re: Debian Strech - boot problem

Postby kevinthefixer » 2018-05-06 20:22

cgirerd wrote:I am running an up-to-date Debian Stretch. Latest kernel is linux-image-4.9.0-6-amd64. When starting my laptop, I select "Advanced options for Debian GNU/Linux" in GRUB and can select the previous version of my kernel to boot (linux-image-4.9.0-5-amd64).

Yeah, I got that down, and that fixes the current boot. My question is, how to go back permanently? Is it as simple as uninstalling the current kernel? And how to switch display managers?
kevinthefixer
 
Posts: 28
Joined: 2018-05-05 22:30

Re: Debian Strech - boot problem

Postby cgirerd » 2018-05-06 20:40

Below is the result of 'systemd-analyze blame' when the problem occurs, as well as the output of 'systemd-analyze plot > graph.svg' here: https://filesender.renater.fr/?s=download&token=f52e8446-7746-597d-7a28-1bbc8ad5af0d

Code: Select all
          9.289s NetworkManager-wait-online.service
           374ms dev-sda6.device
           349ms systemd-localed.service
           310ms systemd-hostnamed.service
           284ms exim4.service
           176ms systemd-timesyncd.service
           129ms ModemManager.service
           123ms winbind.service
           119ms tlp.service
            98ms keyboard-setup.service
            97ms accounts-daemon.service
            90ms speech-dispatcher.service
            86ms upower.service
            86ms systemd-logind.service
            85ms lm-sensors.service
            80ms colord.service
            70ms NetworkManager.service
            69ms pppd-dns.service
            64ms rtkit-daemon.service
            61ms avahi-daemon.service
            61ms systemd-journald.service
            57ms networking.service
            49ms systemd-udev-trigger.service
            48ms bluetooth.service
            46ms packagekit.service
            41ms systemd-udevd.service
            40ms systemd-fsck@dev-disk-by\x2duuid-36f0c99c\x2d8ed0\x2d41c3\x2d9b62\x2d3a35cb93dbb9.service
            37ms user@117.service
            34ms rsyslog.service
            34ms user@1000.service
            20ms wpa_supplicant.service
            20ms udisks2.service
            17ms polkit.service
            16ms systemd-modules-load.service
            16ms systemd-tmpfiles-setup-dev.service
            16ms realmd.service
            15ms gdm.service
            14ms dev-disk-by\x2duuid-8b1921b7\x2d801f\x2d4803\x2d966a\x2da623b8dbed27.swap
            14ms systemd-journal-flush.service
            13ms dev-mqueue.mount
            11ms kmod-static-nodes.service
            11ms home.mount
            11ms minissdpd.service
            11ms tmp.mount
            10ms systemd-remount-fs.service
            10ms systemd-tmpfiles-setup.service
             8ms systemd-update-utmp-runlevel.service
             7ms systemd-user-sessions.service
             7ms sys-kernel-debug.mount
             7ms systemd-backlight@backlight:intel_backlight.service
             6ms systemd-random-seed.service
             5ms systemd-sysctl.service
             5ms var-log.mount
             4ms systemd-update-utmp.service
             4ms console-setup.service
             4ms dev-hugepages.mount
             3ms sys-fs-fuse-connections.mount
             2ms var-cache-apt-archives.mount
cgirerd
 
Posts: 19
Joined: 2018-05-03 19:24

PreviousNext

Return to System configuration

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable