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.
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.
Rather than restarting hal, I found this worked like a champ:
# shutdown ipw3945 and knetwork, then restart both...
case "$1" in
modprobe -r ipw3945
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.
# File: /etc/pm/sleep.d/00wireless
case "$1" in
Links to this post: