/etc/acpi/power.sh overrides user scripts

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

Bug Description

Binary package hint: acpi-support

(ubuntu 8.04)

/etc/acpi/power.sh is called when switching between battery and AC. It then includes the scripts in /etc/acpi/battery.d and /etc/acpi/ac.d .

After this it conditionally sets the laptop_mode and then hdparm -B and -S values.

Thus power.sh overrides user scripts in /etc/acpi/battery.d and /etc/acpi/ac.d .

A solution that would be a little bit more obvious and easyly configurable might be the following:

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 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

Revision history for this message
Javier Martin (Habbit) (habbit) wrote :

+1 as the default settings of "-B1 with battery" can cause damage to some HDs as per bug #59695. Thus, making them impossible to override is dangerous. Maybe power.sh should check whether laptop-tools is set to manage HD power savings, and inhibit its own actions in that case.

Revision history for this message
ceg (ceg) wrote :

not present in 9.10 anymore

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.