[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.5-9-ge6955f3

Damyan Ivanov dmn at debian.org
Fri Jan 1 16:50:57 UTC 2010


The following commit has been merged in the master branch:
commit e6955f3710e1cf872c986046d25b17e8d71b3661
Author: Damyan Ivanov <dmn at debian.org>
Date:   Fri Jan 1 18:39:19 2010 +0200

    add a hook in /etc/pm/sleep.d that switches off wlan on suspend
    
    only on models using RT2860

diff --git a/debian/changelog b/debian/changelog
index a3d3aee..07f8633 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 eeepc-acpi-scripts (1.1.6) UNRELEASED; urgency=low
 
+  [ Darren Salt ]
   * Add support for ACPI button/* and video/* events. (Closes: #562166)
     - It is possible that only these will be reported, but it is also
       possible that both these and hotkey events will be reported; and there
@@ -17,6 +18,10 @@ eeepc-acpi-scripts (1.1.6) UNRELEASED; urgency=low
   * Fix bugs which prevent touchpad toggling from working (synclient has
     lost -s at some point), and don't report anything if toggling failed.
 
+  [ Damyan Ivanov ]
+  * add a hook in /etc/pm/sleep.d that switches off wlan on suspend on models
+    using RT2860
+
  -- Darren Salt <linux at youmustbejoking.demon.co.uk>  Fri, 18 Dec 2009 16:48:05 +0000
 
 eeepc-acpi-scripts (1.1.5) unstable; urgency=high
diff --git a/etc/pm/sleep.d/eeepc-acpi-scripts b/etc/pm/sleep.d/eeepc-acpi-scripts
new file mode 100755
index 0000000..a1d1955
--- /dev/null
+++ b/etc/pm/sleep.d/eeepc-acpi-scripts
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+# Action script to disable the wireless interface of EeePC models with
+# rt2860sta during suspend and enable it back during resume.
+#
+# The problem is that if the interface is enabled when suspending,
+# the kernel locks up during resume
+#
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+# do nothing if package is removed
+[ -r /usr/share/eeepc-acpi-scripts/functions.sh ] || exit 0
+
+OLD_STATE_FILE=/var/run/eeepc-turn-wlan-on
+WLAN_CTRL=/etc/acpi/actions/wireless.sh
+
+# pm-action(8) - <action> <suspend method>
+#
+# On suspend or hibernate, disable wlan
+# re-enable on resume or thaw (if it was enabled during suspend).
+
+case "${1}" in
+    suspend|hibernate)
+        $WLAN_CTRL detect
+        if [ $? = "1" ] ; then
+            # wireless is on
+            if lspci | grep -q 'RT2860'; then
+                # it is rt2860sta; needs to be shut down
+                touch $OLD_STATE_FILE
+                $WLAN_CTRL off
+            fi
+        fi
+    ;;
+    resume|thaw)
+        if [ -e $OLD_STATE_FILE ]; then
+            rm $OLD_STATE_FILE
+            $WLAN_CTRL on
+        fi
+    ;;
+esac
+

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-commits mailing list