-=| Neil Stewart, Tue, Jul 21, 2009 at 02:38:41PM +0100 |=-
> I tried the fix ("echo 
> 1 >/sys/bus/pci/devices/0000:01:00.0/remove"), but it
> also causes a freeze and requires a hard reboot, but only after a
> suspend-resume cycle. So I don't think it could be incorporated into
> the eeepc-acpi-scripts.

It cound't even if the solution above worked because when you press 
Fn+F2, it is the kernel that disables the device (and locks everything 
hard). eeepc-acpi-scripts oonly try to show "Wireless: On/Off" on the 
screen.

I have some sort of a work around for suspend/resume part, but it is 
hairy and involves many parts. First, dropped gnome-power-manager (may 
be not related, but I don't want to enable it again and see. Maybe 
laater). Then add the following file as /etc/pm/sleep.d (and make it 
executable)

---------------
#!/bin/sh

# Action script to enable/disable wireless interface
# the problem is that if the interface is enabled when suspending,
# the kernel locks up during resume

PATH=/sbin:/usr/sbin:/bin:/usr/bin

if [ ! -r /usr/share/eeepc-acpi-scripts/functions.sh ]; then
        exit 0
fi

OLD_STATE_FILE=/var/run/wlan-state
WLAN_CTRL=/etc/acpi/actions/wireless.sh

# pm-action(8) - <action> <suspend method>
#
# On suspend|hibernate, disable wlan
# re-enable on resume (if it was enabled during suspend).

case "${1}" in
        suspend|hibernate)
                $WLAN_CTRL detect
                if [ $? = "1" ] ; then
                        OLD_STATE=on
                else
                        OLD_STATE=off
                fi
                echo $OLD_STATE > $OLD_STATE_FILE
                if [ "$OLD_STATE" = "on" ]; then
                        $WLAN_CTRL off
                fi
                ;;
        resume|thaw)
                OLD_STATE=$( cat $OLD_STATE_FILE )
                if [ ${OLD_STATE:-off} = "on" ]; then
                        $WLAN_CTRL on
                fi
                ;;
esac
---------------

then modify wireless.sh and add the following after "detect_wlan" call 
into the off|disable|0 case:

------------------------
if [ "$WLAN_MOD" = 'rt2860sta' ]; then
    # 2.6.30  locks up unless the interface is brought down
    # (actually if it is associated)
    ifconfig $WLAN_IF down
    modprobe -r $WLAN_MOD
fi
------------------------

Then, never press the FnF2 key, just suspend as usual.


HTH

-- 
dam

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Debian-eeepc-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel

Reply via email to