Package: eeepc-acpi-scripts Version: 1.0.4 Severity: normal Tags: patch
I've never seen my wireless key working. The led shuts off right after being lighten up. So, I investigate. Here's what I found: 1) There's only one key So, one code to handle by /etc/acpi/actions/hotkey.sh. /etc/acpi/actions/wireless.sh must be a toggle script. 2) The wifi hardware and led are enabled by hardware (like the brightness) With the "echo 1 > /proc/acpi/asus/wlan", I saw my wifi led disabled one or two seconds after having been light up. I simply remove them. My patch is attached. -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages eeepc-acpi-scripts depends on: ii acpi-support-base 0.109-5 scripts for handling base ACPI eve ii acpid 1.0.6-10 Utilities for using ACPI power man ii alsa-utils 1.0.16-2 ALSA utilities ii pm-utils 1.1.2.4-1 utilities and scripts for power ma eeepc-acpi-scripts recommends no packages. Versions of packages eeepc-acpi-scripts suggests: pn aosd-cat <none> (no description available) ii ttf-dejavu 2.25-3 Metapackage to pull in ttf-dejavu- -- no debconf information
diff -ruN eeepc-acpi-scripts-1.0.4/actions/hotkey.sh eeepc-acpi-scripts-1.0.4.new/actions/hotkey.sh --- eeepc-acpi-scripts-1.0.4/actions/hotkey.sh 2008-06-29 16:44:48.000000000 +0200 +++ eeepc-acpi-scripts-1.0.4.new/actions/hotkey.sh 2008-08-13 23:19:57.000000000 +0200 @@ -59,12 +59,8 @@ case $code in # Fn+F2 -- toggle wireless - 00000010) - /etc/acpi/actions/wireless.sh on - show_wireless - ;; 00000011) - /etc/acpi/actions/wireless.sh off + /etc/acpi/actions/wireless-toggle.sh show_wireless ;; # Fn+F7 -- mute/unmute speakers diff -ruN eeepc-acpi-scripts-1.0.4/actions/wireless.sh eeepc-acpi-scripts-1.0.4.new/actions/wireless.sh --- eeepc-acpi-scripts-1.0.4/actions/wireless.sh 2008-06-29 16:51:40.000000000 +0200 +++ eeepc-acpi-scripts-1.0.4.new/actions/wireless.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -#!/bin/sh - -wlan_control=/sys/devices/platform/eeepc/wlan -[ -e $wlan_control ] || wlan_control=/proc/acpi/asus/wlan # pre-2.6.26 - -case $1 in - on|enable) - if [ $(cat $wlan_control) = 0 ]; then - modprobe -r pciehp - modprobe pciehp pciehp_force=1 - echo 1 > $wlan_control - modprobe ath_pci - # adding a sleep here, due to some bug the driver loading is not atomic here - # and could cause ifconfig to fail - sleep 1 - if ! ifconfig ath0 up; then exec $0 off; fi - fi - ;; - off|disable) - if [ $(cat $wlan_control) = 1 ]; then - ifdown --force ath0 - modprobe -r ath_pci - echo 0 > $wlan_control - fi - ;; - *) - echo "Usage: $0 [on|off]" - exit 1 - ;; -esac diff -ruN eeepc-acpi-scripts-1.0.4/actions/wireless-toggle.sh eeepc-acpi-scripts-1.0.4.new/actions/wireless-toggle.sh --- eeepc-acpi-scripts-1.0.4/actions/wireless-toggle.sh 1970-01-01 01:00:00.000000000 +0100 +++ eeepc-acpi-scripts-1.0.4.new/actions/wireless-toggle.sh 2008-08-13 23:18:43.000000000 +0200 @@ -0,0 +1,17 @@ +#!/bin/sh + +wlan_control=/sys/devices/platform/eeepc/wlan +[ -e $wlan_control ] || wlan_control=/proc/acpi/asus/wlan # pre-2.6.26 + +if [ $(cat $wlan_control) = 1 ]; then + modprobe -r pciehp + modprobe pciehp pciehp_force=1 + modprobe ath_pci + # adding a sleep here, due to some bug the driver loading is not atomic here + # and could cause ifconfig to fail + sleep 1 + ifconfig ath0 up +else + ifdown --force ath0 + modprobe -r ath_pci +fi