FS#71321 - NetworkManager doesn't honor the "Connect Automatically with priority" setting

Attached to Project: Arch Linux
Opened by Reginald (Uqbar) - Monday, 21 June 2021, 07:31 GMT
Last edited by Toolybird (Toolybird) - Saturday, 03 June 2023, 00:15 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
NetworkManager doesn't honor the "Connect Automatically with priority" setting according to the official documentation at:

https://developer.gnome.org/NetworkManager/stable/nm-settings-nmcli.html

<quote>
autoconnect-priority

The autoconnect priority. If the connection is set to autoconnect, connections with higher priority will be preferred. Defaults to 0. The higher number means higher priority.
</quote>

Additional info:
* package version(s)
extra/networkmanager 1.32.0-1
extra/nm-connection-editor 1.22.0-1
KDE Frameworks 5.83.0
Qt 5.15.2 (built against 5.15.2)
The xcb windowing system

* config and/or log files etc.

* link to upstream bug report, if any

Steps to reproduce:
(From System Settings-->Network-->Connections)
1. Create a system-wide ("All users may connect...") wired ethernet DHCP connection with "Connect automatically with priority" enabled to 99
2. Create a system-wide wireless DHCP connection with "Connect automatically with priority" enabled to 75
3. Disable WiFi
4. Wait for wired connection to be up and running
5. Enable WiFi

Expected results:
Wired connection stays up and running.
Wireless connections doesn't come up.

Actual results:
WiFi connection (lower priority) is established along with the wired one (higher priority).

Bug happens:
100% of the times
This task depends upon

Closed by  Toolybird (Toolybird)
Saturday, 03 June 2023, 00:15 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments
Comment by Reginald (Uqbar) - Monday, 21 June 2021, 07:34 GMT
Wireless connection configuration file from /etc/NetworkManager/conf.d/system-connections/
Comment by Reginald (Uqbar) - Monday, 21 June 2021, 07:35 GMT
Wireed connection configuration file from /etc/NetworkManager/conf.d/system-connections/
Comment by Jan Alexander Steffens (heftig) - Monday, 21 June 2021, 15:43 GMT
You've misinterpreted how connections work. There's no global single connection. Priority affects which connection is chosen *for a each device, separately*. Ethernet being up with a high-priority connection does not prevent Wifi from being established with a lower priority connection.
Comment by Reginald (Uqbar) - Monday, 21 June 2021, 15:45 GMT
Could you please point me at the relevant document detailing such a behavior?
Comment by Jan Alexander Steffens (heftig) - Monday, 21 June 2021, 15:55 GMT
It's right at the start of `man NetworkManager`: https://developer.gnome.org/NetworkManager/stable/NetworkManager.html

> NetworkManager will connect any network device when a connection for that device becomes available, unless that behavior is disabled.
Comment by Reginald (Uqbar) - Monday, 21 June 2021, 16:30 GMT
The official documentation by RedHat/Gnome about the priority doesn't mention any "per technology" policy, though.
Your answer is something you are inferring from the words you are quoting, though.
Thanks anyway for sharing your view of the problem.

Loading...