When I wake the Librem 5 cell data restores always faster than wifi (except when it fails to come back) and I am curious how software that is open and needs a connection works? Do applications try to connect through the cell data first because it is available or does it wait for wifi because wifi is on and was connected before suspending the device occurred?
(written from the L5)
It could depend on various things.
- The software is open but does it already have an established connection but wasn’t communicating? Or it makes a new connection each time it needs to communicate? And regardless does it bind its socket to “any” IP address or to the IP address of a specific interface?
- Is it trying to connect to a host on the local network or a host on the internet?
I think the general answer might be … it will try to connect via cellular. It won’t wait for WiFi. (General means: doesn’t have an existing connection, binds to “any” IP address and connects to a host on the internet.)
Once both are available, the respective metrics will mean that, in the general case, WiFi will be preferred (even though this might be quite wrong from a bandwidth perspective). Refer
If this is causing specific annoyance (e.g. you are on a mobile plan with very limited data) then you might try disabling mobile data unless you are in a situation that needs it.
I note also that some applications may be sensitive to whether you are on a metered connection, and alter their behaviour accordingly. However that in turn depends on whether the interface is somehow specified as ‘metered’. My assumption is that WiFi will always say “no” (not metered) and that mobile will by default say “yes”. This will be most relevant if the application intends to download a large amount.