[ltp] Speeding up wifi reconnect with Network Manager on wake up

Jens Rutschmann linux-thinkpad@linux-thinkpad.org
Thu, 08 Nov 2012 23:14:30 +0100

Am 08.11.2012 20:41 schrieb Rubin Abdi:
 > ...
> A big issue I was having still with Network Manager however was simply
> that after waking up from sleep it would take up to 60 seconds for my
> machine to reconnect to wifi. After some googling and staring at logs I
> realized that NM is waiting a set number of seconds after wake before
> doing any sort of reconnection business. I tried hurrying that up by
> simply ifconfig wlan0 up which did bring up the wifi LED sooner than
> later, but NM was still waiting for something.
 > ...

Hey Rubin,

I have switched from KDE 3 to KDE 4 very late in the 4.x cycle and in my KDE 3 times I had both selfmade suspend and 
network scripts, i.e. no networkmanager involved at all. Back then I suspended by simply doing "echo mem > 
/sys/power/state" and the network connection was simply there after resuming without the need for any manager or script.

As I realized lately during some suspend tests this still works even with networkmanager and KDE power managers running. 
Actually it seems to be some KDE power manager or system scripts that tell networkmanager to do a reconnect but only if 
they are triggering the suspend themselves.

Please note though that I have not switched the location while the machine was sleeping so when it resumed the same 
network was still available. I have not tried what happens when the network disappears, probably networkmanager realizes 
this at some time and tries to reconnect to one of the available networks.

This is on a T61 with Gentoo.