After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796805 - NM does not allow D-Bus to auto-start iwd
NM does not allow D-Bus to auto-start iwd
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: Wi-Fi
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2018-07-13 11:25 UTC by Jan Alexander Steffens (heftig)
Modified: 2018-10-26 02:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wifi/ifd: Allow D-Bus activation to launch iwd (1.31 KB, patch)
2018-07-13 11:26 UTC, Jan Alexander Steffens (heftig)
none Details | Review

Description Jan Alexander Steffens (heftig) 2018-07-13 11:25:35 UTC
NM uses G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START to suppress iwd from being automatically started. This is in contrast to the wpa_supplicant backend, which does allow auto-starting.
Comment 1 Jan Alexander Steffens (heftig) 2018-07-13 11:26:15 UTC
Created attachment 373049 [details] [review]
wifi/ifd: Allow D-Bus activation to launch iwd

iwd does not ship activation configuration yet; until then we simply
fail the way we already do.
Comment 2 Andrzej Zaborowski 2018-07-13 13:15:12 UTC
This change looks good to me.
Comment 3 Lubomir Rintel 2018-07-13 13:58:14 UTC
Thanks, applied.
Comment 4 Andrzej Zaborowski 2018-10-26 01:46:48 UTC
@heftig: Have you by any chance test the autostart feature with IWD?  We should perhaps not have enabled it before we knew it worked.

I looked at the wpa_supplicant client code and it does not use GDBusObjectManagerClient like the iwd backend does. All other users of GDBusObjectManagerClient in NM pass this G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START flag, and I haven't found any other uses of GDBusObjectManagerClient in open source project that would confirm that this actually works.

(It seems that the service is actually autostarted by creating the GDBusObjectManagerClient instance but the returned instance is not usable)
Comment 5 Jan Alexander Steffens (heftig) 2018-10-26 01:56:56 UTC
Yes, it was tested by me and at least eworm or shibumi, IIRC.

The wpa_supplicant code does not use an object manager but it creates proxies directly. It allows auto-starting because it does not use G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START.
Comment 6 Andrzej Zaborowski 2018-10-26 02:12:33 UTC
Thanks, that's reassuring.  Maybe there's something else that's wrong in the setup of the user who reported this on IRC (I still have to test myself) or there's a bug in GDBusObjectManagerClient that only triggers on some condition.

What the user was seeing was that the GDBusObjectManagerClient instance that triggered the IWD auto-starting was not receiving signals, even though method calls work.  This is exactly with what I was seeing on IWD restart before adding this workaround: https://github.com/NetworkManager/NetworkManager/commit/86dd4000494de4d0050129ac7632a22840a103cb so it seemed quite probable.