diff -Nru /tmp/9JPBAmZ15G/acpi-support-0.91build1/debian/changelog /tmp/nUoJPp9qxm/acpi-support-0.94/debian/changelog --- /tmp/9JPBAmZ15G/acpi-support-0.91build1/debian/changelog 2007-03-05 01:12:40.000000000 +0000 +++ /tmp/nUoJPp9qxm/acpi-support-0.94/debian/changelog 2007-03-22 05:01:19.000000000 +0000 @@ -1,3 +1,43 @@ +acpi-support (0.94) feisty; urgency=low + + * Save and restore values that the kernel does not preserve across + suspend/resume and hibernate/resume: + - /sys/class/net/eth*/device/rf_kill + (Closes: LP #37010) + - /proc/acpi/ibm/bluetooth + (Closes: LP #37175) + - /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor + (Closes: LP #68191) + * White list Lenovo ThinkPad Z60m as working suspend. + (Closes: LP #57144) + + -- Paul Sladen Thu, 22 Mar 2007 03:57:36 +0000 + +acpi-support (0.93) feisty; urgency=low + + * Change 'wireless.sh' to use 'device/rf_kill' for wireless devices (if + available) in preference to 'device/power/state' which was been + removed by the upstream kernel developers. + (Closes: LP #42820) + * Teach 'lib/state-funcs:isAnyWirelessPoweredOn()' to also check + 'device/rf_kill' if it's available. + (Closes: LP #42820) + * Change 'ibm-wireless.sh' to rotate wireless and bluetooth states + through the sequence: both, bluetooth only, wireless only, neither. + (Closes: LP #24680) + * Correct inverted logic in 'isAnyWirelessPoweredOn()'. + (Closes: LP #66083) + * Change script shebangs to use '/bin/sh' instead of '/bin/bash'. + + -- Paul Sladen Wed, 21 Mar 2007 04:55:27 +0000 + +acpi-support (0.92) feisty; urgency=low + + * Add 'events/sony-eject' for Sony Vaio TX3. + (Closes: LP #55388) + + -- Paul Sladen Sun, 18 Mar 2007 23:09:38 +0000 + acpi-support (0.91build1) feisty; urgency=low * Rebuild for changes in the amd64 toolchain. diff -Nru /tmp/9JPBAmZ15G/acpi-support-0.91build1/events/sony-eject /tmp/nUoJPp9qxm/acpi-support-0.94/events/sony-eject --- /tmp/9JPBAmZ15G/acpi-support-0.91build1/events/sony-eject 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/nUoJPp9qxm/acpi-support-0.94/events/sony-eject 2007-03-18 22:56:14.000000000 +0000 @@ -0,0 +1,4 @@ +# Eject button on Sony Vaio TX3 + +event=sony/hotkey SPIC 00000001 0000001b +action=/etc/acpi/ejectbtn.sh diff -Nru /tmp/9JPBAmZ15G/acpi-support-0.91build1/ibm-wireless.sh /tmp/nUoJPp9qxm/acpi-support-0.94/ibm-wireless.sh --- /tmp/9JPBAmZ15G/acpi-support-0.91build1/ibm-wireless.sh 2005-10-01 18:00:40.000000000 +0100 +++ /tmp/nUoJPp9qxm/acpi-support-0.94/ibm-wireless.sh 2007-03-21 04:22:17.000000000 +0000 @@ -1,14 +1,24 @@ -#!/bin/bash +#!/bin/sh # Find and enable/disable wireless devices -state=`. /etc/acpi/wireless.sh` +BLUETOOTH=/proc/acpi/ibm/bluetooth -if [ "$state" = "0" ]; then - if [ -f /proc/acpi/ibm/bluetooth ]; then - echo disable >/proc/acpi/ibm/bluetooth; - fi -else - if [ -f /proc/acpi/ibm/bluetooth ]; then - echo enable >/proc/acpi/ibm/bluetooth; +# Note that this alters the state of the wireless! +wireless_state=`. /etc/acpi/wireless.sh` + +if [ -r $BLUETOOTH ]; then + grep -q disabled $BLUETOOTH + bluetooth_state=$? +fi + +# Sequence is Both on, Bluetooth only, Wireless only, Both off +if [ "$wireless_state" = 0 ]; then + # Wireless was turned off + if [ -w /proc/acpi/ibm/bluetooth ]; then + if [ "$bluetooth_state" = 0 ]; then + echo enable > $BLUETOOTH; + else + echo disable > $BLUETOOTH + fi fi fi diff -Nru /tmp/9JPBAmZ15G/acpi-support-0.91build1/lib/IBM.config /tmp/nUoJPp9qxm/acpi-support-0.94/lib/IBM.config --- /tmp/9JPBAmZ15G/acpi-support-0.91build1/lib/IBM.config 2006-05-22 19:05:01.000000000 +0100 +++ /tmp/nUoJPp9qxm/acpi-support-0.94/lib/IBM.config 2007-03-22 03:00:56.000000000 +0000 @@ -66,6 +66,10 @@ 1866*|1867*|1869*) ACPI_SLEEP=true; ;; + # Z60m (Intel graphics) 'ThinkPad Z60m' + 2529*) + ACPI_SLEEP=true; + ;; # ThinkPad R40 with a product name of "_______" (yes, 7 blank spaces) "") case "$bios_version" in diff -Nru /tmp/9JPBAmZ15G/acpi-support-0.91build1/lib/state-funcs /tmp/nUoJPp9qxm/acpi-support-0.94/lib/state-funcs --- /tmp/9JPBAmZ15G/acpi-support-0.91build1/lib/state-funcs 2006-03-29 13:54:31.000000000 +0100 +++ /tmp/nUoJPp9qxm/acpi-support-0.94/lib/state-funcs 2007-03-21 04:43:08.000000000 +0000 @@ -6,12 +6,23 @@ { for DEVICE in /sys/class/net/* ; do if [ -d $DEVICE/wireless -a -r $DEVICE/device/power/state ] ; then - # If any of the wireless devices are turned off then return failure - test "`cat $DEVICE/device/power/state`" -eq 0 || return + # If any of the wireless devices are turned on then return success + if [ "`cat $DEVICE/device/power/state`" -eq 0 ] ; then + echo HERE + # Check if 'rf_kill' disagrees + if [ -r $DEVICE/device/rf_kill ] ; then + if [ "`cat $DEVICE/device/rf_kill`" -eq 0 ] ; then + # And rf_kill has the radio on + return 0 + fi + else + return 0 + fi + fi fi done - # otherwise return success - return 0 + # otherwise return failure + return 1 } setLEDThinkpadSuspending() diff -Nru /tmp/9JPBAmZ15G/acpi-support-0.91build1/resume.d/58-proc-sysfs-restore-state.sh /tmp/nUoJPp9qxm/acpi-support-0.94/resume.d/58-proc-sysfs-restore-state.sh --- /tmp/9JPBAmZ15G/acpi-support-0.91build1/resume.d/58-proc-sysfs-restore-state.sh 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/nUoJPp9qxm/acpi-support-0.94/resume.d/58-proc-sysfs-restore-state.sh 2007-03-22 03:56:22.000000000 +0000 @@ -0,0 +1,12 @@ +#!/bin/sh +# Paul Sladen 2007-03-22 +# Restore saved /sys and /proc states following resume. +# See suspend.d/??-proc-sysfs-restore-state.sh for details. + +if [ -r /var/run/proc-sysfs-save-state ] ; then + while read WHERE foo WHAT ; do + if [ "x$foo" = "x=" -a -w "$WHERE" ] ; then + echo -n "$WHAT" > "$WHERE" + fi + done < /var/run/proc-sysfs-save-state +fi diff -Nru /tmp/9JPBAmZ15G/acpi-support-0.91build1/suspend.d/30-proc-sysfs-save-state.sh /tmp/nUoJPp9qxm/acpi-support-0.94/suspend.d/30-proc-sysfs-save-state.sh --- /tmp/9JPBAmZ15G/acpi-support-0.91build1/suspend.d/30-proc-sysfs-save-state.sh 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/nUoJPp9qxm/acpi-support-0.94/suspend.d/30-proc-sysfs-save-state.sh 2007-03-22 03:50:07.000000000 +0000 @@ -0,0 +1,24 @@ +#!/bin/sh +# Paul Sladen 2007-03-22 +# Save the state of various things that the kernel does not, or cannot +# maintain over the course of a suspend/resume or suspend/hibernate +# cycle. Lines are written into '/var/run/proc-sysfs-save-state' in +# the format: +# /sys/foo/bar/moo = XYZ + +if [ -d /var/run -a -w /var/run ] ; then + ( + for i in /sys/class/net/eth*/device/rf_kill /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ; do + if [ -r "$i" ] ; then + echo -n "$i = " ; cat "$i" + fi + done + + i=/proc/acpi/ibm/bluetooth + if [ -r $i ] ; then + echo -n "$i = " + grep -q disabled /proc/acpi/ibm/bluetooth && echo disable || echo enable + fi + ) > /var/run/proc-sysfs-save-state +fi + diff -Nru /tmp/9JPBAmZ15G/acpi-support-0.91build1/wireless.sh /tmp/nUoJPp9qxm/acpi-support-0.94/wireless.sh --- /tmp/9JPBAmZ15G/acpi-support-0.91build1/wireless.sh 2006-02-16 00:27:06.000000000 +0000 +++ /tmp/nUoJPp9qxm/acpi-support-0.94/wireless.sh 2007-03-21 03:57:02.000000000 +0000 @@ -1,17 +1,31 @@ -#!/bin/bash +#!/bin/sh # Find and enable/disable wireless devices -for DEVICE in /sys/class/net/*; do - if [ -d $DEVICE/wireless ]; then -# $DEVICE is a wireless device. Check if it's powered on: - if [ `cat $DEVICE/device/power/state` = 0 ]; then -# It's powered on. Switch it off. - echo -n 2 > $DEVICE/device/power/state; - echo 0 - else -# It's powered off. Switch it on. - echo -n 0 > $DEVICE/device/power/state; - echo 1 - fi +ON=0 +OFF=1 # 1 for rf_kill, 2 for power/state + +for DEVICE in /sys/class/net/* ; do + if [ -d $DEVICE/wireless ] ; then + # $DEVICE is a wireless device. Check if it's powered on: + for CONTROL in $DEVICE/device/rf_kill $DEVICE/device/power/state ; do + if [ -w $CONTROL ] ; then + # We have a way of controlling the device, lets try + if [ `cat $CONTROL` = 0 ] ; then + # It's powered on. Switch it off. + if echo -n $OFF > $CONTROL ; then + echo 0 + break + else + OFF=2 # for power/state, second time around + fi + else + # It's powered off. Switch it on. + if echo -n $ON > $CONTROL ; then + echo 1 + break + fi + fi + fi + done fi done