power.sh should allow laptop_mode to do it's thing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
acpi-support (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: acpi-support
In 6.06.1 LTS, /etc/acpi/power.sh explicitly calls
laptop_mode start
and
laptop_mode stop
This means that the preferences specified in /etc/laptop-
Instead, power.sh should simply call
laptop_mode auto
in both cases. That way the user's preferences as to when laptop mode will be used will be honoured.
The specific bug that was hitting me was that laptop mode was being disabled when AC power was reconnected, despite having set ENABLE_
Also, power.sh is explicitly changing the hard drive spindown and power management behaviour by calling hdparm (with fixed, uncofigurable values). It should leave this to laptop_mode, which already has completely configurable functionality to do this.
Patch against 6.06.1 LTS:
--- power.sh.orig 2006-12-04 14:54:44.000000000 +0000
+++ power.sh 2006-12-04 15:33:17.000000000 +0000
@@ -3,36 +3,6 @@
. /etc/default/
. /usr/share/
-function laptop_mode_enable {
- $LAPTOP_MODE start
-
- for x in /sys/bus/
- drive=$(basename $(readlink $x));
- $HDPARM -S 12 /dev/$drive 2>/dev/null
- $HDPARM -B 1 /dev/$drive 2>/dev/null
- done
-
- for x in /sys/bus/
- drive=$(basename $(readlink $x));
- $HDPARM -S 12 /dev/$drive 2>/dev/null
- $HDPARM -B 1 /dev/$drive 2>/dev/null
- done
-}
-
-function laptop_mode_disable {
- for x in /sys/bus/
- drive=$(basename $(readlink $x));
- $HDPARM -S 0 /dev/$drive 2>/dev/null
- $HDPARM -B 255 /dev/$drive 2>/dev/null
- done
- for x in /sys/bus/
- drive=$(basename $(readlink $x));
- $HDPARM -S 0 /dev/$drive 2>/dev/null
- $HDPARM -B 255 /dev/$drive 2>/dev/null
- done
- $LAPTOP_MODE stop
-}
-
getState;
checkStateChanged;
@@ -46,15 +16,12 @@
for SCRIPT in /etc/acpi/
. $SCRIPT
done
- if [ x$ENABLE_
- (sleep 5 && laptop_
- fi
else
for SCRIPT in /etc/acpi/
. $SCRIPT
done
- if [ x$ENABLE_
- (sleep 5 && laptop_
- fi
fi
-done
\ No newline at end of file
+ if [ x$ENABLE_
+ (sleep 5 && $LAPTOP_MODE auto)&
+ fi
+done
Both of these issues still exist in Feisty. Is there anything blocking the supplied path being applied?