Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [systemd] Is this a NetworkManager bug?
Date: Mon, 13 Oct 2014 23:57:09
In Reply to: [gentoo-user] [systemd] Is this a NetworkManager bug? by walt
1 On Mon, Oct 13, 2014 at 6:39 PM, walt <w41ter@×××××.com> wrote:
2 > I just switched my home LAN from wired to all wifi and I'm having trouble
3 > with NetworkManager at boot time.
4 >
5 > I have systemd start NetworkManager at boot because I need the internet
6 > for ntpdate and to start the nfs server for the LAN. Before I switched
7 > to all-wireless this method worked perfectly, but no longer.
8 >
9 > After bootup I see that NetworkManager started wpa_supplicant in the
10 > background, but apparently does *not* run dhcpcd. (The wlan0 is up
11 > but it has no IP address and the routing table is empty.)
13 Do you have a system-wide connection for the wireless network? They
14 live in /etc/NetworkManager/system-connections. Also, what does "nmcli
15 -p general" says? In my case is:
17 centurion ~ # nmcli -p general
18 =============================================================
19 NetworkManager status
20 =============================================================
22 -------------------------------------------------------------
23 connected full enabled enabled enabled enabled
25 > As an alternative to NetworkManager I can have systemd start dhcpcd
26 > at boot, which almost (but not quite) works well enough. This
27 > causes a race condition because wlan0 takes several seconds to come
28 > up properly and by then both ntpdate and nfs-server have already
29 > run and failed.
30 >
31 > So, I asked myself, why not have systemd start dhcpcd at boot in
32 > addition to NetworkManager?
34 NetworkManager starts wpa_supplicant, but it does *NOT* use
35 wpa_supplicant.conf. If you do
37 systemctl status wpa_supplicant.service
39 you will see that wpa_supplicant runs with the "-u" flag; that enables
40 the DBus control interface, and it's through this that NetworkManager
41 controls wpa_supplicant. If you do not have system-wide connections,
42 NM will ask wpa_supplicant to *not* enable any connection. NM calls
43 the shots in this case.
45 > The reason that fails is that they both start wpa_supplicant in
46 > the background and the two instances interfere with each other.
47 >
48 > Anyone see a way around this catch22?
50 If I'm not mistaken, you need a system-wide NM connection enabled. You
51 can use nm-connection-editor (included with nm-applet), or nmtui
52 (ncurses interface since
54 Also, and orthogonal to almost all of this; I switched from ntp to
55 systemd-timesyncd, and it works *great*, specially in my laptop. With
56 my laptop, changing networks all the time, ntpd never quite worked.
58 Regards.
59 --
60 Canek Peláez Valdés
61 Profesor de asignatura, Facultad de Ciencias
62 Universidad Nacional Autónoma de México


Subject Author
[gentoo-user] Re: [systemd] Is this a NetworkManager bug? walt <w41ter@×××××.com>