Ubuntu – Ubuntu 15.04 network manager causing slow boot


Since upgrading from 14.10 to 15.04 a few days ago the boot time, grub OS screen to login screen, has increased from 12 seconds to about 40.
This is my systemd-analyze critical-chain output:

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

    graphical.target @37.433s
    └─multi-user.target @37.433s
      └─getty.target @37.432s
        └─getty@tty1.service @37.432s
          └─systemd-user-sessions.service @35.906s +9ms
            └─remote-fs.target @35.904s
              └─media-XalnasStorage.mount @35.849s +53ms
                └─network-online.target @35.846s
                  └─network.target @11.636s
                    └─NetworkManager.service @11.502s +132ms
                      └─basic.target @11.487s
                        └─sockets.target @11.487s
                          └─avahi-daemon.socket @11.487s
                            └─sysinit.target @11.485s
                              └─networking.service @11.333s +65ms
                                └─apparmor.service @11.269s +63ms
                                  └─local-fs.target @11.268s
                                    └─media-TStore1.mount @10.331s +936ms
                                      └─local-fs-pre.target @10.328s
                                        └─systemd-remount-fs.service @10.320s +6ms
                                          └─systemd-fsck-root.service @10.303s +15ms
                                            └─systemd-journald.socket @151ms
                                              └─-.slice @150ms

There seems to be a problem with the network manager service.

The top of the systemd-analyze blame log looks like this:

     24.209s NetworkManager-wait-online.service
     10.056s systemd-udev-settle.service
      1.499s plymouth-quit-wait.service
       936ms media-TStore1.mount
       487ms dev-disk-by\x2duuid-920a92b0\x2d6e65\x2d4a7a\x2d855d\x2d81cb436cd85f.device
       425ms systemd-rfkill@rfkill2.service
       421ms systemd-rfkill@rfkill0.service
       407ms media-TStore2.mount
       267ms gpu-manager.service
       215ms plymouth-read-write.service
       209ms systemd-rfkill@rfkill1.service
       132ms NetworkManager.service
        83ms ModemManager.service

The complete version can be seen here.

Also the systemd-analyze plot output can be seen here.

Thanks for your time.

Best Answer

  • You can change the timeout of nm-online to something like 10:

    Edit /lib/systemd/system/NetworkManager-wait-online.service as root or using sudo.

    Look for the lines:

    ExecStart=/usr/bin/nm-online -s -q --timeout=30

    Change 30 to whatever you like. 10 worked well for me.

    But beware this may break services that depend on it.


  • Related Question