You are not logged in.

#1 2024-08-25 07:26:05

ZulluBalti
Member
Registered: 2021-04-07
Posts: 92

[SOLVED] Speed up boot process by fixing NetworkManager-wait-online

Hi, I was browsing the arch wiki and I saw this cool command

systemd-analyze blame

. It shows that NetworkManager-wait-online.service is taking 5 seconds which is more than all the other services combined is there any way to speed it up?

Here's the full output

5.577s NetworkManager-wait-online.service
1.870s man-db.service
1.766s systemd-modules-load.service
 844ms NetworkManager.service
 740ms home.mount
 628ms dev-mapper-cryptlvim.device
 499ms upower.service
 379ms systemd-udev-trigger.service
 342ms user@1000.service
 201ms systemd-resolved.service
 195ms boot.mount
 195ms systemd-fsck@dev-disk-by\x2duuid-191A\x2d5ED1.service
 187ms systemd-fsck@dev-disk-by\x2duuid-72ff7d04\x2d89c8\x2d4973\x2d9f64\x2d3db05608d2db.service
 176ms dev-disk-by\x2duuid-00816e66\x2ded71\x2d4b24\x2da8af\x2d5ff28423afc0.swap
 164ms systemd-backlight@backlight:intel_backlight.service
 161ms systemd-tmpfiles-clean.service
 108ms lvm2-monitor.service
 103ms systemd-vconsole-setup.service
 101ms systemd-tmpfiles-setup-dev-early.service
  99ms systemd-udevd.service
  98ms systemd-journal-flush.service
  95ms systemd-tmpfiles-setup-dev.service
  87ms systemd-journald.service
  84ms systemd-tmpfiles-setup.service
  74ms proc-sys-fs-binfmt_misc.mount
  73ms dbus-broker.service
  67ms wpa_supplicant.service
  64ms tmp.mount
  57ms systemd-remount-fs.service
  56ms systemd-hostnamed.service
  50ms user-runtime-dir@1000.service
  45ms polkit.service
  43ms systemd-logind.service
  36ms sys-fs-fuse-connections.mount
  34ms sys-kernel-config.mount
  32ms dev-hugepages.mount
  30ms dev-mqueue.mount
  29ms sys-kernel-debug.mount
  29ms systemd-userdbd.service
  29ms modprobe@loop.service
  29ms sys-kernel-tracing.mount
  28ms kmod-static-nodes.service
  26ms systemd-sysctl.service
  23ms systemd-udev-load-credentials.service
  22ms modprobe@configfs.service
  21ms modprobe@dm_mod.service
  21ms modprobe@drm.service
  20ms modprobe@fuse.service
  14ms lm_sensors.service
  14ms rtkit-daemon.service
  11ms systemd-random-seed.service
   9ms systemd-update-utmp.service
   7ms systemd-rfkill.service
   7ms alsa-restore.service
   5ms systemd-user-sessions.service

Last edited by ZulluBalti (2024-08-25 09:41:45)

Offline

#2 2024-08-25 07:37:51

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] Speed up boot process by fixing NetworkManager-wait-online

If you really need to be able to connect a few seconds quicker drop NM and try something simpler. I use iwd & it's built-in DHCP client, which seems to be the simplest way to connect wirelessly. If you have an ethernet connection a few ip(8) commands in a custom unit file should do the job.


Jin, Jîyan, Azadî

Offline

#3 2024-08-25 08:47:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,825

Re: [SOLVED] Speed up boot process by fixing NetworkManager-wait-online

Also test another cool command: "systemd-analyze critical-chain"

Online

#4 2024-08-25 08:48:09

ZulluBalti
Member
Registered: 2021-04-07
Posts: 92

Re: [SOLVED] Speed up boot process by fixing NetworkManager-wait-online

is iwd compatiable with proton-vpn?

Edit: It's working with openvpn (proton-vpn)

Last edited by ZulluBalti (2024-08-25 09:49:32)

Offline

#5 2024-08-25 09:10:35

ZulluBalti
Member
Registered: 2021-04-07
Posts: 92

Re: [SOLVED] Speed up boot process by fixing NetworkManager-wait-online

The thing is,

I'm using lukscrypt to encrypt my root partition
and it takes a couple of second for it to check the password. I was hoping it would be instant
Here's a graph that I generated using

systemd-analyze plot > info.svg

info.svg

Last edited by ZulluBalti (2024-08-25 09:11:34)

Offline

#6 2024-08-25 09:30:21

ZulluBalti
Member
Registered: 2021-04-07
Posts: 92

Re: [SOLVED] Speed up boot process by fixing NetworkManager-wait-online

after installing iwd

After Svg

Output from

systemd-analyze blame
618ms systemd-modules-load.service
545ms systemd-fsck@dev-disk-by\x2duuid-72ff7d04\x2d89c8\x2d4973\x2d9f64\x2d3db05608d2db.service
242ms dev-mapper-cryptlvim.device
229ms user@1000.service
189ms systemd-udev-trigger.service
132ms systemd-journal-flush.service
118ms ldconfig.service
103ms lvm2-monitor.service
103ms systemd-hostnamed.service
101ms systemd-fsck@dev-disk-by\x2duuid-191A\x2d5ED1.service
 99ms iwd.service
 94ms upower.service
 84ms dev-disk-by\x2duuid-00816e66\x2ded71\x2d4b24\x2da8af\x2d5ff28423afc0.swap
 65ms user-runtime-dir@1000.service
 57ms systemd-sysusers.service
 53ms proc-sys-fs-binfmt_misc.mount
 47ms systemd-user-sessions.service
 46ms home.mount
 46ms systemd-tmpfiles-setup-dev-early.service
 45ms modprobe@dm_mod.service
 44ms systemd-rfkill.service
 44ms modprobe@loop.service
 38ms systemd-sysctl.service
 34ms systemd-resolved.service
 34ms polkit.service
 33ms systemd-tmpfiles-setup.service
 32ms systemd-tmpfiles-setup-dev.service
 31ms systemd-update-done.service
 31ms systemd-logind.service
 27ms systemd-udevd.service
 25ms systemd-journald.service
 22ms systemd-userdbd.service
 16ms systemd-vconsole-setup.service
 15ms dbus-broker.service
 13ms systemd-remount-fs.service
 12ms dev-hugepages.mount
 12ms dev-mqueue.mount
 11ms sys-kernel-debug.mount
 11ms sys-kernel-tracing.mount
 11ms kmod-static-nodes.service
 10ms boot.mount
 10ms systemd-journal-catalog-update.service
 10ms rtkit-daemon.service
  9ms modprobe@configfs.service
  9ms systemd-random-seed.service
  8ms lm_sensors.service
  8ms modprobe@drm.service
  7ms systemd-backlight@backlight:intel_backlight.service
  7ms modprobe@fuse.service
  7ms systemd-udev-load-credentials.service
  5ms systemd-update-utmp.service
  3ms alsa-restore.service
  3ms sys-kernel-config.mount
  2ms sys-fs-fuse-connections.mount
  2ms tmp.mount

Output from critical-chain

The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.

graphical.target @1.685s
└─multi-user.target @1.685s
  └─getty.target @1.685s
    └─getty@tty1.service @1.685s
      └─systemd-user-sessions.service @1.637s +47ms
        └─network.target @1.635s
          └─iwd.service @1.536s +99ms
            └─basic.target @1.534s
              └─dbus-broker.service @1.517s +15ms
                └─dbus.socket @1.516s
                  └─sysinit.target @1.515s
                    └─systemd-update-done.service @1.484s +31ms
                      └─ldconfig.service @1.364s +118ms
                        └─local-fs.target @1.363s
                          └─home.mount @1.316s +46ms
                            └─systemd-fsck@dev-disk-by\x2duuid-72ff7d04\x2d89c8\x2d4973\x2d9f64\x2d3db05608d2db.service @513ms +545ms
                              └─dev-disk-by\x2duuid-72ff7d04\x2d89c8\x2d4973\x2d9f64\x2d3db05608d2db.device @500ms

Offline

Board footer

Powered by FluxBB