You are not logged in.

#1 2021-04-23 06:32:10

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

[SOLVED] Boot time

I have been getting really large boot times considering the fact that I am running Arch on an nvme SSD. Here are the links for the message at poweroff and the message at boot: https://ibb.co/3rZ2QBv
https://ibb.co/hcfSz0K
The boot times are sometimes as long as 2 minutes. Please let me know if I have violated any forum policy, especially with regards to links.
Output for systemd-analyze time :

 Startup finished in 9.468s (firmware) + 1.471s (loader) + 4.140s (kernel) + 1min 30.509s (userspace) = 1min 45.589s 
graphical.target reached after 1min 30.428s in userspace 

output for systemd-analyze blame :

9.910s NetworkManager-wait-online.service
1.041s systemd-random-seed.service
 374ms systemd-journal-flush.service
 342ms lvm2-monitor.service
 232ms dev-nvme0n1p6.device
 142ms cups.service
 109ms upower.service
 101ms dhcpcd.service
 101ms udisks2.service
  99ms user@1000.service
  71ms systemd-modules-load.service
  67ms systemd-udevd.service
  60ms polkit.service
  60ms teamviewerd.service
  55ms systemd-udev-trigger.service
  53ms NetworkManager.service
  49ms systemd-logind.service
  49ms wpa_supplicant.service
  47ms systemd-fsck@dev-disk-by\x2duuid-BE56\x2d73DD.service
  45ms systemd-tmpfiles-clean.service
  42ms systemd-tmpfiles-setup.service
  39ms systemd-journald.service
  37ms systemd-timesyncd.service
  35ms dev-disk-by\x2duuid-b73b9d3e\x2deebd\x2d4ec7\x2d94ac\x2d13b9d509d003.swap
  33ms modprobe@drm.service
  24ms systemd-tmpfiles-setup-dev.service
  20ms colord.service
  19ms efi.mount
  18ms bluetooth.service
  18ms systemd-rfkill.service
  17ms accounts-daemon.service
  16ms modprobe@fuse.service
  14ms systemd-remount-fs.service
  14ms systemd-update-utmp.service
  11ms user-runtime-dir@1000.service
   8ms dev-hugepages.mount
   8ms dev-mqueue.mount
   8ms sys-kernel-debug.mount

Output for systemd-analyze critical-chain :

 
graphical.target @1min 30.428s
└─multi-user.target @1min 30.428s
  └─teamviewerd.service @1min 30.367s +60ms
    └─network-online.target @1min 30.363s
      └─network.target @1min 30.363s
        └─dhcpcd.service @804ms +101ms
          └─basic.target @801ms
            └─sockets.target @801ms
              └─snapd.socket @800ms +332us
                └─sysinit.target @796ms
                  └─systemd-backlight@backlight:acpi_video0.service @1.521s +3ms
                    └─system-systemd\x2dbacklight.slice @1.519s
                      └─system.slice @280ms
                        └─-.slice @280ms

let me know if anything else is needed to find the issue. Thanks in advance!

Last edited by Anurag_Rao (2021-07-20 04:03:59)

Offline

#2 2021-04-23 06:52:14

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: [SOLVED] Boot time

1.041s systemd-random-seed.service

It looks like it's the random seed generator causing the delay. You can try some tools like haveged or rng.
https://wiki.archlinux.org/index.php/Ra … generation
Can you post a dmesg of a new boot sequence as well just to have another perspective?

Offline

#3 2021-04-23 08:53:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] Boot time

Unlikely that's just one second, it seems to block on network.target/ dhcpcd invocation. You have conflicting networking services. Disable and stop all instances of dhcpcd if you intend to use networkmanager or vice versa. What's the output of

find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Offline

#4 2021-04-23 10:48:06

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

Output of the command given:

bluetooth-autoconnect.service            | bluetooth.service.wants
bluetooth.service                        | bluetooth.target.wants
cups.path                                | multi-user.target.wants
cups.service                             | printer.target.wants
cups.socket                              | sockets.target.wants
dbus-fi.w1.wpa_supplicant1.service       | system
dbus-org.bluez.service                   | system
dbus-org.freedesktop.nm-dispatcher.service | system
dbus-org.freedesktop.timesync1.service   | system
dhcpcd.service                           | multi-user.target.wants
dirmngr.socket                           | sockets.target.wants
display-manager.service                  | system
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
mariadb.service                          | multi-user.target.wants
netctl@custom\x2ddhcp\x2dprofile.service | multi-user.target.wants
netctl@custom\x2ddhcp\x2dprofile\x2d2.service | multi-user.target.wants
NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
p11-kit-server.socket                    | sockets.target.wants
pamac-cleancache.timer                   | timers.target.wants
pipewire.socket                          | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
snapd.socket                             | sockets.target.wants
systemd-timesyncd.service                | sysinit.target.wants
teamviewerd.service                      | multi-user.target.wants
wpa_supplicant.service                   | multi-user.target.wants

Offline

#5 2021-04-23 10:50:12

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

I am not familiar with the network configuration. I remember I had done something wrong while installing Arch and then got WiFi to work somehow. It might be something to do with that. Can you please instruct me on how to disable dhcpcd. I suppose I am using NetworkManager but I might be wrong. Thanks in advance!

Offline

#6 2021-04-23 11:08:21

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] Boot time

Loads of unnecessary/wrong services enabled:

systemctl disable netctl@custom-dhcp-profile.service  netctl@custom-dhcp-profile-2.service wpa_supplicant dhcpcd --now

Offline

#7 2021-04-23 11:50:19

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

I executed the given command and rebooted. Unfortunately, I am getting almost the same boot times as before. Also, as soon as I executed the command, WiFi disconnected for about 5 seconds and then reconnected automatically. After reboot, I ran the same command once again and the same behavior was observed.

Last edited by Anurag_Rao (2021-04-23 11:50:57)

Offline

#8 2021-04-23 13:52:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] Boot time

Double check the find command and repost the analyze outputs the only network related thing that should still be listed is NetworkManager, what was the output of the disable command? If need be go manually through the /etc/systemd/system/multi-user.target.wants/ directory and remove the network symlinks not related to networkmanager.

Also you have NetworkManager-wait-online.service enabled. If you have a network share listed in your fstab that will delay general startup until the network is up and the relevant mount can succeed. You'd probably want to set that up with a noauto and then map a systemd.automount or so so that it's not considered critical to the system startup as a whole.

You might also want to just post an entire journal so we can actually check what's going on

sudo journalctl -b

https://wiki.archlinux.org/index.php/Li … in_clients

Last edited by V1del (2021-04-23 13:54:00)

Offline

#9 2021-04-25 08:23:57

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

output for the find command:

bluetooth-autoconnect.service            | bluetooth.service.wants
bluetooth.service                        | bluetooth.target.wants
cups.path                                | multi-user.target.wants
cups.service                             | printer.target.wants
cups.socket                              | sockets.target.wants
dbus-org.bluez.service                   | system
dbus-org.freedesktop.nm-dispatcher.service | system
dbus-org.freedesktop.timesync1.service   | system
dirmngr.socket                           | sockets.target.wants
display-manager.service                  | system
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
mariadb.service                          | multi-user.target.wants
netctl@custom\x2ddhcp\x2dprofile.service | multi-user.target.wants
netctl@custom\x2ddhcp\x2dprofile\x2d2.service | multi-user.target.wants
NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
p11-kit-server.socket                    | sockets.target.wants
pamac-cleancache.timer                   | timers.target.wants
pipewire.socket                          | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
snapd.socket                             | sockets.target.wants
systemd-timesyncd.service                | sysinit.target.wants
teamviewerd.service                      | multi-user.target.wants


journal at fresh reboot: the output seems to go on forever, how can I find the log I am looking for... I also did not understand the link given.. I'm sorry if this sounds stupid but I am a complete beginner to linux.

Offline

#10 2021-04-25 08:34:24

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

I hope I got this right: http://ix.io/37li

Offline

#11 2021-04-25 09:14:56

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,104

Re: [SOLVED] Boot time

The netctl services are still active and the reason for the timeout. If you literally copy paste those two and don't try to unescape them like I did,  and run them through a systemctl disable does it mention that it removes the symlinks? If that doesn't work for some reason manually delete them

sudo rm /etc/systemd/system/multi-user.target.wants/netctl*

Offline

#12 2021-04-25 10:31:05

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

When I run that command to remove the services, as mentioned - my WiFi immediately disconnects (is this behavior expected..?) However, running the command does not give me any output stating that the services have been removed, there is no output at all.



Running the find command after the remove command gives this:

bluetooth-autoconnect.service            | bluetooth.service.wants
bluetooth.service                        | bluetooth.target.wants
cups.path                                | multi-user.target.wants
cups.service                             | printer.target.wants
cups.socket                              | sockets.target.wants
dbus-org.bluez.service                   | system
dbus-org.freedesktop.nm-dispatcher.service | system
dbus-org.freedesktop.timesync1.service   | system
dirmngr.socket                           | sockets.target.wants
display-manager.service                  | system
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
mariadb.service                          | multi-user.target.wants
netctl@custom\x2ddhcp\x2dprofile.service | multi-user.target.wants
netctl@custom\x2ddhcp\x2dprofile\x2d2.service | multi-user.target.wants
NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
p11-kit-server.socket                    | sockets.target.wants
pamac-cleancache.timer                   | timers.target.wants
pipewire.socket                          | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
snapd.socket                             | sockets.target.wants
systemd-timesyncd.service                | sysinit.target.wants
teamviewerd.service                      | multi-user.target.wants

I see that the 2 services havent been disabled.. So I went ahead and ran the command to manually remove netctl.


Output for the find command given does not show the 2 services now. I am going to reboot and post if the issue is resolved. Thanks!

Offline

#13 2021-04-25 10:34:08

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

Thank you so much, my computer now boots in a jiffy and WiFi works flawlessly!

Offline

#14 2021-07-18 12:25:59

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

Hey! I have installed a remote desktop server on my system and the long boot times started again. I would be really grateful for any help on this!

Output of

 find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f 

is:

 
bluetooth-autoconnect.service            | bluetooth.service.wants
bluetooth.service                        | bluetooth.target.wants
cups.path                                | multi-user.target.wants
cups.service                             | printer.target.wants
cups.socket                              | sockets.target.wants
dbus-org.bluez.service                   | system
dbus-org.freedesktop.nm-dispatcher.service | system
dbus-org.freedesktop.timesync1.service   | system
dhcpcd.service                           | multi-user.target.wants
dirmngr.socket                           | sockets.target.wants
display-manager.service                  | system
getty@tty1.service                       | getty.target.wants
gpg-agent-browser.socket                 | sockets.target.wants
gpg-agent-extra.socket                   | sockets.target.wants
gpg-agent.socket                         | sockets.target.wants
gpg-agent-ssh.socket                     | sockets.target.wants
libvirtd-ro.socket                       | sockets.target.wants
libvirtd.service                         | multi-user.target.wants
libvirtd.socket                          | sockets.target.wants
mariadb.service                          | multi-user.target.wants
NetworkManager.service                   | multi-user.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
p11-kit-server.socket                    | sockets.target.wants
pamac-cleancache.timer                   | multi-user.target.wants
pipewire.socket                          | sockets.target.wants
pulseaudio.socket                        | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
snapd.socket                             | sockets.target.wants
sshd.service                             | multi-user.target.wants
systemd-timesyncd.service                | sysinit.target.wants
teamviewerd.service                      | multi-user.target.wants
var-lib-snapd-snap-core18-2066.mount     | multi-user.target.wants
var-lib-snapd-snap-core18-2074.mount     | multi-user.target.wants
var-lib-snapd-snap-gnome\x2d3\x2d28\x2d1804-145.mount | multi-user.target.wants
var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1515.mount | multi-user.target.wants
var-lib-snapd-snap-snapd-12159.mount     | multi-user.target.wants
var-lib-snapd-snap-snapd-12398.mount     | multi-user.target.wants
virtlockd.socket                         | sockets.target.wants
virtlogd.socket                          | sockets.target.wants
vncserver@:1.service                     | multi-user.target.wants
xdg-user-dirs-update.service             | default.target.wants
xrdp.service                             | multi-user.target.wants
xrdp-sesman.service                      | multi-user.target.wants

Journal at boot: http://ix.io/3tlD


Thanks in advance!

Offline

#15 2021-07-18 12:44:14

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [SOLVED] Boot time

Did you look at the output?
How many network managing services do you see?

Offline

#16 2021-07-18 12:49:44

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

Only NetworkManager?

Offline

#17 2021-07-18 12:52:37

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Offline

#18 2021-07-18 13:56:47

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

dhcpcd? should I disable that? I am confused if it is not supposed to be enabled beside NetworkManager or is it supposed to compliment NetworkManager in some way.. I'm really sorry if I caused any trouble

Offline

#19 2021-07-18 13:57:58

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Offline

#20 2021-07-18 13:58:02

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

I read the Arch Wiki about dhcpcd and it appears as if NetworkManager and dhcpcd are supposed to conflict. Shall I disable dhcpcd.service?

Offline

#21 2021-07-18 14:05:53

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,307

Re: [SOLVED] Boot time

seth wrote:

Bingo.

Offline

#22 2021-07-20 04:03:37

Anurag_Rao
Member
From: Bangalore, India
Registered: 2021-03-27
Posts: 17

Re: [SOLVED] Boot time

Thanks a lot! I discovered that a few other services that I had were also not needed and were causing longer boot and power-off times (vncserver@:1.service ). I disabled them and it boots in seconds!

Last edited by Anurag_Rao (2021-07-20 04:04:35)

Offline

Board footer

Powered by FluxBB