[Debian-eeepc-devel] suggestions for eeepc-acpi-scripts
jcsid
jc.sid at free.fr
Mon Jun 9 17:36:26 UTC 2008
Ok, I have now this:
/etc/acpi/actions/wireless.sh
#!/bin/sh
wlan_control=/proc/acpi/asus/wlan
case $1 in
on)
echo 1 > $wlan_control
ifup ath0
;;
off)
ifdown ath0
echo 0 > $wlan_control
rmmod ath_pci
rmmod ath_rate_sample
rmmod ath_hal
rmmod wlan_scan_sta
rmmod wlan
;;
*)
echo "Usage: $0 [on|off]"
exit 1
;;
esac
# ifdown an ifup ARE important
/etc/acpi/actions/suspend.sh
#!/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)
wireless=$(cat /proc/acpi/asus/wlan)
/etc/acpi/actions/wireless.sh off
rmmod pciehp
pm-suspend --quirk-s3-bios
modprobe pciehp pciehp_force=1
sleep 1
echo $brightness > $brn_control
case $wireless in 1)
/etc/acpi/actions/wireless.sh on ;;
esac
In /etc/acpi/actions/hotkey.sh
show_wireless() {
if grep -q 1 /proc/acpi/asus/wlan; then
status=On
else
status=Off
fi
notify Wireless $status
}
And finally in /etc/modules:
modprobe pciehp pciehp_force=1
It seems to work...
The better way should be to tell 'pm_suspend' not to rmmod pciehp or to
reload it with force=1, but I don't know how
Indeed, it would be great to have pciehp always (re)loaded with force=1,
whatever happens (suspend, hibernate, ...), but how?
More information about the Debian-eeepc-devel
mailing list