[Debian-eeepc-devel] New version of eeepc-acpi-scripts needs testing

oz oz at bluemonk.de
Sun Sep 7 16:17:02 UTC 2008


On Sun, 7 Sep 2008 14:29:00 +0300
Damyan Ivanov <dmn at debian.org> wrote:

> Meanwhile, I pushed another stream of fixes. Please test the Git 
> version on your EeePC and report any problems.

Hi,

first the good news, all these function-tests were successful:

* Closing the lid works under kpowersave+powersavd. Under
Kpowersave Settings I have an action defined "Lid close button: Suspend
to RAM"

* Without a running kpowersave+powersavd lid-close --> suspend-to-ram
works also.

* Fn+F2 Suspend-to-ram works.

*  Klicking on 'Suspend to RAM' in KPowersave works.

*  Klicking on 'Suspend to DISK' in KPowersave works.

*  s2disk works.

* camera-test with luvcview successful.

Very good!

But the hotkey Fn+F2 for wireless+LAN is buggy on my 901 now. This is
the behavior, when I use wireless.sh action from your latest
eeepc-acpi-scripts (git). I used the button three times:

BIOS WLAN disabled
After boot:
Wireless-LED off
cat /sys/devices/platform/eeepc/wlan --> 0
lspci | grep RaLink --> not found
ifconfig | grep ra0 --> not found

Fn+F2
Wireless LED on
OSD message: Wireless Off
cat /sys/devices/platform/eeepc/wlan --> 1
lspci | grep RaLink --> not found
ifconfig | grep ra0 --> not found

Fn+F2
Wireless LED off
OSD message: Wireless Off
cat /sys/devices/platform/eeepc/wlan --> 0
lspci | grep RaLink --> not found
ifconfig | grep ra0 --> not found

Fn+F2
Wireless LED on
OSD message: Wireless Off
cat /sys/devices/platform/eeepc/wlan --> 1
lspci | grep RaLink --> not found
ifconfig | grep ra0 --> not found

Please notice, that never the OSD message Wireless On appears.

With my wireless.sh script, that is attached below, the button works
this way (again switched three times):

BIOS WLAN disabled
After boot:
Wireless-LED off
cat /sys/devices/platform/eeepc/wlan --> 0
lspci | grep RaLink --> not found
ifconfig | grep ra0 --> not found

Fn+F2
Wireless LED on (with latency)
OSD message: Wireless On
cat /sys/devices/platform/eeepc/wlan --> 1
lspci | grep RaLink
01:00.0 Network controller: RaLink Device 0781
ifconfig|grep ra0
ra0       Link encap:Ethernet  HWaddr

Fn+F2
Wireless LED off
OSD message: Wireless Off
cat /sys/devices/platform/eeepc/wlan --> 0
lspci | grep RaLink --> not found
ifconfig | grep ra0 --> not found

Fn+F2
Wireless LED on (with latency)
OSD message: Wireless On
cat /sys/devices/platform/eeepc/wlan --> 1
lspci | grep RaLink
01:00.0 Network controller: RaLink Device 0781
ifconfig|grep ra0
ra0       Link encap:Ethernet  HWaddr

It seems not all of the modprobe-stuff can be removed from the script.

Another point is, that I want to start with WLAN disabled in the BIOS.
Else the ra0-interface hangs a long time while booting, trying to get
it's DHCP-session (which never succeeds, because you need to have a
WPA-connect first). Boot only continues after the timeout.

Here is my patched script wireless.sh:

#!/bin/sh

. /usr/share/eeepc-acpi-scripts/functions.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 pciehp_slot_with_bus=1
            echo 1 > $wlan_control
            detect_wlan
            if [ "$WLAN_MOD" = 'ath_pci' ]; then
                # madwifi needs some handholding
                modprobe $WLAN_MOD
                # 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 $WLAN_IF up; then exec $0 off; fi
            fi
        fi
        ;;
    off|disable)
        if [ $(cat $wlan_control) = 1 ]; then
            detect_wlan
                ifdown --force $WLAN_IF
                modprobe -r $WLAN_MOD
            echo 0 > $wlan_control
        fi
        ;;
    *)
        echo "Usage: $0 [on|off]"
        exit 1
        ;;
esac

That's your latest wireless.sh from git:

#!/bin/sh

. /usr/share/eeepc-acpi-scripts/functions.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
            echo 1 > $wlan_control
            detect_wlan
            if [ "$WLAN_MOD" = 'ath_pci' ]; then
                # madwifi needs some handholding
                modprobe $WLAN_MOD
                # 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 $WLAN_IF up; then exec $0 off; fi
            fi
        fi
        ;;
    off|disable)
        if [ $(cat $wlan_control) = 1 ]; then
            detect_wlan
            if [ "$WLAN_MOD" = 'ath_pci' ]; then
                ifdown --force $WLAN_IF
                modprobe -r $WLAN_MOD
            fi
            echo 0 > $wlan_control
        fi
        ;;
    *)
        echo "Usage: $0 [on|off]"
        exit 1
        ;;
esac

I wish, the script could be as simple, as you suggested - but it seems
not to be possible. Maybe a third owner of a 901 can test it.

Thanks,
oz



More information about the Debian-eeepc-devel mailing list