notes on javascript, linux, and more

3.15.2008

debian-eeepc suspend issues with networkmanager

I was having issues with NetworkManager being unable to talk to my wireless card after resuming my Eee running Debian (sid) with Xfce4.

I was using the eeepc-acpi-scripts from the main debian repository, and not using the 'zzz' or 'wifi' scripts that some people recommend download, as they caused video issues on resume.

So I made changes to the file at /etc/acpi/actions/suspend.sh. You'll find my modified suspend.sh below:

#!/bin/sh
# do nothing if package is removed
[ -d /usr/share/doc/eeepc-acpi-scripts ] || exit 0
if (runlevel | grep -q [06]) || (pidof '/sbin/shutdown' > /dev/null); then
exit 0
fi
brn_control=/proc/acpi/asus/brn
brightness=$(cat $brn_control)
#turn off wireless, stop network-manager
/etc/acpi/actions/wireless.sh off

/etc/init.d/dbus stop
#suspend
pm-suspend --quirk-s3-bios --quirk-dpms-on
#picks up here for resume
echo $brightness > $brn_control
#restart dbus (and thus nm), turn wireless back on
/etc/init.d/dbus start
/etc/acpi/actions/wireless.sh on


you may want to modify wireless.sh to retry turning wireless on until it is successful... i've found sometimes it quits, and it seems unnecessary for it to give up so soon. maybe i'll post those changes later... just ask if you need them.
related links:
http://fedoraproject.org/wiki/EeePc#head-6d7acf3097e76d25a5483d4ee3e918a990214053
http://www.andrewkilpatrick.org/mind/eee_pc/installation_notes.html
http://wiki.debian.org/DebianEeePC/HowTo/Install#head-384237e454261661a1a9018df19f581a810e273f

About Me

My photo
chicago, il, United States
I'm a software engineer by profession.

Labels