[ltp] T40, ACPI, and sleeping

Bob Alexander linux-thinkpad@linux-thinkpad.org
Sat, 29 Jan 2005 23:36:19 +0100


morpheus wrote:
> On Sat, 2005-01-29 at 11:42 -0800, Bill Wohler wrote:
> 
>>However, if I "modprobe ath_pci" the system hangs
> 
> SNIP
> 
>>/etc/acpi/sleep:
>>
>>  #! /bin/sh
>>  /etc/init.d/hotplug stop
>>  ifdown ath0
>>  rmmod ath_pci ath_rate_onoe ath_hal e1000
>>  sync
>>  echo 3 > /proc/acpi/sleep
>>  #/etc/init.d/hotplug start
>>  #modprobe ath_pci
>>  #ifup ath0
> 
> This is just a guess, but you should remove ath_hal, wlan and ath_pci.
> You are only removing ath_pci.  If you don't remove ath_hal, during
> sleep/resume it could become unstable.  Since it is a prerequisite for
> ath_pci, when you try to start ath_pci it hangs waiting for ath_hal.
> Also, why use rmmod instead of modprobe -r?  Since you're inserting with
> modprobe makes sense to remove with modprobe for consistency, also
> modprobe takes care of dependencies and options.
> So, I would do this:
> /etc/acpi/sleep:
> 
>   #! /bin/sh
>   /etc/init.d/hotplug stop
>   ifdown ath0
>   modprobe -r ath_pci
>   modprobe -r ath_hal
>   modprobe -r wlan
>   sync
>   echo 3 > /proc/acpi/sleep
>   #/etc/init.d/hotplug start
>   modprobe wlan
>   modprobe ath_hal
>   modprobe ath_pci
>   ifup ath0
> 
> Let me know if this works!
> -m
> 

Morph,
in my sleep script I do not touch madwifi.
When I suspend to RAM I see the wireless indicator go off and I assume 
wireless goes down too (do not have any AP to try).

Upon resuming the wireless does not come on by itself but with 2-3 Fn+F5 
the wifi light comes up again and lsmod looks allright:

bob@t40:~$ lsmod
Module                  Size  Used by
ath_pci                62880  0
ath_rate_onoe           8840  1 ath_pci
ath_hal               133456  2 ath_pci
wlan                  121116  3 ath_pci,ath_rate_onoe

so is it really necessary to bring it down ?

BTW my ping to www.apple.com resumes by itself upon resuming via eth0 (I 
have ifplugd).

Bob