16

NetworkManager-wait-online.service fails at boot and it delays my startup

  • Waits for the network to come online. – Soren A Mar 23 '18 at 14:48
21

Some code runs off the network

In some multi-user environments the part of the boot-up process can come from the network. For this case systemd defaults to waiting for the network to come on-line before certain steps are taken.

Majority of Desktop Users

Unlike some multi-user environments most Ubuntu desktop users have the Operating System and driver code on their hard disks, SSDs or Live Boot USBs.

There is a glitch where some users wait an extremely long time for network to come up during boot and one of the recommendations is to set the maximum wait time to 30 seconds. A better way is to simply disable the service, especially when you aren't using the Internet all the time and just want to get to work on your spreadsheets or documents, etc.

For most users 10 to 15 seconds can be sliced off the parallel boot time by using:

sudo systemctl disable NetworkManager-wait-online.service

Then, after you sign on you will likely get a message bubble stating you've now been connected to the network (WiFi or Ethernet access to Internet).

  • Is it needed if I use a wireless keyboard and mouse as input to my system (works with a wireless receiver adapter plugged into USB port)? – Nikhil Jun 15 '18 at 15:10
  • 1
    No its not needed for USB. – WinEunuuchs2Unix Jun 15 '18 at 15:11
  • @Also , if I use a bluetooth keyboard and mouse, will it be needed (I am considering buying one)? – Nikhil Jun 15 '18 at 15:15
  • 1
    Bluetooth is often embedded in WiFi card so I'm not sure on that one. – WinEunuuchs2Unix Jun 15 '18 at 17:37
  • 1
    Why does it take so long to get a connection? I'm connected via Gigabit. – Corni Jun 8 at 8:02
4

From the man page:

NAME

       systemd-networkd-wait-online.service, systemd-networkd-wait-online -
       Wait for network to come online
  • My service on Kubuntu 18.04.1 is called NetworkManager-wait-online.service and running man returns that there is no man page. Presumably this is a case of bad naming, or a missing link connecting man NetworkManager-wait-online.service with the man page named services you mention? – pbhj May 21 at 15:07
2

It appears that this service simply waits, doing absolutely nothing, until the network is connected, and when this happens, it changes its state so that other services that depend on the network can be launched to start doing their thing.

So, it appears that this service is absolutely benign, it does not waste any time during boot, and it actually constitutes an optimization, so you are only going to make things worse if you disable it.

(Services that need the network will start before the network is up, at a time when many other services are also starting up and contention is high, and these services will be unable to do anything useful, so they will just keep retrying to connect to the network, until the network finally comes up.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.