Metered Networks: how to improve detection, and what apps listen to them?

I listened to a podcast where someone mentioned GNOME apps would already listen to the “metered connection” state, and adapt their behavior accordingly.

I see that (cough, in Linux) this will take forever to be adopted by every app, in every package format, while its pretty standard on Android.

System components like updates could easily listen to that though, and it sounds essential for me to have such a check, always.

The other problem, that would need to be solved in some GUI, is that “metered connections” are not as easy as on a phone. I dont know how many people do, but I dont think many people have a SIM card in their Laptop. It often costs more for no reason, so I always use a hotspot.

Problem here: you need to autodetect lots of names. “AndroidAP” and “iPhone” are pretty easy. But many have different names.

I saw there is a tag in KDEs networkmanager GUI, but you have to manually dive there and set networks as “metered”, i.e. most people that should have automatic updates and never change anything, shouldnt need to change this.

I think it should be a direct prompt after adding the network, entering the password, “this network is not metered”. Only then it makes sense to use it and to FRs in apps.

Questions

  1. Is there a good way to implement this?
  2. Are Networks tagged somehow intelligently, or just by a list of SSIDs with said wildcards?
  3. What do you think of this concept?

Btw, is there any event or something where KDE user data is shown? Like “x % Laptops”, “x percent Kubuntu/Fedora/Manjaro/…” “Has a damn SIM card”, “thinks its Windows”, “has never done an update”? Would be interesting.

Addition: in my opinion, all Linux Desktops should have opt-out autoupdates, and the reason they dont do it, is that its not intelligently detected.

Biggest factors are battery state/estimated power, and unmetered network.

Btw this is how it looks on GrapheneOS

So you see it even has idle detection, which could also be done on PCs. Windows (despite alls ways its updates suck totally) does this. Its bad, but Windows updates are also bad. Atomic upgrades, or only-reboot-when-kernel-updates would be no problem at all

No. Absolutely not. Who is going to answer the package management conflict questions when they pop up? Will it just choose option 1 each time? Skip over it and you never even saw it? All of a sudden, something broke your system and you have no idea why.

This is about Desktops. This is not phones in a walled garden.

2 Likes

automatic updates have nothing to do with walled gardens lol.

People dont update their systems, thats a thing. There need to be at least some distros with automatic updates so that they are user friendly.

There should be no package conflicts really, I would say this is an issue with the package managers. But even if there are some, this would be the place for a GUI popup that warns about this. Apart from that, autoupdates.

This is a very oldschool Linux-y opinion, that everything should be manual and controlled. Its simply not economic and is faar from how most people use PCs. Linux updates dont suck like Windows updates, but still Windows updates automatically and Linux doesnt.

But this is not even the topic here. I would like to focus on the detection of metered networks to enable actually working automatic updates.

In a walled garden, such as a phone, the updates are pushed down by the provider and all choices are made ahead of time. They already know what the hardware and software is, because they sold the device to you. When they add or replace a package, they can handle the dependency issues.

On your desktop, the distribution has no idea what hardware you have and cannot answer the dependency questions.

I will add that what Ubuntu is doing, working toward a completely SNAP system, there would be no dependency issues and that would be a prime system for Automatic Updates, but that is not ready yet. I would not run Ubuntu, but for some, it will be just what they need.

Are metered networks even a thing on Desktops / Notebooks? I use my Laptop a lot on the go - so I have a unlimited data plan on my phone and use it as a hotspot… everyone I know (who needs internet on the go) does the same.

About the updates… All distros I’ve been using do check for updates, notify me and give me the option when (and which ones) to install. This is IMHO the far better option than what the Windows AutoUpdate nightmare is.

So for me: this is a non-issue… What do the others think?

1 Like

Fedora Kinoite (to stay with KDE) also prebuilds images so dependency issues would be solved on their servers. Everything the user would do is download and apply.

If you have overlays (i.e. you change their system image by removing or adding packages) this could create some, but I never had them.

Fedora in general has way better updates than Debian, which I can imagine @WilsonEPhillips would run.

@Londeril No metered networks are mostly not a thing, which makes the network detection harder. KDE has a feature to manually set networks as metered, but this is opt-out (of “unmetered”) which means most people will not have set any networks as metered.

Also there are many systems that autoupdate, please dont mix your personal opinions or whatever in here. Some people might want it, and this is not the point of this thread.

This is about “if a user wants to have automatic updates, they should not eat their restricted data plan”.

Use cases:

  • a user has setup automatic updates, for example a “Grandma Laptop”, a Child laptop or simply a machine with daily updates
  • the user either has a business laptop with integrated WWAN card and SIMcard slot…
  • OR they simply use their phones hotspot, which most will do

The latter case is important, as its not as easy as on Android, where restricted data simply is cell data. The OS thus has to detect if the Laptop is connected to a “wifi” that is actually a hotspot from a phone with 6GB of cell data or so. And then the OS has to pause automatic updates.

Note: This can be used for way more, apps can stop preloading images, a browser could go into datasaving mode (although not really implemented by websites),… Androids FOSS apps show how many possibilities there are.

So @Londeril please stop arguing about “is clicking ‘okay’ every day a problem?” because this is simply a workaround for the situation where you would actually want automatic updates, but would not want to ristk

  • very high cell data usage
  • a failing update as its done with 5% battery and without AC
  • maybe high CPU load and very bad performance
  • maybe energysaver mode where updates should be paused

this would simply adapt Linux systems to what Android can do since forever. I and a lot of other people want useful automatic updates. Ublue has automatic updates preconfigured, as “the Debian experience” is simply not what everyone experiences anymore. @WilsonEPhillips

Automatic updates, “forced to users” increase security a lot. Systems should at least to automatic security updates, but on many distros these are not separated so “Distros should do automatic updates”.

There is nothing wrong with an up-to-date system.

and again: if there would be a dependency problem, this could pause that one update and request GUI interaction (in the KDE-World via kdialog and a yes/no Dialog) how to deal with it.


So, back to the actual constructive discussion:

How do you think such an opt-in for unmetered networks could look like?

1. KDE welcome dialog

I imagine it in the setup dialog: “Select networks in which you would like to automatically update”

Problem here: networkmanager sets all networks as unmetered by default. Also on Setup you mostly only have one network set up.

2. Popup on every Wifi network

Whenever entering a wifi password, you already get the “enter password” dialog.

Why not integrate a checkbox “this network is unmetered” in there?

So users could opt-in to automatic updates in that network. If users are lazy, this would have no danger of eating their cell data plans.