GNOME Bugzilla – Bug 688216
add a flag to connection indicating that programs should minimize bandwidth used
Last modified: 2016-09-13 14:33:12 UTC
There are still users dependent on paid-per-transferred-data connections or "FUP'd" / "bandwidth-capped" connections. Many apps could adjust their behaviour to minimize bandwidth at the expense of more CPU cycles or less latency to the user -- but they'd need to learn about this condition. Given that the very same network connection from configuration POV can be both flat-rate and paid-per-data, it would make most sense to implement this as a boolean in connection information and expose it to the user in the connection properties and possilby also when creating a new mobile connection. I don't really know how is the best way to expose the current state to the apps but they should learn it both when they ask and when this aspect of network configuration changes.
Yeah, we've discussed this before in the context of mobile broadband connections. It's been handled before by PackageKit's "dont check for updates when on mobile broadband" preference, but should likely be more generic. I'm not sure this should translate into a "cost per megabyte" setting or anything, but perhaps a setting for "this connection is metered" or something that apps could look for, or that NetworkManager could indicate.
It's not necessarily just "connection is metered"; if you're on a 2G broadband connection, you don't want packagekit doing large downloads in the background even if you have unlimited data, because it will slow down your other network use. (Of course, we could still call it "connection is metered", and people could just abuse it for other cases...)
*** Bug 693073 has been marked as a duplicate of this bug. ***
It could be handy to have something a bit more generic than connection firewalld zones, maybe more like connection tags. You could have a set of published tags and one of them could say something like "low-bandwidth". If that doesn't help, a different tag could be created. Maybe "no-auto-download". As you might want to prevent downloads on specific networks for various other reasons (you are usually connected for a short time, there is a policy on downloading, etc). The same way you could mark a connection "no-instant-messaging". Just ideas.
commit https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=7d09debdf0b1bd6d76a645d5195e89e3ad16892f and bug 741725 introduced a connection property "connection.metered" [1]. This can be set to "yes|no|unknown". When a connection is active on a device, the Device also has a "Metered" property in the D-Bus API [2]. That value is "yes|no" if the connection explicitly specifies the metered state. If the connection-property is "unknown", the state is guessed depending on the presence of a DHCP hint "ANDROID_METERED". We could implement better heuristics to guess the metered state. Then, Manager also has a "Metered" property, which is basically the metered state of the device with the default-route [3]. Applications like package-kit should monitor the "Metered" property [3] to make educated guesses. Users can configure connections as metered, otherwise the heuristics kicks in. [1] https://developer.gnome.org/NetworkManager/unstable/nm-settings.html [2] https://developer.gnome.org/NetworkManager/unstable/gdbus-org.freedesktop.NetworkManager.Device.html#gdbus-property-org-freedesktop-NetworkManager-Device.Metered [3] https://developer.gnome.org/NetworkManager/unstable/gdbus-org.freedesktop.NetworkManager.html#gdbus-property-org-freedesktop-NetworkManager.Metered This is all part of 1.2.0 API. I am closing this bug as a duplicate (although it predates the other BZ). If you think that the present feature does not fully satisfy this request, please open a new bug and discuss how the existing feature can be adapted/extended for your envisioned use-case. *** This bug has been marked as a duplicate of bug 741725 ***