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 737356 - [RFE] select WiFi connections for autoconnect based on signal strengh (autoconnect-strategy)
[RFE] select WiFi connections for autoconnect based on signal strengh (autoco...
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: 593654
 
 
Reported: 2014-09-25 11:55 UTC by Thomas Haller
Modified: 2020-11-12 14:30 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2014-09-25 11:55:26 UTC
There is a long requested feature to provide more flexibility for selecting the ~best~ connection for autoconnect.

For a long time, NM prefers the connection that was connected last (ie. sorting by connected-timestamp). Especially for WiFi, there might be several (known) networks in range. When they are are autoconnect=yes, so which one to pick?

bug 580018 will add a new connection.autoconnect-priority value, that allows the user *always* to prefer a connection over another. Basically, it partitions all connections into different priority groups.
But still, within one priority group, NM still has to pick one out of several connections. And it continues to pick it based on connected-timestamp.


There is a feature request, to choose the connection based on the best WiFi signal strength. autoconnect-priority is not a solution for that, because we need a different automatism then connected-timestamp.







How about this as implementation:

Clearly, connected-timestamp is useful for many cases. It should stay the default.

Lets add a connection property
  [connection]
  autoconnect-strategy=default|signal-strength


When choosing the best candidate, we sort the candidates and select the first one. Sorting effectively means "comparing two candidates".

If both candidates have autoconnect-strategy=default, we do the current connected-timestamp comparison.
If one of the candidates has autoconnect-strategy=default, we still sort by timestamp. IOW, "default" wins over "signal-strength".
If both candidates have "autoconnect-strategy=signal-strength", we would compare the candidates based on WiFi signal strength. In case of equality, fallback to "default".

Specifying autoconnect-strategy=signal-strength on a non-WiFi connection currently has no effect, and we fallback to "default".
Comment 1 asbesto 2014-09-26 20:31:44 UTC
Great feature, I really hope it will be implemented! :)
Comment 2 Thomas Haller 2015-01-06 15:45:55 UTC
Possible enhancement:

Connections have:
[connection]
autoconnect-strategy=default|timestamp|signal-strength


and NetworkManager has a systemwide configuration option:
[main]
autoconnect-strategy=timestamp|signal-strength


If a connection is configured as "default", NM would choose the globally configured fallback. That way, users who always want to use the signal-strength strategy can flip only the system-wide switch.
Comment 3 Robert Orzanna 2015-05-02 15:32:43 UTC
Dear all,

This would be a great enhancement! Is this feature currently being worked on?

Regards,

Robert
Comment 4 Thomas Haller 2015-05-04 06:53:35 UTC
(In reply to Robert Orzanna from comment #3)
> Dear all,
> 
> This would be a great enhancement! Is this feature currently being worked on?

AFAIK, nobody is working on it.
Somebody is welcome to pickup this task (as always).
Comment 5 Dan Williams 2015-12-11 14:56:49 UTC
Since we have autoconnect priority now, we might as well just switch over to signal strength for WiFi for 1.2.  If that's not the correct mechanism then the user can prioritize their WiFi APs, just like they can do on other OSs like Mac OS X and Windows.

The pathological case is where there "Workplace" and when you're at work, you always want to connect to "Workplace".  But Starbucks is right downstairs, and at your desk it's stronger than Workplace, and sometimes when you're not at work you do use Starbucks.  Autoconnect priority can easily fix that.

(except there's no UI for autoconnect priority right now, of course)
Comment 6 André Klapper 2020-11-12 14:30:44 UTC
bugzilla.gnome.org is being shut down in favor of a GitLab instance. 
We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.

If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/

Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).