GNOME Bugzilla – Bug 770629
PropertiesChanged signal is emitted only from org.freedesktop.DBus.Properties interface for WirelessDevice
Last modified: 2016-09-02 18:51:11 UTC
With new NM 1.4.0 release we have been observing an issue in our KDE Plasma applet, where wireless connections are not properly updated with correct connection state. I found out that when NM emits PropertiesChanged signal (e.g. with AvailableConnections) it's emitted from org.freedesktop.DBus.Properties interface instead of from org.freedesktop.NetworkManager.Device interface as it used to before (or alternatively from both). It seems to be happening only with WirelessDevices, or at lease I haven't had a problem with WiredDevice. It's also possible that this problem is also somewhere else, like in ActiveConnection, but so far I noticed only this one. Is this intentional? I suppose we should migrate to org.fredesktop.DBus.Properties anyway, but right now this breaks our library and if we fix it, it will get released in a month which is not a problem, but we cannot depend on this version with the next Plasma release and thus people using distributions where packages don't get updated regularly will have it broken for some time.
It looks that the signal I need is emitted from DeviceStatistics instead, see: signal time=1472628181.846230 sender=:1.10 -> destination=(null destination) serial=55381 path=/org/freedesktop/NetworkManager/Devices/2; interface=org.freedesktop.NetworkManager.Device.Statistics; member=PropertiesChanged array [ dict entry( string "AccessPoints" variant array [ object path "/org/freedesktop/NetworkManager/AccessPoint/390" ] ) dict entry( string "AvailableConnections" variant array [ ] ) dict entry( string "State" variant uint32 20 ) dict entry( string "StateReason" variant struct { uint32 20 uint32 0 } ) ]
fix on review: th/dbus-property-changed-source-iface-bgo770629 https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/dbus-property-changed-source-iface-bgo770629
(In reply to Thomas Haller from comment #2) > fix on review: th/dbus-property-changed-source-iface-bgo770629 > > https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=th/dbus- > property-changed-source-iface-bgo770629 void nm_exported_object_unexport (NMExportedObject *self) { [...] - - if (nm_clear_g_source (&priv->notify_idle_id)) { - /* We had a notification queued. Since we removed all interfaces, - * the notification is obsolete and must be cleaned up. */ - g_hash_table_remove_all (priv->pending_notifies); - } } Don't we need still to clear the source when the object is unexported? Otherwise LGTM.
fixed upstream: master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=d2550cef44c58463d4d2627c3177d493bac23a00 nm-1-4: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=923eaa6a478f95a69d1b9ccac429c7ffea3e4af4 nm-1-2: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=d55cbd327b8f871c25daf62d64a540e12d315f8d
actually, the fix was wrong :( v2: th/dbus-property-changed-source-iface-bgo770629-v2
v2 merged upstream after ACK by dcbw on bengal on IRC master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=673282ece652a2b8d55892f3ee2b78e67b652b65 nm-1-4: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=c87b89bf8f7d0e45df08e84503eb16f5ef2ce3c6 nm-1-2: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=7b2d17c1bfc86094529c4e4d8ee3510dced118ef