/etc/acpi/power.sh overrides user settings

Bug #244836 reported by ceg
8
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: acpi-support

When operating a laptop on AC but within a moving vehicle, disk idleing ("laptop-mode") is needed even on AC. Not nessecarily to lett the disk spin down, but to leave the heads parked long enoght periods of time for shock protection.
(https://wiki.ubuntu.com/PowerManagement)

However, configuring /etc/laptop-mode/laptop-mode.conf appropriately gets overridden

1) /etc/acpi/power.sh calls laptop_mode with start/stop.

2) Setting less aggressive settings than hdparm -B1 (fastest headparking and spin down) on battery get overridden because power.sh will set hdparm -B1 _after_ calling laptop_mode start. (That even overrides any longer $HDPARM -S $SPINDOWN_TIME in the line before that one.)

"/sbin/laptop_mode auto" will check configured conditions itself. Laptop-mode won't be activated unless ENABLE_LAPTOP_MODE=true is also set in /etc/default/acpi-support, though. (/etc/init./laptop-mode checks that and therefore two places exist in ubuntu where disk-idleing (aka laptop-mode) needs to be anabled. The other is in laptop-mode.conf)

Flexible approach:

Package acpi-support:
Remove laptop_mode start/stop calls and hdparm stuff from power.sh
Remove ENABLE_LAPTOP_MODE setting from /etc/default/acpi-support. (And point to laptop-mode.conf for LM on battery, empty battery and AC.)

Package laptop-mode-tools:
Include scripts that call "/usr/bin/laptop_mode auto" in in /etc/acpi/ac.d, battery.d, resume.d and start.d. Then its the users choice to put scripts after or before the laptop-mode symlinks.
(Adapt the approach from the original laptop-mode-tools debian package to current ubuntu acpi-support)

(The current laptop-mode disk-idleing approach seems to be a left-over from before the ubuntu-laptop-mode package was droped for laptop-mode-tools.)

Revision history for this message
ceg (ceg) wrote :

There is now an overview about the related bugs in the wiki.
https://wiki.ubuntu.com/PowerManagement#head-ab94c99627b86e9fbb29a09d3316178269c3e764

ceg (ceg)
Changed in acpi-support (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.