[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wifi failed after hibernate

Hi all.

> when my laptop starts, the connection wifi works fine, after that my
> laptop has hibernated, when I restart, all works fine except the
> connection wifi.

A familiar problem.... I have been presuming that the problem has been 
somewhere in my configuration and my use of an old-style wpasupplicant config 
acting as a roaming daemon for my wifi along with ifconfig. [1]

While I've not solved the problem, I can offer a couple of workarounds that 
work for me:

* turn off the wireless radio using the hardware switch and wait for a few 
seconds before hibernating. (this means that the network connection is torn 
down and the device will get seen anew by hal when it is turned back on after 
you resume)

* if turning the radio off doesn't work for whatever reason or I forget, then 
the following script [2] seems to get things up and running again. You'll 
need to edit it to your tastes, including your own wireless module in the 
rmmod/modprobe statements etc. Each of the sleeps is actually necessary and 
the values of them are just the minimum that works reliably for me. I don't 
know why they are needed but the same sequence of commands run without the 
sleeps fails to reactivate my wlan.

Happy hunting!


[1] <rant>Long story... when I was setting this system up that was the 
recommended way to do it. It worked really well for me. Then the 
wpa_supplicant maintainers changed their minds about how things should work 
and decided that a new (and at that stage non-existent) roaming daemon should 
do these things not wpa_supplicant + ifplugd. I gave up rewriting my wpa 
config files each and every time they changed format, location or mode of 
operation and have stuck with what is (mostly) working on my laptop. On the 
next machine, I'll look at whatever the preferred config on that particular 
day is.</rant>


---------- snip ----------

# take everything down to a clean,  unconfigured state
/etc/init.d/ifplugd stop
/etc/init.d/wpasupplicant stop
ifdown eth1
killall pump
rmmod ipw2100

sleep 2

# start bringing things back up, starting with the kernel module
modprobe ipw2100
/etc/init.d/wpasupplicant start

sleep 5

wpa_cli reassociate

sleep 2

/etc/init.d/ifplugd start

---------- snip ----------

Stuart Prescott                 www.nanoNANOnano.net

Reply to: