Something is holding up NetworkManager-wait-online.service

OK, so here's what we got: I can disable ONE of the routers entirely and other than a half dozen pissed off devices, there's no change. This router is (unfortunately and against my recommendations) an eero mesh router, but the other is a Motorola MT7711 wireless router/cable modem, and if disabled so is the internet connection. The printer is shut down.

No change.

If you use systemd-analyze critical-chain it will tell you which services are causing the boot process to take more time. blame is only useful to identify services that take a long time to start, not those that delay the boot process.

Then you can check its journal entries (journalctl -u $servicename)

Also, did you try an Ethernet cable?

╭─svengali at DR460NIZED-3900X in ⌁
╰─λ systemd-analyze critical-chain                                                                                                                                                                                                                                                                                                                                                                                                    07:56:20
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 38.947s
└─multi-user.target @1min 38.947s
  └─smb.service @1min 38.888s +58ms
    └─nmb.service @48.743s +50.143s
      └─network-online.target @48.737s
        └─network.target @1.568s
          └─wpa_supplicant.service @1min 29.862s +1ms
            └─dbus.service @1.522s
              └─basic.target @1.519s
                └─sockets.target @1.519s
                  └─virtlogd.socket @1.519s
                    └─sysinit.target @1.516s
                      └─systemd-timesyncd.service @1.487s +29ms
                        └─systemd-tmpfiles-setup.service @1.075s +410ms
                          └─local-fs.target @1.075s
                            └─run-media-svengali-VAULT.mount @1min 11.112s
                              └─local-fs-pre.target @998ms
                                └─lvm2-monitor.service @152ms +846ms
                                  └─lvm2-lvmetad.service @319ms
                                    └─systemd-udevd.service @264ms +54ms
                                      └─systemd-tmpfiles-setup-dev.service @253ms +9ms
                                        └─kmod-static-nodes.service @152ms +5ms
                                          └─systemd-journald.socket @149ms
                                            └─-.mount @141ms
                                              └─blockdev@dev-mapper-luks\x2d86f88c90\x2dddfe\x2d4220\x2d9caa\x2d8f61b6d0a851.target @431ms
                                                └─systemd-cryptsetup@luks\x2d86f88c90\x2dddfe\x2d4220\x2d9caa\x2d8f61b6d0a851.service @407ms +23ms
                                                  └─dev-disk-by\x2duuid-86f88c90\x2dddfe\x2d4220\x2d9caa\x2d8f61b6d0a851.device @395ms
╭─svengali at DR460NIZED-3900X in ⌁
╰─λ 

What you think?

I thought the problem was not that boot hangs, but network hangs.
Or I misunderstood @SvengaliExploit ??

The problem is that when I login to the system (so graphical.target is reached) I have no network without restarting NetworkManager.....previously, the system would automatically connect to my wireless network/etc....but now, there's no network at all until NetworkManager is restarted. I don't have a tray icon or anything....

Have you tried disabling or masking the NetworkManager-wait-online.service

systemctl disable --now NetworkManager-wait-online.service

It might be a good troubleshooting step to see how it affects your boot time. If you can get by without it then I guess your fine.

1 Like

or check for info

systemctl status NetworkManager-wait-online

So, apparently network is “up” before wifi is available.

Are you running an I2P router which e.g. provides a network interface or route that is confusing Network Manager?

Are you configuring the network using multiple tools?

Have you tried an Ethernet cable?

The other option is to roll back to a previous snapshot and upgrade packages separately to find out which one(s) introduced the issue. Very handy feature, that rollback function.

1 Like

I WAS running i2prouter but it’s been uninstalled…

Also disable network components/services you are not using.

If you don't use bluetooth blacklist the bt module and mask the service.

If you don't use one or both of your Ethernet adapters, disable one or both in your bios (if possible). I've found sytsems with dual onboard ethernet often have issues. I would definitely disable at least one of your ethernet cards.

The thing is, I'd like to use NetworkManager-wait-online to make tor wait for a network connection (I have to be logged in for that, unless, is there a way to configure it to connect to the WiFi without needing me to be logged in?) to start trying to connect, else it times out waiting to bootstrap...

Have a read here:

https://wiki.archlinux.org/index.php/NetworkManager#Network_services_with_NetworkManager_dispatcher

I’m not sure dispatcher scripts will do what you want because I’m not exactly sure what you’re looking to do.

I don’t have NetworkManager-wait-online.service enabled on my system currently and it doesn’t delay my boot. I am using tethering currently though, not wifi.

You can restart your network with a service if you want to avoid manually restarting.

1 Like

Don't worry a lot. This is probably a kernel bug.

It's just hit me, after my linux kernel upgrade, I faced the same (more or less) issue.

I will try linux-lts when possible...

so you're now seeing the same issue?

I'm on 5.10.7-111-tkg-bmq-zen2

Try other kernels.
I said similar, not the same. network-wait-online fails, which results in several consequences, different depending on specific system.
For example sddm failed.

Post your journal errors

journalctl -b -p3 --no-pager --no-hostname

ahhh, gotcha....makes sense....ok, I'm going to do a normal reboot and then grab the journal and post it....brb....

and I'm sooooo impatient, I need to work on one issue at a time because I probably complicate things by trying to debug several issues at once....Do you see any reason that making adjustments to Xorg.conf (just disabling some Xorg extensions [XFree86-DGA and Xvideo-MotionCompensation specifically] and enabling VNC extension) so that NV-CONTROL continues to load without hitting Xserver's error/message threashold that prevents extensions to continue loading- I am going to patch X, but honestly I'm still learning to do that. I have the patch but I'm still looking up how to apply/build it and install it into the system. I'm working on the same thing with a github fork of openrazer that has support for my devices that the master branch doesn't currently support- I'm still learning to build that and install it into the kernel- I guess I should use dkms but I'm really still unsure, and I would prefer if I could do it in such a way that pacman can manage it and look to the github fork for updates, update as necessary, and handle managing dkms applying the drivers to new kernel updates....so I've got a bit of learning curve to overcome still.....but do you guys see any reason that any of that should skew my results where THIS issue is concerned?? Probably, right?

Thank you very much for this question.
I am looking forward for your next one! :face_with_raised_eyebrow:
I have no idea what you are talking about and don’t want to know either.
I have enough issues of my own… :frowning_face:

1 Like

hahaha oh man! lol

1 Like

Reading the docs (to understand about the issue) I realized network related services and targets are a mess!.
Have in mind that NetworkManager-wait-online.service will be re-enabled in (the rare) case of (Re)enabling NetworkManager.service (it pulls it as a Also= dependency).

I haven’t rebooted yet to confirm disabling NetworkManager-wait-online.service solves this issue, but I believe (hope!) so. :wink:

1 Like