[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 6c2491eb62b7612e66050333e54ae12d6b0fc5c8
Damyan Ivanov
dmn at debian.org
Mon Nov 10 20:06:02 UTC 2008
The following commit has been merged in the master branch:
commit 6c2491eb62b7612e66050333e54ae12d6b0fc5c8
Author: Damyan Ivanov <dmn at debian.org>
Date: Mon Nov 10 22:01:22 2008 +0200
when "soft-disabling" bluetooth, power down the USB interfacce
the right usb device is detected somewhat arbitrary by having
a "product" starting with "BT"
This silences a powertop suggestion and perhaps also saves
some power
diff --git a/etc/acpi/lib/bluetooth.sh b/etc/acpi/lib/bluetooth.sh
index c1eb790..6774906 100755
--- a/etc/acpi/lib/bluetooth.sh
+++ b/etc/acpi/lib/bluetooth.sh
@@ -31,9 +31,11 @@ toggle_bluetooth()
elif [ "$BLUETOOTH_FALLBACK_TO_HCITOOL" = "yes" ]; then
hciconfig hci0 down
rmmod hci_usb
- # TODO: enable autosuspend of the USB device
- # that is, echo "auto" > /sys/bus/usb/devices/$DEV/power/level
- # the problem is determining what the right $DEV is
+ for f in /sys/bus/usb/devices/*; do
+ if [ -e "$f/product" ] && grep -q ^BT $f/product; then
+ echo "auto" > $f/power/level
+ fi
+ done
fi
else
if [ -e $BT_CTL ]; then
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list