I post here because I tried to speed up my Arch a little bit, and the systemd-analyze tool made me realize that NetworkManager was taking about 10s, that is half my boot time. But I don't understand why it takes so much time. Or, more precisely, why it needs to connect to a network before I'm logged in. I searched on the web, found several topics dealing with the topic but it didn't help: I use dhcpcd and not dhclient for instance.
So I tried some things, among which remove the "--no-daemon" option in the .service file. And it somewhat worked! Now the boot time reported by systemd-analyze is half what it used to be. But I have to wait for about 10 seconds after entering my password to get logged in.
So is there a way to telle systemd that I don't want to wait for NM to finish its business before giving me access to my session?
Thanks in advance,
Last edited by Artifère (2013-06-23 23:46:34)
https://bbs.archlinux.org/viewtopic.php … 4#p1249894 , https://bbs.archlinux.org/viewtopic.php … 2#p1271012 and a few other in that thread.
Thank you for your quick answer. In the first thread, if it is about connman, it does not seem to support openvpn... and I need openvpn in some cases It is the same for wicd mentioned in the second thread. I had wicd before I needed openvpn to work.
But is it normal that started as a daemon, nm prevent me from completing the logging process?
Do you have anything that requires network to start? systemd boots the system by dependencies and will start as many processes in parallel as possible, so if your login manager waits for NetworkManager then it must depend on network(.target ?) and wait for NetworkManager to finish.
Can you give more details on your setup? What do you have at boot? Which login manager? It looks like systemd does the right thing since you still can't login until connected, you should probably focus more on what needs the network and block it than why NM takes so much time to connect.
Oh! Thank you very much, that was exactly what I was looking for. In fact it turned out that multi-user had NM in its .wants directory... so I removed it from there, and now NM takes 5ms to load, everything is ok, and when I log in I just wait for xfce to load.
To answer your question, I log in via the basic tty.
So thank you again :-)
Last edited by Artifère (2013-06-23 23:46:10)
I am not sure what just happened in this thread... it would seem that Antifere found a solution, but I 'm not sure what was in the ".wants" directory that solved the problem. FWIW, I evaluated the things I have at startup and realized that I have nothing that was totally dependent on having the network fully connected upon boot, so I simply masked the networkmanager-wait-online.service. This seems to work just fine for me. Alternatively, you could just remove the symlink from the multi-user.target wants directory.
In fact, I did not know how dependencies were managed with systemd. So in the multi-user.target.wants directory, there was a symlink to Network Manager (and deluged). Since I did not see why they were here, I removed them. So now, multi-user doesn't wait for networkmanager to finish to start. But I did not have the network-manager-wait-online.service enabled.
Is this clearer now?
What you should do is:
# rm /etc/systemd/system/multi-user.target.wants/NetworkManager.service
Last edited by baqtor (2014-12-26 14:56:39)
Please don't necrobump, particularly solved threads: https://wiki.archlinux.org/index.php/Fo … Bumping.27