Tuesday, April 24, 2007

 

Wireless Disabled After Resume from Suspend

After I resume my laptop (OpenSUSE 10.2, Dell 640m, Intel 3945ABG wireless card) from stand by (suspend to ram), the wireless usually stops working. The KNetworkManager applet stops showing the wireless device. After investigating further, it seems that the problem is with the HAL daemon, and restarting it fixes the problem.

 /etc/init.d/haldaemon restart 

However restarting HAL daemon manually every time after resume was not a good option. So I decided to use my time while waiting at the SF airport better by finding a solution to the problem. It seems that SuSE uses pm-utils for managing suspend and other power related options stating version 10.2. Some of the configurations are present in /etc/pm/config. It turns out that all the scripts present in /etc/pm/hooks/ are executed after every suspend or resume event. One of the following four option is passed as a command line argument to each of the script: hibernate, suspend, thaw, or resume. Since I wanted to restart haldaemon at every resume, all I had to do was to create a new executable file in /etc/pm/hooks/ with the following contents:

#!/bin/sh
# File: /etc/pm/hooks/99haldaemon

case "$1" in
        resume)
                /etc/init.d/haldaemon restart
                ;;
        *)
                ;;
esac

And now the haldaemon is restarted at every resume, and the wireless works fine after I open the laptop lid. This is a hack, and I hope a proper fix will be included in future versions of SuSE.

Labels: ,


Comments:
great help, thanks. i also had the same problem with my fedora core 5 (2.6 kernel). resetting the haldaemon did the trick for me as well, thanks. -stav
 
Thanks as well. Although resetting the haldaemon didn't work in my case with openSuse 10.2 on a Dell e1505 w/ipw3945 wireless.
Rather than restarting hal, I found this worked like a champ:

#!/bin/sh
#
# shutdown ipw3945 and knetwork, then restart both...

case "$1" in
thaw|resume)
modprobe -r ipw3945
/etc/init.d/network stop
/etc/init.d/network start
modprobe ipw3945
;;
*)
;;
esac
 
Thanks for the help. Between this page and the HowTo at http://en.opensuse.org/Pm-utils, I was able to get a Dell Vostro 1400 working with OpenSuse 10.3

Changes I needed:
1) make sure it resumed after the 10NetworkManager
2) add a delay after 10NetworkManager, otherwise it didn't "take"
3) due to the Vostro's sound driver, I added my alsasound.

#!/bin/bash
# File: /etc/pm/sleep.d/00wireless

case "$1" in
resume|thaw)
/etc/init.d/alsasound restart
sleep 1s
/etc/init.d/network restart
;;
*)
;;
esac
 
This comment has been removed by a blog administrator.
 
Post a Comment

Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?