Slow boot time

Danbor

Active Member
Joined
Aug 1, 2023
Messages
108
Reaction score
45
Credits
1,126
Hello all. I've been using Mint for about 9 months on my 2 desktops and a laptop now and am very satisfied to get away from microsoft. Mind you, these are all on a home network that has one user, me.
I recently decided to enable password protection for boot up and resume just to keep the grand children from accessing things and causing issues.
Prior to this, the systems booted in literally seconds. After enabling the password requirement, this computer, the newest one by years, boots quickly to the login screen but after the password is entered, I get a black screen with a moveable cursor for @ 2 minutes before the desktop appears.
I found something similar on another forum so I entered the command "sudo systemctl disable NetworkManager-wait-online.service" and rebooted. It worked, once. Now I'm back to the long wait. Any tips on where to look for a solution would be appreciated.
Attached is my system report.
 

Attachments

  • sysinfo.txt
    6 KB · Views: 195


if you open a terminal and run the command

systemd-analyze

it should show you the boot time of the system. after that

systemd-analyze blame

should hopefully show you what is taking so much time.

editing to add: this doesn't look like it would cause problems, the size of the listed swap partition just looks odd. they are usually bigger:

Swap:
ID-1: swap-1 type: partition size: 15 MiB used: 0 KiB (0.0%) priority: -2 dev: /dev/nvme0n1p3
 
Thanks for the tip! I've had other things going on, took me a bit to get back to this.
Still working on finding the answer, but at least those commands have given me a list of potential places to look. I'll share what I discover when I delve further.
 
You can also press F8 while things are booting up and see what's going on behind the scenes.

That's often a good way to spot things that slow your boot time.
 
Allllllrighty then. :) Here's where this system is now. Decided to stick with auto login for now. I tried the F8 thing. No joy. Neither repeatedly mashing the key nor just holding it down at boot has no effect. So there's that.
Enable auto login, boot time less than 30 seconds. Disable auto login, quick boot to password screen, after entering password, 3 minutes or so till desktop appears.
I've attached the systemd blame results for each. The differences I see are all in milliseconds. I can't believe the difference adds minutes to the process. I am stumped. For now.
 

Attachments

  • withpword.txt
    902 bytes · Views: 162
  • nopword.txt
    909 bytes · Views: 167
I am stumped. For now.
Use the code tag in the three dot menu just above your reply if you would please?
Attaching text files requires everyone reading to download a file :oops:
 
Use the code tag in the three dot menu just above your reply if you would please?
Attaching text files requires everyone reading to download a file :oops:
Oops. Sorry about that. Didn't know.
I guess I'm a little slow. The three dot thing I can see, has two options, edit and create poll. Looks like I need further instruction. I looked for help elsewhere on the forum and found something about using some other site to upload images but it didn't seem to be what I needed. I won't attach anything else to a post here, Copy and paste will do.
 
Last edited:
Does this do it for you?
Screenshot from 2023-08-13 22-07-30.png
 
in a linux mint 21.1 cinnamon virtual machine i have there is a little difference between what lightdm (mint's display manager) does after an autologin start vs one where the user types in a password. you could try checking lightdm's status to see if there might be problems there. one way to do that is with the command

systemctl status lightdm

sometimes if there are problems, that won't show all the messages. you could check

journalctl -b -u lightdm

to see if there are more messages. these two are from a session where my user needed to log in:

Code:
test@mint21onec ~> systemctl status lightdm
● lightdm.service - Light Display Manager
     Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
     Active: active (running) since Sun 2023-08-13 22:16:48 CDT; 15min ago
       Docs: man:lightdm(1)
    Process: 626 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=0/SUCCESS)
   Main PID: 629 (lightdm)
      Tasks: 5 (limit: 8839)
     Memory: 127.6M
        CPU: 7.784s
     CGroup: /system.slice/lightdm.service
             ├─629 /usr/sbin/lightdm
             └─640 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

Aug 13 22:16:48 mint21onec systemd[1]: Starting Light Display Manager...
Aug 13 22:16:48 mint21onec systemd[1]: Started Light Display Manager.
Aug 13 22:16:49 mint21onec lightdm[648]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=112) by (uid=0)
Aug 13 22:16:49 mint21onec lightdm[648]: gkr-pam: gnome-keyring-daemon started properly
Aug 13 22:16:50 mint21onec lightdm[825]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "mint21onec"
Aug 13 22:17:43 mint21onec lightdm[856]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "test"
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: unable to locate daemon control file
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: stashed password to try later in open session
Aug 13 22:17:48 mint21onec lightdm[856]: pam_unix(lightdm:session): session opened for user test(uid=1001) by (uid=0)
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
test@mint21onec ~> journalctl -b -u lightdm
Aug 13 22:16:48 mint21onec systemd[1]: Starting Light Display Manager...
Aug 13 22:16:48 mint21onec systemd[1]: Started Light Display Manager.
Aug 13 22:16:49 mint21onec lightdm[648]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=112) by (uid=0)
Aug 13 22:16:49 mint21onec lightdm[648]: gkr-pam: gnome-keyring-daemon started properly
Aug 13 22:16:50 mint21onec lightdm[825]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "mint21onec"
Aug 13 22:17:43 mint21onec lightdm[856]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "test"
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: unable to locate daemon control file
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: stashed password to try later in open session
Aug 13 22:17:48 mint21onec lightdm[856]: pam_unix(lightdm:session): session opened for user test(uid=1001) by (uid=0)
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring

this is similar output from a session where the user was automatically logged in:

Code:
journalctl -b-1 | grep lightdm
Aug 13 22:02:51 mint21onec lightdm[653]: pam_unix(lightdm-autologin:session): session opened for user test(uid=1001) by (uid=0)
Aug 13 22:12:31 mint21onec polkitd(authority=local)[522]: Operator of unix-session:c1 successfully authenticated as unix-user:test to gain TEMPORARY authorization for action org.x.lightdm-settings for unix-process:1195:1057 [cinnamon --replace] (owned by unix-user:test)
Aug 13 22:12:31 mint21onec pkexec[1914]: test: Executing command [USER=root] [TTY=unknown] [CWD=/home/test] [COMMAND=/usr/bin/lightdm-settings]
Aug 13 22:12:31 mint21onec dbus-daemon[1943]: [session uid=0 pid=1941] Activating service name='org.freedesktop.portal.Desktop' requested by ':1.0' (uid=0 pid=1937 comm="lightdm-settings                                  ")
Aug 13 22:15:39 mint21onec lightdm[653]: pam_unix(lightdm-autologin:session): session closed for user test
Aug 13 22:15:39 mint21onec systemd[1]: lightdm.service: Deactivated successfully.
Aug 13 22:15:39 mint21onec systemd[1]: lightdm.service: Consumed 13.481s CPU time.
 
Use the code tag in the three dot menu just above your reply if you would please?
Attaching text files requires everyone reading to download a file :oops:

Does this do it for you?
View attachment 16583
My apologies. But I still don't understand. I click the 3 dots, then, clicking the icon indicated, it says, "toggle BB code" and displays the post being replied to. And still has the Attach file button. No clue what BB code is nor how this alters anything being uploaded. That's ok, I can still take the time to just copy and paste things into the message body. Hopefully that keeps feathers furled. ;)
For a dinosaur such as myself, BB stands for "bulletin board" not used since 2400 baud modems and DOS 3.2 or thereabouts. :D
 
in a linux mint 21.1 cinnamon virtual machine i have there is a little difference between what lightdm (mint's display manager) does after an autologin start vs one where the user types in a password. you could try checking lightdm's status to see if there might be problems there. one way to do that is with the command

systemctl status lightdm

sometimes if there are problems, that won't show all the messages. you could check

journalctl -b -u lightdm

to see if there are more messages. these two are from a session where my user needed to log in:

Code:
test@mint21onec ~> systemctl status lightdm
● lightdm.service - Light Display Manager
     Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
     Active: active (running) since Sun 2023-08-13 22:16:48 CDT; 15min ago
       Docs: man:lightdm(1)
    Process: 626 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/dev/null))" = "lightdm" ] (code=exited, status=0/SUCCESS)
   Main PID: 629 (lightdm)
      Tasks: 5 (limit: 8839)
     Memory: 127.6M
        CPU: 7.784s
     CGroup: /system.slice/lightdm.service
             ├─629 /usr/sbin/lightdm
             └─640 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch

Aug 13 22:16:48 mint21onec systemd[1]: Starting Light Display Manager...
Aug 13 22:16:48 mint21onec systemd[1]: Started Light Display Manager.
Aug 13 22:16:49 mint21onec lightdm[648]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=112) by (uid=0)
Aug 13 22:16:49 mint21onec lightdm[648]: gkr-pam: gnome-keyring-daemon started properly
Aug 13 22:16:50 mint21onec lightdm[825]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "mint21onec"
Aug 13 22:17:43 mint21onec lightdm[856]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "test"
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: unable to locate daemon control file
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: stashed password to try later in open session
Aug 13 22:17:48 mint21onec lightdm[856]: pam_unix(lightdm:session): session opened for user test(uid=1001) by (uid=0)
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
test@mint21onec ~> journalctl -b -u lightdm
Aug 13 22:16:48 mint21onec systemd[1]: Starting Light Display Manager...
Aug 13 22:16:48 mint21onec systemd[1]: Started Light Display Manager.
Aug 13 22:16:49 mint21onec lightdm[648]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=112) by (uid=0)
Aug 13 22:16:49 mint21onec lightdm[648]: gkr-pam: gnome-keyring-daemon started properly
Aug 13 22:16:50 mint21onec lightdm[825]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "mint21onec"
Aug 13 22:17:43 mint21onec lightdm[856]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "test"
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: unable to locate daemon control file
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: stashed password to try later in open session
Aug 13 22:17:48 mint21onec lightdm[856]: pam_unix(lightdm:session): session opened for user test(uid=1001) by (uid=0)
Aug 13 22:17:48 mint21onec lightdm[856]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring

this is similar output from a session where the user was automatically logged in:

Code:
journalctl -b-1 | grep lightdm
Aug 13 22:02:51 mint21onec lightdm[653]: pam_unix(lightdm-autologin:session): session opened for user test(uid=1001) by (uid=0)
Aug 13 22:12:31 mint21onec polkitd(authority=local)[522]: Operator of unix-session:c1 successfully authenticated as unix-user:test to gain TEMPORARY authorization for action org.x.lightdm-settings for unix-process:1195:1057 [cinnamon --replace] (owned by unix-user:test)
Aug 13 22:12:31 mint21onec pkexec[1914]: test: Executing command [USER=root] [TTY=unknown] [CWD=/home/test] [COMMAND=/usr/bin/lightdm-settings]
Aug 13 22:12:31 mint21onec dbus-daemon[1943]: [session uid=0 pid=1941] Activating service name='org.freedesktop.portal.Desktop' requested by ':1.0' (uid=0 pid=1937 comm="lightdm-settings                                  ")
Aug 13 22:15:39 mint21onec lightdm[653]: pam_unix(lightdm-autologin:session): session closed for user test
Aug 13 22:15:39 mint21onec systemd[1]: lightdm.service: Deactivated successfully.
Aug 13 22:15:39 mint21onec systemd[1]: lightdm.service: Consumed 13.481s CPU time.
Thanks, I'll run these commands both ways and check the difference later tonight.
 
My apologies. But I still don't understand. I click the 3 dots, then, clicking the icon indicated, it says, "toggle BB code" and displays the post being replied to. And still has the Attach file button. No clue what BB code is nor how this alters anything being uploaded. That's ok, I can still take the time to just copy and paste things into the message body. Hopefully that keeps feathers furled. ;)
For a dinosaur such as myself, BB stands for "bulletin board" not used since 2400 baud modems and DOS 3.2 or thereabouts. :D
You paste your code in the box instead of into a text document :)
 
in case it might help, i just type in the code tags. if you add [ code] before the info then [ /code] after without the space after the first [, it makes some output a bit easier to read.

if you typed any manual bb code back in the day, this might be similar to how you could use [ b]this is bold[ /b] (without the space) to make it bold like so: this is bold.

the code tags transform something like:

systemd-analyze
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

into:
Code:
systemd-analyze
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
 
2023-08-15_11-03.png

Copy and paste into the box which will show after you have clicked on </>

So...you will see this...
2023-08-15_11-06.png

and you will copy and paste in the box above.......and then click on continue down the bottom of the box....

Which will then look like...

1692061774907.png

Code:
dan@main:~$ systemd-analyze
Startup finished in 11.856s (firmware) + 1.594s (loader) + 5.015s (kernel) + 915ms (userspace) = 19.381s
graphical.target reached after 792ms in userspace
dan@main:~$ systemd-analyze blame
297ms zfs-load-module.service
291ms modprobe@chromeos_pstore.service
161ms systemd-resolved.service
141ms systemd-timesyncd.service
129ms systemd-binfmt.service
126ms proc-sys-fs-binfmt_misc.mount
121ms systemd-update-utmp-runlevel.service
107ms lvm2-monitor.service
106ms blueman-mechanism.service
 90ms dev-nvme0n1p2.device
 77ms plymouth-quit-wait.service
 74ms cups.service
 72ms systemd-journal-flush.service
 66ms [email protected]
 65ms apparmor.service
 58ms networkd-dispatcher.service
 55ms lightdm.service
 51ms gpu-manager.service
 51ms systemd-udev-trigger.service
 51ms udisks2.service
 50ms systemd-journald.service
 47ms keyboard-setup.service
 46ms accounts-daemon.service



Then click on continue....and hit reply
 
THIS is the end result.....


Code:
dan@main:~$ systemd-analyze
Startup finished in 11.856s (firmware) + 1.594s (loader) + 5.015s (kernel) + 915ms (userspace) = 19.381s
graphical.target reached after 792ms in userspace
dan@main:~$ systemd-analyze blame
297ms zfs-load-module.service
291ms modprobe@chromeos_pstore.service
161ms systemd-resolved.service
141ms systemd-timesyncd.service
129ms systemd-binfmt.service
126ms proc-sys-fs-binfmt_misc.mount
121ms systemd-update-utmp-runlevel.service
107ms lvm2-monitor.service
106ms blueman-mechanism.service
 90ms dev-nvme0n1p2.device
 77ms plymouth-quit-wait.service
 74ms cups.service
 72ms systemd-journal-flush.service
 66ms [email protected]
 65ms apparmor.service
 58ms networkd-dispatcher.service
 55ms lightdm.service
 51ms gpu-manager.service
 51ms systemd-udev-trigger.service
 51ms udisks2.service
 50ms systemd-journald.service
 47ms keyboard-setup.service
 46ms accounts-daemon.service
 
Ahhhhhhh! I got it now. Click on the three dots in the CENTER of the screen as opposed to the three dots on either side. Please, I'm old and slow and need specifics. That three dot symbol appears three times on the tool bar, I picked the wrong one. Looks like the left one is options for text formatting and such maybe?
 
Looks like the left one is options for text formatting and such maybe?
Yes ....correct.

A picture is worth a thousand words, eh?
 
Thanks, I'll run these commands both ways and check the difference later tonight.
Ran those commands. Found an issue. But after searching around I can find some references but no solutions. Most advise that it isn't a problem as far as system stability. It just adds minutes to initial boot time. No problem waking from suspend, just boot. Hopefully I can CORRECTLY insert the resulting code. ;)


Code:
dan@main:~$ systemctl status lightdm
● lightdm.service - Light Display Manager
     Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
     Active: active (running) since Tue 2023-08-15 14:23:19 EDT; 5h 9min ago
       Docs: man:lightdm(1)
    Process: 1235 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/d>
   Main PID: 1238 (lightdm)
      Tasks: 12 (limit: 18933)
     Memory: 140.8M
        CPU: 56.145s
     CGroup: /system.slice/lightdm.service
             ├─1238 /usr/sbin/lightdm
             └─1259 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -noliste>

Aug 15 14:23:19 main systemd[1]: Starting Light Display Manager...
Aug 15 14:23:19 main systemd[1]: Started Light Display Manager.
Aug 15 14:23:20 main lightdm[1435]: pam_unix(lightdm-greeter:session): session opened for user ligh>
Aug 15 14:23:20 main lightdm[1435]: gkr-pam: gnome-keyring-daemon started properly
Aug 15 14:23:20 main lightdm[1553]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopassw>
Aug 15 14:23:29 main lightdm[1553]: gkr-pam: unable to locate daemon control file
Aug 15 14:23:29 main lightdm[1553]: gkr-pam: stashed password to try later in open session
Aug 15 14:23:29 main lightdm[1553]: pam_unix(lightdm:session): session opened for user dan(uid=1000>
Aug 15 14:23:29 main lightdm[1553]: gkr-pam: gnome-keyring-daemon started properly and unlocked key>
lines 1-22/22 (END)
dan@main:~$ systemctl status lightdm
● lightdm.service - Light Display Manager
     Loaded: loaded (/lib/systemd/system/lightdm.service; indirect; vendor preset: enabled)
     Active: active (running) since Tue 2023-08-15 14:23:19 EDT; 5h 12min ago
       Docs: man:lightdm(1)
    Process: 1235 ExecStartPre=/bin/sh -c [ "$(basename $(cat /etc/X11/default-display-manager 2>/d>
   Main PID: 1238 (lightdm)
      Tasks: 12 (limit: 18933)
     Memory: 142.8M
        CPU: 57.706s
     CGroup: /system.slice/lightdm.service
             ├─1238 /usr/sbin/lightdm
             └─1259 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -noliste>

Aug 15 14:23:19 main systemd[1]: Starting Light Display Manager...
Aug 15 14:23:19 main systemd[1]: Started Light Display Manager.
Aug 15 14:23:20 main lightdm[1435]: pam_unix(lightdm-greeter:session): session opened for user ligh>
Aug 15 14:23:20 main lightdm[1435]: gkr-pam: gnome-keyring-daemon started properly
Aug 15 14:23:20 main lightdm[1553]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopassw>
Aug 15 14:23:29 main lightdm[1553]: gkr-pam: unable to locate daemon control file
Aug 15 14:23:29 main lightdm[1553]: gkr-pam: stashed password to try later in open session
Aug 15 14:23:29 main lightdm[1553]: pam_unix(lightdm:session): session opened for user dan(uid=1000>
Aug 15 14:23:29 main lightdm[1553]: gkr-pam: gnome-keyring-daemon started properly and unlocked key>

dan@main:~$ journalctl -b -u lightdm
Aug 15 14:23:19 main systemd[1]: Starting Light Display Manager...
Aug 15 14:23:19 main systemd[1]: Started Light Display Manager.
Aug 15 14:23:20 main lightdm[1435]: pam_unix(lightdm-greeter:session): session opened for user ligh>
Aug 15 14:23:20 main lightdm[1435]: gkr-pam: gnome-keyring-daemon started properly
Aug 15 14:23:20 main lightdm[1553]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopassw>
Aug 15 14:23:29 main lightdm[1553]: gkr-pam: unable to locate daemon control file
Aug 15 14:23:29 main lightdm[1553]: gkr-pam: stashed password to try later in open session
Aug 15 14:23:29 main lightdm[1553]: pam_unix(lightdm:session): session opened for user dan(uid=1000>
Aug 15 14:23:29 main lightdm[1553]: gkr-pam: gnome-keyring-daemon started properly and unlocked key>

Looks like these lines just keep repeating until the daemon control file is created. By whatever creates it.
lightdm[1553]: gkr-pam: unable to locate daemon control file
lightdm[1553]: gkr-pam: stashed password to try later in open session
So far, I cannot determine how to correct it. I experimented with a few suggestions I found, but no joy so far.
 

Members online


Latest posts

Top