On Mon, Oct 13, 2014 at 6:39 PM, walt <[email protected]> wrote:
> I just switched my home LAN from wired to all wifi and I'm having trouble
> with NetworkManager at boot time.
>
> I have systemd start NetworkManager at boot because I need the internet
> for ntpdate and to start the nfs server for the LAN. Before I switched
> to all-wireless this method worked perfectly, but no longer.
>
> After bootup I see that NetworkManager started wpa_supplicant in the
> background, but apparently does *not* run dhcpcd. (The wlan0 is up
> but it has no IP address and the routing table is empty.)
Do you have a system-wide connection for the wireless network? They
live in /etc/NetworkManager/system-connections. Also, what does "nmcli
-p general" says? In my case is:
centurion ~ # nmcli -p general
=============================================================
NetworkManager status
=============================================================
STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN
-------------------------------------------------------------
connected full enabled enabled enabled enabled
> As an alternative to NetworkManager I can have systemd start dhcpcd
> at boot, which almost (but not quite) works well enough. This
> causes a race condition because wlan0 takes several seconds to come
> up properly and by then both ntpdate and nfs-server have already
> run and failed.
>
> So, I asked myself, why not have systemd start dhcpcd at boot in
> addition to NetworkManager?
NetworkManager starts wpa_supplicant, but it does *NOT* use
wpa_supplicant.conf. If you do
systemctl status wpa_supplicant.service
you will see that wpa_supplicant runs with the "-u" flag; that enables
the DBus control interface, and it's through this that NetworkManager
controls wpa_supplicant. If you do not have system-wide connections,
NM will ask wpa_supplicant to *not* enable any connection. NM calls
the shots in this case.
> The reason that fails is that they both start wpa_supplicant in
> the background and the two instances interfere with each other.
>
> Anyone see a way around this catch22?
If I'm not mistaken, you need a system-wide NM connection enabled. You
can use nm-connection-editor (included with nm-applet), or nmtui
(ncurses interface since 0.9.10.0).
Also, and orthogonal to almost all of this; I switched from ntp to
systemd-timesyncd, and it works *great*, specially in my laptop. With
my laptop, changing networks all the time, ntpd never quite worked.
Regards.
--
Canek Peláez Valdés
Profesor de asignatura, Facultad de Ciencias
Universidad Nacional Autónoma de México