Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Login screen takes too long to appear

Linux Kernel, Network, and Services configuration.
Message
Author
cgirerd
Posts: 22
Joined: 2018-05-03 19:24

[SOLVED] Login screen takes too long to appear

#1 Post by cgirerd »

Hello everyone,

I am a happy user of Debian for years now, but I am not an expert at all. I am running Debian Stretch (with gnome) along with Windows 10 (dual boot) on a Thinkpad X220, and my system is frequently updated. Everything was running smoothly till this afternoon, when I faced a problem I have difficulties to solve by myself.
Here is my problem: when booting Debian, I can no longer reach the login screen. All the information displayed on the screen are the same as usually during the boot sequence, but the UI then doesn't seems to launch as usually after that.
What I tried to do to solve the problem:
- I booted on Gparted from a USB key, and performed a fsck on my root partition (/dev/sda6), but no errors were found.
- When starting my computer, I booted in recovery mode, which gave me access to a console. After spending some time there (trying to troubleshoot my problem), I enter "exit", and sometimes the login screen appears, but 90% of the time I get stuck here as would happen if I boot Debian.
What happened recently:
There were no unusual changes in my system that come to my mind that could explain this problem. The only thing I did two days ago was updating Windows 10 to "April 2018 Update". But I don't know if this update can create a Debian booting problem.

I am happy to give you all the logs you would need if you tell me how to get them.
Last edited by cgirerd on 2018-05-19 11:37, edited 5 times in total.

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Debian Strech - boot problem

#2 Post by Dai_trying »

One thing that can cause this sort of issue is a lack of space, you can use a console (press Ctrl+Alt+F1 at your blank screen) and then login and then you can check what free space is available using df and if any of them are 90% used or higher it might help to either resize that partition or remove any surplus files.
There are other reasons that can cause your issue and this is just the simplest one to fix :D

aschokker
Posts: 2
Joined: 2018-05-03 20:15

Re: Debian Strech - boot problem

#3 Post by aschokker »

Hi, you did not sudo apt update/upgrade your system recently?
Which kernel version do you use?

I have more or less the same problem as you described (on a HP Elitebook 8470p). However, I upgraded my system recently, a.o. a new kernel, version 4.9.0-6. In my case it takes ca. 3 minutes booting time before the login screen appears, while it used to be ca. 15 seconds. Problem may be related to the sound card (?), as under the new kernel I do not have sound anymore, while under kernel 4.9.0-5 (and before) sound always worked perfectly.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Debian Strech - boot problem

#4 Post by debiman »

cgirerd wrote:Here is my problem: when booting Debian, I can no longer reach the login screen. All the information displayed on the screen are the same as usually during the boot sequence, but the UI then doesn't seems to launch as usually after that.
yes, but what exactly do you see? that's the important question.
a text login? something else? red messages?

aschokker
Posts: 2
Joined: 2018-05-03 20:15

Re: Debian Strech - boot problem

#5 Post by aschokker »

After the blue GRUB screen, I see one line of text (the line I normally see) stating that my system is clean, number of files etc. This line is displayed for almost 3 minutes, after which the graphical login screen appears. I can login normally. The system behaves normally except for sound; I do not have sound with kernel 4.9.0-6. If I boot with the previous kernel the boot process is fast and I do have sound.

cgirerd
Posts: 22
Joined: 2018-05-03 19:24

Re: Debian Strech - boot problem

#6 Post by cgirerd »

Dai_trying wrote:One thing that can cause this sort of issue is a lack of space, you can use a console (press Ctrl+Alt+F1 at your blank screen) and then login and then you can check what free space is available using df and if any of them are 90% used or higher it might help to either resize that partition or remove any surplus files.
There are other reasons that can cause your issue and this is just the simplest one to fix :D
Thank you for your answers. There is planty of space on my 2 partitions: 7Go of free space in my root partition, and 90Go in my /home partition.
aschokker wrote:Hi, you did not sudo apt update/upgrade your system recently?
Which kernel version do you use?
I use the latest kernel from Debian stable, which is linux-image-4.0.9.6-amd64. In recovery mode, I also tried to boot using the previous kernel that was listed in the menu, linux-image-4.0.9.5-amd64, but the problem still occurs.
debiman wrote:yes, but what exactly do you see? that's the important question.
a text login? something else? red messages?
Well, no red messages, errors or whatever. Just what I usually have, which is:

Code: Select all

/dev/sda6: clean, 968520/2957312 files, 9634551/11825152 blocks
[    5.195997] bluetooth hci0: firmware: failed to load brcm/BCM20702A1-0a5c-21e6.hcd (-2)
And I get stucked exactly here.
The message concerning the bluetooth is normal, I would have to install my bluetooth properly, but this is not the problem here.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Debian Strech - boot problem

#7 Post by debiman »

no, it's not the bluetooth.
have you tried to wait it out?
or can you switch to another tty, ot press Ctrl-C or something, to get a prompt?

cgirerd
Posts: 22
Joined: 2018-05-03 19:24

Re: Debian Strech - boot problem

#8 Post by cgirerd »

Yes, I can switch to another tty and get a prompt.
I think I might have found another user who has the same problem. He openned a thread the same day as I did here : http://forums.debian.net/viewtopic.php?f=6&t=137403

cgirerd
Posts: 22
Joined: 2018-05-03 19:24

Re: Debian Strech - boot problem

#9 Post by cgirerd »

Following the previous link to the other thread, I could successfully login in another tty (tty2), and run startx. My system ran as expected for a couple of minutes, and then my computer switched to tty1 by itself. This looks like the same problem as explained in the first post of the other thread (http://forums.debian.net/viewtopic.php?f=6&t=137403)

lbrunosouzati
Posts: 7
Joined: 2018-02-02 06:44

Re: Debian Strech - boot problem

#10 Post by lbrunosouzati »

Look, I have the same problem. I found a temporary solution. I have 2 notebooks as an Asus x202e and also a Lenovo G40-80. The asus I modified by installing a ssd of 128gb lenovo I modified with the installation of 1 ssd of 256gb. I noticed that in the last update of kernel 4.88-1 I think it was on 04/30/2018 the boot in asus x202e (it takes about 24 minutes to load the gnome). For test I switched ssd to the source hd. And strangely the system charged fast. I already tested ssd on the asus x202e itself and on other computers and systems. Apparently the disk usually runs the debian-only bug in this specific kernel version (4.88-1). The funniest of all is that my other computer the Lenovo G40-80 also uses ssd and had no problems. Look at the only solution I found is to downgrade the kernel myself. (it is a security risk) but until a correction comes out.

CTRL + ALT + F2 opens the console

* log in normally (in text mode)

* using root or sudo

apt install linux-image-4.9.0-5-amd64

On the boot screen, just choose the version that you installed.

Recalling that the newest version 4.9.0-6 is the version that started to present the problem.

Once again sorry for the English of google translator! :D

cgirerd
Posts: 22
Joined: 2018-05-03 19:24

Re: Debian Strech - boot problem

#11 Post by cgirerd »

lbrunosouzati wrote:[...]
apt install linux-image-4.9.0-5-amd64

On the boot screen, just choose the version that you installed.

Recalling that the newest version 4.9.0-6 is the version that started to present the problem.

Once again sorry for the English of google translator! :D
Thanks for your answer. I already had linux-image-4.9.0-5-amd64 and was sure to have tried booting on it without success... I just tried now for a couple of times and it is working fine. Quite weird! Thank you for this temporarily fix :D
If this is a quite general problem of linux kernel 4.9.0-6, may I tag this topic has solved?

lbrunosouzati
Posts: 7
Joined: 2018-02-02 06:44

Re: Debian Strech - boot problem

#12 Post by lbrunosouzati »

Better leave it open. 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

smalltimer
Posts: 4
Joined: 2018-05-05 20:48

Re: Debian Strech - boot problem

#13 Post by smalltimer »

Hi, I'm running Debian on an X220 and am facing the exact same problem. I think the culprit is systemd-fsckd.service which refuses to deactivate.
Here's the output of ' # systemd-analyze plot '. Any ideas how to resolve this ? :(

https://pasteboard.co/HjPmFHf.png

julieng
Posts: 1
Joined: 2018-05-05 21:27

Re: Debian Strech - boot problem

#14 Post by julieng »

Hi,
same kind of problem here on a lenovo X220 ( intel I3, intel video chip)
(dual boot with windows 7, I rarely use it, but to be sure it was not a hard drive failure -which is a SSD in fact- I booted on 7, and no problem with it)
Debian 9, usually updated without any problem.
Last update tonight which goes to 4.9.88 gave me barely the same bug.
After boot sequence, no gdm, it stays on the black screen with log lines.( /dev/sda clean ... and no more lines)
it takes minutes to reach gdm ( and time is money ... wait ... no)
I can go to tty , but there it is crazy : I can log in , but sometimes the cursor stops blinking, and I can not write anything with keyboard. I have to ctrl+alt+F2 ( or whatever ttys) again to be able to write. And it makes it again and again ...
When logged in a tty, for instance in tty4 I was installing 4.9.15 from backports , and tty switch alone to tty2 ( where I am not logged in)
Same problem with kernel 4.9.15, same problem with the kernel 4.9.80 (4.9.0-5 which was ok before this update)
The strange tty things were only during the time I wait for gdm, after gdm is reached, ttys are fine.

kevinthefixer
Posts: 190
Joined: 2018-05-05 22:30

Re: Debian Strech - boot problem

#15 Post by kevinthefixer »

I'd just like to add a bit of info, sorry no solutions. I have the same symptoms, starting with the first boot after the kernel update, with this exception: my system boots normally a few seconds after any input from a pointing device, mouse, touchpad, or the Dell mouse pointer thingie in the middle of the keyboard. I did not lose my sound. FWIW this is a Dell Latitude E4300, all Intel board, sound, graphics etc. Running XFCE with SLIM login manager so I can have an unattended boot.

lbrunosouzati
Posts: 7
Joined: 2018-02-02 06:44

Re: Debian Strech - boot problem

#16 Post by lbrunosouzati »

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.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Debian Strech - boot problem

#17 Post by debiman »

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.

kevinthefixer
Posts: 190
Joined: 2018-05-05 22:30

Re: Debian Strech - boot problem

#18 Post by kevinthefixer »

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?

smalltimer
Posts: 4
Joined: 2018-05-05 20:48

Re: Debian Strech - boot problem

#19 Post by smalltimer »

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.

old-timer
Posts: 1
Joined: 2018-05-06 18:11

Re: Debian Strech - boot problem

#20 Post by old-timer »

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.

Post Reply