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 770629 - PropertiesChanged signal is emitted only from org.freedesktop.DBus.Properties interface for WirelessDevice
PropertiesChanged signal is emitted only from org.freedesktop.DBus.Properties...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: API
1.4.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-08-31 08:15 UTC by Jan Grulich
Modified: 2016-09-02 18:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jan Grulich 2016-08-31 08:15:08 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.
Comment 1 Jan Grulich 2016-08-31 08:24:11 UTC
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
            }
      )
   ]
Comment 2 Thomas Haller 2016-08-31 09:41:55 UTC
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
Comment 3 Beniamino Galvani 2016-08-31 12:12:32 UTC
(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.
Comment 5 Thomas Haller 2016-09-01 13:46:55 UTC
actually, the fix was wrong :(

v2: th/dbus-property-changed-source-iface-bgo770629-v2