[Debian-eeepc-devel] suggestions for eeepc-acpi-scripts

Glenn Saberton gsaberton at foomagic.org
Mon Jun 9 17:49:07 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

jcsid wrote:
> 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? 
>
>
> _______________________________________________
> Debian-eeepc-devel mailing list
> Debian-eeepc-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel
create a file in /etc/modprobe.d for the module? this should ensure it
called with those parameters everytime its loaded.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkhNbRMACgkQV8GyuTwyskNeOQCdGBqQt/IQ3Br+hUhr/2sL6LOJ
vEQAn0u1QaUcQeOZyw7qzESsTgQV728C
=zFWq
-----END PGP SIGNATURE-----




More information about the Debian-eeepc-devel mailing list