xdg-desktop-portal
xdg-desktop-portal copied to clipboard
NetworkMonitor portal reports outdated information
The output of NetworkManager and NetworkMonitor portal on D-Bus do not agree. Example with the "metered" status:
NetworkManager
dbus-send --print-reply --system --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Get string:org.freedesktop.NetworkManager string:Metered
method return time=1635802984.480751 sender=:1.9 -> destination=:1.753 serial=9543 reply_serial=2
variant uint32 1
Meaning of output value
nm_metered_to_bool (guint nm_metered)
{
switch (nm_metered)
{
case 1: /* yes */
case 3: /* guess-yes */
return TRUE;
NetworkMonitor Portal
dbus-send --print-reply --dest=org.freedesktop.portal.Desktop /org/freedesktop/portal/desktop org.freedesktop.portal.NetworkMonitor.GetMetered
method return time=1635803126.973979 sender=:1.95 -> destination=:1.1453 serial=2973 reply_serial=2
boolean false
The same applies to the other properties.
Killing all xdg-desktop-portal instances leads to correct responses on the next request.
Pretty sure that's a duplicate of problems with apps not listening to the property changing afterwards...
Here you go: https://gitlab.gnome.org/GNOME/glib/issues/1718
How is the gio API relevant to my manual dbus call?
How is the gio API relevant to my manual dbus call?
The behaviour of the GIO API is caused by the behaviour of the portal.
I still don't understand what you mean but I am guessing your idea is that the problem just goes away when listening to signals? That's a recording of what happens in that case (left without flatpak, right with flatpak)
https://user-images.githubusercontent.com/3466497/144310541-0f301641-27a0-427f-b420-c181c108db54.mp4