You are not logged in.

#1 2020-11-02 19:25:38

Pomegranate
Member
Registered: 2020-10-01
Posts: 11

[Solved] NetworkManager causes slow boot

I've recently fixed some network issues (I was running systemd-networkd, iwd and NetworkManager at the same time), but it seems to have caused a new one as well. When I boot up my laptop, it takes around 90 seconds to load. Based on the output of systemd-analyze critical-chain it has to do with NetworkManager:

[pomegranate@tree ~]$ systemd-analyze 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 @1min 30.371s
└─multi-user.target @1min 30.371s
  └─getty.target @1min 30.370s
    └─getty@tty1.service @1min 30.370s
      └─systemd-user-sessions.service @1min 30.359s +9ms
        └─network.target @1min 30.357s
          └─NetworkManager.service @1.691s +58ms
            └─dbus.service @1.678s
              └─basic.target @1.677s
                └─sockets.target @1.677s
                  └─snapd.socket @1.676s +1ms
                    └─sysinit.target @1.673s
                      └─systemd-backlight@backlight:intel_backlight.service @2.649s +151ms
                        └─system-systemd\x2dbacklight.slice @2.647s
                          └─system.slice @254ms
                            └─-.slice @254ms

I've tried adding a timeout with systemctl edit --full NetworkManager, adding some timeout values below the [Service] block just to test:

[Service]
...
TimeoutSec=1
TimeoutStartSec=1
TimeoutStopSec=1

But that didn't do anything at all. I'm not sure what to do next.

Last edited by Pomegranate (2020-11-03 08:17:50)

Offline

#2 2020-11-02 20:46:58

seth
Member
Registered: 2012-09-03
Posts: 60,960

Re: [Solved] NetworkManager causes slow boot

Please post the system journal so we can see what NM is spending its time on.

Offline

#3 2020-11-02 21:57:50

CarbonChauvinist
Member
Registered: 2012-06-16
Posts: 413
Website

Re: [Solved] NetworkManager causes slow boot

Waiting on arp check from dhcpcd maybe?

If you're using dhcpcd with network manager instead of dhclient, try adding `noarp` to the `/etc/dhcpcd.conf` per this post on a similar thread.


"the wind-blown way, wanna win? don't play"

Offline

#5 2020-11-03 08:17:13

Pomegranate
Member
Registered: 2020-10-01
Posts: 11

Re: [Solved] NetworkManager causes slow boot

Thanks for the replies, it seems to have to do with eth0 timing out:

Nov 03 08:52:20 tree kernel: audit: type=1334 audit(1604389940.693:28): prog-id=10 op=UNLOAD
Nov 03 08:52:20 tree kernel: audit: type=1334 audit(1604389940.693:29): prog-id=9 op=UNLOAD
Nov 03 08:53:17 tree systemd[1]: sys-subsystem-net-devices-eth0.device: Job sys-subsystem-net-devices-eth0.device/start timed out.
Nov 03 08:53:17 tree systemd[1]: Timed out waiting for device /sys/subsystem/net/devices/eth0.
Nov 03 08:53:17 tree systemd[1]: Dependency failed for dhcpcd on eth0.
Nov 03 08:53:17 tree systemd[1]: dhcpcd@eth0.service: Job dhcpcd@eth0.service/start failed with result 'dependency'.
Nov 03 08:53:17 tree systemd[1]: sys-subsystem-net-devices-eth0.device: Job sys-subsystem-net-devices-eth0.device/start failed with result 'timeout'.
Nov 03 08:53:17 tree systemd[1]: Reached target Network.
Nov 03 08:53:17 tree systemd[1]: Starting Permit User Sessions...
Nov 03 08:53:17 tree systemd[1]: Finished Permit User Sessions.

I didn't realize I had dhcpcd@eth0 running, simply disabling it fixed it.

Offline

Board footer

Powered by FluxBB