Bug 481579

Summary: wi-fi 2.4 ghz is connected after login despite wi-fi 5ghz has higher priority
Product: [Applications] systemsettings Reporter: Patrick Silva <bugseforuns>
Component: kcm_networkmanagementAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: jgrulich, nate, sitter
Priority: NOR Keywords: qt6, usability
Version First Reported In: master   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Patrick Silva 2024-02-20 13:37:42 UTC
SUMMARY
I have set the priority of wi-fi 5ghz connection to 1 in the KCM, but my system always connects to wi-fi 2.4ghz connection whose priority is 0.

OBSERVED RESULT
priority settings do not take effect

EXPECTED RESULT
priority settings take effect

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.1
Graphics Platform: Wayland
Comment 1 Harald Sitter 2024-02-21 12:50:33 UTC
I believe priority application happens entirely within networkmanager. I'm not convinced we can do much about this bug. That said, what I think actually happens is that NM would pick the first network it finds, regardless of priority. Which at face value seems like reasonable behavior: you'd want to get to network ASAP, not wait for networks to appear (if they will at all)
Comment 2 Patrick Silva 2024-02-21 13:41:45 UTC
workaround: unchecking "Connect automatically with priority" in "General configuration" tab of the 2.4ghz connection.

i have Arch Linux running Gnome 45.4 installed on the same laptop and it always connects to 5ghz connection, even before login.
Comment 3 Harald Sitter 2024-02-22 06:35:05 UTC
What's the output of 

nmcli  --fields NAME,AUTOCONNECT-PRIORITY connection show

on both plasma and gnome?
Comment 4 Patrick Silva 2024-02-22 10:11:08 UTC
Plasma:
$ nmcli  --fields NAME,AUTOCONNECT-PRIORITY connection show
NAME                   AUTOCONNECT-PRIORITY 
56Kbps-5G              1                    
56Kbps                 0                    
Ethernet NIC           1                    
Hotspot_neon           0                    
laptop_desktop         0                    
laptop_router_desktop  0       

Gnome:
$ nmcli  --fields NAME,AUTOCONNECT-PRIORITY connection show
NAME               AUTOCONNECT-PRIORITY 
56Kbps-5G          0                    
lo                 0                    
56Kbps             0                    
56Kbps_5GHZ        0                    
56Kbps_5GHZ 1      0                    
A cabo             -999                 
Casa               0                    
Casa_2G            0                    
claudia            0                    
homewifi_05C       0                    
Hotspot            0                    
meu_ap             0                    
MotoG3 9422        0                    
#NET-CLARO-WIFI    0                    
#NET-CLARO-WIFI 1  0                    
Rede J8            0