I'm seeing some unwanted behaviour from NetworkManager in conjunction with iwd: If iwd starts after NetworkManager (as might and did happen on a freshly installed, fast laptop), the latter won't pick up the wifi networks iwd finds. Restarting NetworkManager fixes this, and a workaround to avoid it happening in the first place is adding the line 'before net' to the depend() function in '/etc/init.d/iwd'. Versions: =net-wireless/iwd-0.10 =net-misc/networkmanager-1.14.4
I'm working with upstream on this as we speak to find out why this ordering matters, there may be a bug in iwd or NM itself. This is happening on systemd boot as well.
Any progress? I know that iwd is not yet widely used, but would be nice to have it working without restarting NM everytime.
also, still present in iwd 0.14 networkmanager 1.15.1
Bug seems to have been resolved upstream as of openrc-0.42.1 + networkmanager-1.16.0 + iwd-0.18
Starting with version 0.18 iwd is actively managing network interfaces. It will destroy the wireless interfaces detected by (e)udev, and create new ones. The new ones do not comply to predictable network interface naming convention, but will have an 'old fashioned' kernel name like wlan0. See for details here: https://iwd.wiki.kernel.org/interface_lifecycle. I could imagine that if NetworkManager starts before iwd, that it will detect an interface named wlp2s0, but then when iwd starts wlp2s0 will be destroyed and a new one called wlan0 will be created. There seems to commandline and configuration options to prevent iwd from doing this, but I have not got that working.
Ben, what's the latest on this? Presumably something's happened in the last year :)
This still seems broken but I'll get with usptream on it again
(In reply to hfern from comment #5) > Starting with version 0.18 iwd is actively managing network interfaces. It > will destroy the wireless interfaces detected by (e)udev, and create new > ones. The new ones do not comply to predictable network interface naming > convention, but will have an 'old fashioned' kernel name like wlan0. See for > details here: https://iwd.wiki.kernel.org/interface_lifecycle. > > I could imagine that if NetworkManager starts before iwd, that it will > detect an interface named wlp2s0, but then when iwd starts wlp2s0 will be > destroyed and a new one called wlan0 will be created. > There seems to commandline and configuration options to prevent iwd from > doing this, but I have not got that working. I hope the "old fashioned " I/F names will still work whne this bug is resolved?
(In reply to Ben Kohler from comment #7) > This still seems broken but I'll get with usptream on it again To get around this and possibly improving iwd in general, in wpa_supplicant openrc script there is: after bootmisc modules before dns dhcpcd net Adding the same to iwd makes it start before NM
Seems to be fixed upstream, see https://bugs.gentoo.org/702900 However, I still think iwd should add the same openrc deps as wpa_supplicant Not everyone is using NM with iwd.
(In reply to Joakim Tjernlund from comment #9) > (In reply to Ben Kohler from comment #7) > > This still seems broken but I'll get with usptream on it again > > To get around this and possibly improving iwd in general, > in wpa_supplicant openrc script there is: > after bootmisc modules > before dns dhcpcd net > Adding the same to iwd makes it start before NM Ping? iwd's openrc deps needs some love.
I've not done much testing with this change, do you know of any downside or consequences to this? I can apply it but I'm trying to stay ahead of extra bug reports that may come in after that change.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50a1101f3c952f5086171aaf188ce09033f38f7f commit 50a1101f3c952f5086171aaf188ce09033f38f7f Author: Ben Kohler <bkohler@gentoo.org> AuthorDate: 2020-01-24 15:05:03 +0000 Commit: Ben Kohler <bkohler@gentoo.org> CommitDate: 2020-01-24 15:05:17 +0000 net-wireless/iwd: revise init script to fix NM startup Closes: https://bugs.gentoo.org/669632 Package-Manager: Portage-2.3.85, Repoman-2.3.20 Signed-off-by: Ben Kohler <bkohler@gentoo.org> net-wireless/iwd/files/iwd.initd-r1 | 14 ++++ net-wireless/iwd/iwd-1.4-r1.ebuild | 153 ++++++++++++++++++++++++++++++++++++ net-wireless/iwd/iwd-9999.ebuild | 4 +- 3 files changed, 169 insertions(+), 2 deletions(-)
Thanks, no I don't see any down sides.
(In reply to Larry the Git Cow from comment #13) > The bug has been closed via the following commit(s): > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > ?id=50a1101f3c952f5086171aaf188ce09033f38f7f > > commit 50a1101f3c952f5086171aaf188ce09033f38f7f > Author: Ben Kohler <bkohler@gentoo.org> > AuthorDate: 2020-01-24 15:05:03 +0000 > Commit: Ben Kohler <bkohler@gentoo.org> > CommitDate: 2020-01-24 15:05:17 +0000 > > net-wireless/iwd: revise init script to fix NM startup To be clear, this really fixes the iwd service startup to take place early, before NM. Adding iwd to default service level then fixes to NM hang as now iwd starts before NM. The standalone case is also improved, iwd starts earlier to be ready, just like wpa_supplicant would.
(In reply to Joakim Tjernlund from comment #15) > (In reply to Larry the Git Cow from comment #13) > > The bug has been closed via the following commit(s): > > > > https://gitweb.gentoo.org/repo/gentoo.git/commit/ > > ?id=50a1101f3c952f5086171aaf188ce09033f38f7f > > > > commit 50a1101f3c952f5086171aaf188ce09033f38f7f > > Author: Ben Kohler <bkohler@gentoo.org> > > AuthorDate: 2020-01-24 15:05:03 +0000 > > Commit: Ben Kohler <bkohler@gentoo.org> > > CommitDate: 2020-01-24 15:05:17 +0000 > > > > net-wireless/iwd: revise init script to fix NM startup > > To be clear, this really fixes the iwd service startup to > take place early, before NM. > Adding iwd to default service level then fixes to NM hang > as now iwd starts before NM. > > The standalone case is also improved, iwd starts earlier to > be ready, just like wpa_supplicant would. Oh, and perhaps an "empty" conf.d file should be added ?