Ubuntu 15.04 network manager causing slow boot
Solution 1:
I faced the same problem before, NetworkManager
taking about 8 seconds. There are three ways to solve this problem:
-
Disable connecting automatically for your connection
edit connections > select your connection > edit and disable connecting automatically
You can simply disable
Enable networking
from network indicator.-
You can disable the service by running this command
systemctl disable NetworkManager-wait-online.service
Solution 2:
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:
[Service]
Type=oneshot
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.
Source
Solution 3:
Disable dhcp
on eth0
interface.
If you have dhcp configured on eth0
, and the wire is not connected, the system will keep looking for an ip address to assign your device, until the request for ip address times out, before the boot continues.
To verify if this would solve your problem, do
sudo /etc/init.d/networking restart
and take note of how long it takes for this service to restart.
The service will restart in no time, if there's no issues around eth0
interface, else, a long delay and timeout will be presented.