GNOME Bugzilla – Bug 796805
NM does not allow D-Bus to auto-start iwd
Last modified: 2018-10-26 02:12:33 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.
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.
This change looks good to me.
Thanks, applied.
@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)
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.
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.