GNOME Bugzilla – Bug 649361
Remember last network after wake-up
Last modified: 2012-12-20 15:05:00 UTC
This must have been reported earlier, but I can't find the bug. It would be a great enhancement if NetworkManager would remember the last selected (wireless) network before suspend or hibernate is selected and if it could try to connect to that network automatically after the suspend. Ideally the last selected VPN would be remembered as well. If remembering the network is not feasible, a second option would be to be able to assign priorities to different networks.
It should be doing this already, because NM uses "last connected network" as the best network to connect to, including after resume. As long as the network that was previously connected to is still found in a scan, I'd expect NM to connect to it upon resume (also assuming you have that connection set to "connect automatically"). To debug this, can you grab logs of NM's operation across the suspend/resume from /var/log/messages (Fedora, SUSE) or /var/log/daemon.log (Debian, Ubuntu), whichever your distro uses?
Created attachment 187615 [details] log before suspend
The two concerned networks are WLAN-unifr and VOIP-unifr. The network I connect to is WLAN-unifr. When I am connected and close and open the laptop's lid NetworkManager tries to connect to the other network VOIP-unifr. I have attached the log from /var/log/daemon.log split up into before and after closing the lid.
Created attachment 187616 [details] log after suspend
*** Bug 639323 has been marked as a duplicate of this bug. ***
Is it still the case with current versions?
I don't know (I'm the one who créated the duplicated bug), for now, the only remaining wifi in my neighbourhood is the "good" one.
Jendrik, if you have still problem with connecting after resume, please follow instructions at https://live.gnome.org/NetworkManager/Debugging/#wifi and attach wpa_supplicant logs. What Wi-Fi card do you have (lspci)? Are there any error regarding wlan0 in 'dmesg'?
We lack information whether this bug still applies and how does it look like. Feel free to add information or file a new bug report.
It took a while for me to be able to test this. I think it has in fact been fixed by now.