Closed Dygear closed 3 weeks ago
Writing down notes for myself, or someone else if they want to take this on.
In cosmic-applet-network/src/network_manager/mod.rs#L366 is has:
let s = Settings::new(s);
Settings is from cosmic_dbus_networkmanager::settings::connection that looks like it loads the known information about theconnection state from last time (so there is a database or settings file somewhere). ConnectionSettings's autoconnect
value could be used, but that is dependent on WifiSettings
is a inhearting of ConnectionSettings
.
ConnectionSettings,
(auth_retries("auth-retries"): i32),
(autoconnect("autoconnect"): bool),
Otherwise, we just add the autoconnect
property to WifiSettings
that defaults to true
so when the connection manager loads the list of known connections it can look over the available SSIDs and the list of known SSID's and connect if the SSIDs match.
This has been resolved. Thank you @wash2 for landing this in https://github.com/pop-os/cosmic-applets/commit/d1a6e089b4b87d6b8b4ee6b6759317f49af402ee.
Cosmic-applets version:
0.1.0~1725375368~24.04~0b53634
Specific applet that this is regarding (if applicable): cosmic-applet-network
Issue/Bug description: When the system goes to sleep, or when the connection is dropped, the system does not automatically reconnect to the last WiFi connection it had.
Steps to reproduce:
Expected behavior: System should automatically reconnect to the last SSID it was connected to. Ideally this should also persist over system reboots, and not just sleep / wake events, or lost of access to the SSID due to power loss (on the access point side) or moving away from the signal source.
Other notes: Other systems will often pick the next best connection that it knows. That doesn't always produce an expected behavior for the user, that can sometimes be surprised when their laptop is suddenly connected to their Cellphone's Hotspot for several hours and didn't realize until their provider sent them a message about them being near their data limit. So for the moment, I think the best move forward would simply re-attempt a connection back to the same SSID as before.