acpi-support, laptop-mode-tools, and hdparm: when will the madness end?

Forest Bond forest at alittletooquiet.net
Sat Jun 28 18:21:44 UTC 2008


Hi,

Nearly everyone has probably heard of the "Ubuntu destroyed my hard drive"
controversy, which made headlines all over the Internet with stories such as
these:

http://www.google.com/search?hl=en&q=ubuntu+load_cycle_count&btnG=Search

In the end, it was proclaimed that the problem is not Ubuntu's fault, since the
only software mechanism that sets overly aggressive APM settings for hard drives
is laptop-mode, which is disabled by default.  See #59695.

Okay, I'm open to this argument.  But I don't think that it means that simply
enabling laptop-mode should indicate that the user has given permission to the
OS to trash his hard drive.

Users that do enable laptop mode reasonably expect that the relevant settings
they choose and specify in /etc/laptop-mode/laptop-mode.conf will be respected.
Yet, unless I'm missing something, /etc/acpi/power.sh just plain clobbers them.

Not only does it clobber them, though, it overrides on-battery HDD APM settings
(hdparm -B, hdparm -S) with some pretty aggressive settings that can, in fact,
lead to people's hard drives dying early.  Users that think they are setting
their HDD APM settings on the safe side (in /etc/laptop-mode/laptop-mode.conf)
have no idea that their drives are being worked pretty hard.  See #37187.

A less important but equally relevant issue is the fact that laptop-mode.conf
pretends that you can control when laptop-mode is entered/exited, but, in fact,
power.sh explicitly overrides these settings, too.  See #74394.

So here are my questions:

Why does /etc/acpi/power.sh run hdparm?  It only does so when laptop mode is
enabled, and laptop mode does this itself.  Not only that, when going on
battery, laptop-mode's native handling is overridden, but when going on AC,
power.sh wins.

Moreover, why do we have so many different ways to control handling of
power-related events?  As a user, it is pretty difficult to get in there and
figure out why your settings are being blown away.  Here is a list of power
script directories on my system:

/etc/acpi
/etc/pm
/usr/lib/pm-utils
/etc/power
/etc/laptop-mode
/etc/apm

Maybe things really need to be this complicated.  If that's the case, is there
any way we can make it more obvious to users what they should be doing?

In my opinion, power handling is one of the biggest problems on Ubuntu.  While a
good portion of that is related to difficult hardware, the fact that the
power-handling software pieces are so disjointed is also a major contributor.
What can we do to sort this out?

Thanks,
Forest
-- 
Forest Bond
http://www.alittletooquiet.net
http://www.pytagsfs.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20080628/26823c82/attachment.sig>


More information about the Ubuntu-devel-discuss mailing list