This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Super long boot time

Tags: None
(comma "," separated)
darktori
Registered Member
Posts
6
Karma
0

Super long boot time

Sat Sep 29, 2018 8:50 am
Hello!
So recently I noticed that my boot times on KDE Neon went waaaay up. I mean from a few seconds to a few minutes.

Note that this is not related to the Neon 18.04 update, as the problem manifested itself before the updates. The only thing that happened around the time, is me deleting old operating systems I had on the disk.

The system is on a fairly new Samsung 500GB SSD. Here are some systemd outputs:

Code: Select all
systemd-analyze
Startup finished in 34.467s (kernel) + 3min 530ms (userspace) = 3min 34.998s
graphical.target reached after 1min 30.955s in userspace


Code: Select all
systemd-analyze blame
             10.667s apt-daily.service
              1.127s apt-daily-upgrade.service
              1.053s dev-mapper-neon\x2d\x2dvg\x2droot.device
               793ms lvm2-pvscan@8:3.service
               622ms boot.mount
               613ms snapd.service
               267ms minidlna.service
               217ms NetworkManager.service
               200ms nvidia-persistenced.service
               196ms upower.service
               189ms systemd-logind.service
               185ms dev-loop0.device
               176ms systemd-timesyncd.service
               156ms systemd-resolved.service
               146ms dev-loop2.device
               145ms dev-loop1.device
               129ms networkd-dispatcher.service
               129ms snap-core-5328.mount
               128ms dev-loop4.device
               127ms systemd-journal-flush.service
               117ms dev-loop3.device
               114ms snap-core-4917.mount
               114ms systemd-fsck@dev-disk-by\x2duuid-55A1\x2d8F7E.service
               103ms ModemManager.service
                95ms udisks2.service
                93ms dev-loop5.device
                84ms snap-kde\x2dframeworks\x2d5-25.mount
                83ms systemd-fsck@dev-disk-by\x2duuid-43296f2a\x2dc31e\x2d40f1\x2da5f2\x2d52a6dba14450.service


Code: Select all
systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.
   
    graphical.target @1min 30.955s
    └─multi-user.target @1min 30.955s
      └─snapd.seeded.service @1min 30.940s +14ms
        └─snapd.service @1min 30.326s +613ms
          └─basic.target @1min 30.286s
            └─sockets.target @1min 30.286s
              └─snapd.socket @1min 30.284s +1ms
                └─sysinit.target @1min 30.280s
                  └─systemd-timesyncd.service @2.153s +176ms
                    └─systemd-tmpfiles-setup.service @2.109s +40ms
                      └─local-fs.target @2.108s
                        └─run-user-1000.mount @1min 31.683s
                          └─local-fs-pre.target @339ms
                            └─lvm2-monitor.service @270ms +68ms
                              └─lvm2-lvmetad.service @297ms
                                └─lvm2-lvmetad.socket @270ms
                                  └─system.slice @262ms
                                    └─-.slice @260ms


At first I thought that this might be previously reported issue with systemd not getting enough entropy, but I believe this should be fixed in the Kernel Neon is using now, correct?

Code: Select all
uname -a
Linux tori-neon-850 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


Any help is appreciated, as the boot time is driving me nuts! (I know, I know, first world problems, etc..)
kde-pedro
Registered Member
Posts
35
Karma
0

Re: Super long boot time

Sat Sep 29, 2018 9:08 am
Hola . A mi lo mismo: systemd-analyze blame :1.266s dev-sdb2.device
889ms apt-daily-upgrade.service
652ms snapd.service
618ms keyboard-setup.service
247ms systemd-logind.service
237ms systemd-journal-flush.service
194ms NetworkManager.service
177ms udisks2.service
157ms networkd-dispatcher.service
128ms systemd-rfkill.service
110ms snap-kde\x2dframeworks\x2d5-25.mount
104ms ModemManager.service
102ms lvm2-monitor.service
96ms systemd-timesyncd.service
93ms snap-kde\x2dframeworks\x2d5-27.mount
91ms systemd-resolved.service
88ms systemd-udev-trigger.service
85ms accounts-daemon.service
83ms grub-common.service
79ms snap-kde\x2dframeworks\x2d5-26.mount
77ms plymouth-quit-wait.service
77ms plymouth-quit.service
73ms alsa-restore.service
72ms snap-core-5145.mount
58ms gpu-manager.service
55ms apparmor.service
54ms systemd-tmpfiles-setup-dev.service
47ms upower.service
47ms snap-core-4917.mount
45ms systemd-journald.service
42ms avahi-daemon.service
39ms systemd-udevd.service
37ms pppd-dns.service
y systemd-analyze : Startup finished in 8.397s (firmware) + 3.118s (loader) + 34.431s (kernel) + 2.471s (userspace) = 48.419s
graphical.target reached after 2.310s in userspace
SSD M2 250 GB---intel core I5 . 7200 U
Saludos Pedro
darktori
Registered Member
Posts
6
Karma
0

Re: Super long boot time

Sat Sep 29, 2018 12:57 pm
With some help on Reddit, I reduced the boot time by removing old entries in fstab. The current boot time stats are as follows:

Code: Select all
systemd-analyze                         
Startup finished in 34.451s (kernel) + 3.089s (userspace) = 37.541s
graphical.target reached after 3.085s in userspace

systemd-analyze critical-chain         
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @3.085s
└─multi-user.target @3.085s
  └─snapd.seeded.service @3.070s +14ms
    └─snapd.service @2.338s +731ms
      └─basic.target @2.257s
        └─sockets.target @2.257s
          └─snapd.socket @2.252s +4ms
            └─sysinit.target @2.250s
              └─apparmor.service @2.063s +186ms
                └─local-fs.target @2.058s
                  └─boot-efi.mount @2.049s +8ms
                    └─boot.mount @1.972s +72ms
                      └─systemd-fsck@dev-disk-by\x2duuid-43296f2a\x2dc31e\x2d40f1\x2da5f2\x2d52a6dba14450.service @1.284s
                        └─dev-disk-by\x2duuid-43296f2a\x2dc31e\x2d40f1\x2da5f2\x2d52a6dba14450.device @1.284s

systemd-analyze blame                   
          1.021s dev-mapper-neon\x2d\x2dvg\x2droot.device
           820ms lvm2-pvscan@8:3.service
           731ms snapd.service
           703ms systemd-fsck@dev-disk-by\x2duuid-55A1\x2d8F7E.service
           687ms systemd-fsck@dev-disk-by\x2duuid-43296f2a\x2dc31e\x2d40f1\x2da5f2\x2d52a6dba14450.service
           258ms minidlna.service
           240ms NetworkManager.service
           222ms systemd-logind.service
           201ms dev-loop1.device
           201ms upower.service
           196ms networkd-dispatcher.service
           196ms nvidia-persistenced.service
           186ms apparmor.service
           180ms snap-core-4917.mount
           159ms dev-loop0.device
           158ms udisks2.service
           153ms systemd-resolved.service
           150ms systemd-timesyncd.service
           149ms ModemManager.service
           144ms dev-loop2.device
           139ms snap-kde\x2dframeworks\x2d5-25.mount
           124ms systemd-journal-flush.service
           116ms snap-core-5328.mount
           111ms dev-loop3.device
            90ms accounts-daemon.service
            88ms networking.service
            85ms alsa-restore.service
            79ms snap-core-5145.mount
kde-pedro
Registered Member
Posts
35
Karma
0

Re: Super long boot time

Sat Sep 29, 2018 5:10 pm
Hola . KERNEL 34.5 Segundos , Neon Bionic
¿Solucion?

Saludos. Pedro
gfielding
Registered Member
Posts
178
Karma
0
OS

Re: Super long boot time

Sat Sep 29, 2018 6:14 pm
Something is wrong there. I have a ssd and my readings are:

systemd-analyze
Startup finished in 13.524s (firmware) + 11.860s (loader) + 4.024s (kernel) + 6.410s (userspace) = 35.820s
graphical.target reached after 5.880s in userspace
kyliael
Registered Member
Posts
6
Karma
0

Re: Super long boot time

Sun Oct 07, 2018 9:03 am
gfielding wrote:Something is wrong there. I have a ssd and my readings are:

systemd-analyze
Startup finished in 13.524s (firmware) + 11.860s (loader) + 4.024s (kernel) + 6.410s (userspace) = 35.820s
graphical.target reached after 5.880s in userspace


Had exactly the same issue since 18.04 on update and fresh install. Tried Kubuntu and noticed the same : huge "loader" time.

I edited grub to display the boot menu and adjusted timeout to 0
=> Loader time is now < 1sec
User avatar
fredhoud
Registered Member
Posts
111
Karma
1
OS

Re: Super long boot time

Sun Oct 07, 2018 3:29 pm
I've had the same issue with the upgrade. It was taking around 40 seconds just to get to the login screen after entering the encryption key. So I did a fresh install, and then.... voila!! Not it only takes about 4 seconds to get to the login screen after entering the encryption key. I know it's big hassle, but it's worth it since you have to deal with it for the next 5 years! ;)
Startup finished in 25.301s (kernel) + 4.997s (userspace) = 30.298s
graphical.target reached after 4.201s in userspace
User avatar
Voodoo Chile
Registered Member
Posts
4
Karma
0
OS

Re: Super long boot time

Mon Oct 29, 2018 5:53 pm
Hi, is there any other solution than a fresh install? 8)

I have still a long boot time after the upgrade to Neon 18.04:

voodoo@HAL-silver:~$ systemd-analyze
Startup finished in 7.071s (firmware) + 4.718s (loader) + 35.692s (kernel) + 31.467s (userspace) = 1min 18.949s
graphical.target reached after 31.441s in userspace

Kind and slow regards ;)
acrux
Registered Member
Posts
62
Karma
1
OS

Re: Super long boot time

Tue Oct 30, 2018 6:37 am
You can analyse the boot in more detail:
Code: Select all
systemd-analyze plot > boot.svg

And then open created in your home directory boot.svg eg in Firefox browser.
Mine bionic based KDE neon:
Code: Select all
$ systemd-analyze
Startup finished in 12.851s (firmware) + 12.277s (loader) + 5.014s (kernel) + 2.626s (userspace) = 32.769s
graphical.target reached after 2.529s in userspace
User avatar
apachelogger
KDE Developer
Posts
525
Karma
5
OS

Re: Super long boot time

Tue Oct 30, 2018 1:05 pm
Well, of the times posted already... if you kernel time is more than 10 seconds on an SSD you'll want to check your `dmesg` log. Something is severely slowing down the time it takes to get from grub to actually starting applications and eventually sddm.
It may also be prudent to try and see if you see the boot getting stuck on something specific by switching to verbose boot output during boot.

https://unix.stackexchange.com/question ... ut-verbose


Annoyed with bbcode since 1999.
User avatar
Voodoo Chile
Registered Member
Posts
4
Karma
0
OS

Re: Super long boot time

Tue Oct 30, 2018 6:36 pm
Thanks so far, "systemd-analyze plot > boot.svg" points out the NetworkManager-wait-online.service, which takes 30.022s.

So I try to manage this first.

KR
User avatar
fredhoud
Registered Member
Posts
111
Karma
1
OS

Re: Super long boot time

Tue Oct 30, 2018 8:13 pm
@apachelogger,

I have an encrypted SSD hard drive, that takes about 40 seconds just to get to the encryption login screen. I remember the boot up time to the encryption screen much was faster with the previous 16.04 version. It was around 10 seconds or so. Is there any room for improvement on this? Thanks.

Startup finished in 21.727s (kernel) + 5.189s (userspace) = 26.916s
graphical.target reached after 4.355s in userspace
User avatar
Voodoo Chile
Registered Member
Posts
4
Karma
0
OS

Re: Super long boot time

Sun Nov 04, 2018 11:21 am
In my case I could optimize the boot time with to things about the wifi:

1. I changed the wifi configuration to "store password for all users (not encrypted)", look at:

viewtopic.php?f=309&t=155599#p406705

2. I disabled the 'NetworkManager-wait-online.service':

sudo systemctl disable NetworkManager-wait-online.service

https://askubuntu.com/questions/1018576 ... service-do

Now I have the following boot time:

systemd-analyze
Startup finished in 6.593s (firmware) + 4.663s (loader) + 35.655s (kernel) + 1.481s (userspace) = 48.393s
graphical.target reached after 1.460s in userspace

So firmware and loader are taking 11s and I've seen faster kernel loading times around here.
User avatar
boospy007
Registered Member
Posts
237
Karma
0
OS

Re: Super long boot time

Sun Nov 04, 2018 12:53 pm
Did anyone installed with UEFI and Nvidiacard? Because with this combination it hangs @initram.
User avatar
Voodoo Chile
Registered Member
Posts
4
Karma
0
OS

Re: Super long boot time

Thu Nov 08, 2018 7:47 pm
Following apachelogger's advice (thank you!) I've switched to the verbose mode for booting. My long boot time has to do with my touchpad canfiguration, I have the output:

Begin: Running/scripts/local-premount ... [ 3.991079] input: ETPS/2 Elantech Touchpad as /devices/platform/i8042/serio1/input/input/

The booting hangs almost 30 seconds with this message. I've tried to solve this via systems settings, but every thing works fine except the boot time.
And looking for problems with 'ETPS/2 Elantech Touchpad' & Linux everything was about a not working touchpad. But it works ...


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]