Comment 3 for bug 238555

Revision history for this message
Steve Langasek (vorlon) wrote :

Here is a patch to add a new option to hdparm.conf, apm_battery, that will enable us to eliminate the hard-coded apm values in pm-utils. Rationale:

- as long as laptop-mode is not enabled by default in Ubuntu, hdparm.conf is the only place that we can sensibly configure the apm battery values and eliminate the hard-coding, and that requires a new config option.
- hdparm is the only package that has a udev rule setting the values on newly-attached hard drives - if we want settings applied consistently to devices that are connected after boot, it has to be done here.

Since this is new feature development in pursuit of a bugfix, I'm proposing this as a feature freeze exception for karmic.

Benefits:
 - user configuration of disk apm levels will be respected by pm-utils on suspend/resume and on power events

Risks:
 - Debian rejects this additional syntax or we decide it's the wrong place to do this (because we decide to use laptop-mode by default?) and we have to revert this post-karmic, resulting in user confusion
 - I've overlooked some way that this takes effect by default at boot time where it didn't before, impacting our boot performance
(risk is minimal; before and after this change, the udev rule shouldn't call hdparm unless there are uncommented options in /etc/hdparm.conf)

I've tested the correctness of this change with and without an hdparm.conf file that includes these settings, confirming that I get the expected apm settings on boot and resume.

If this FFe is accepted, a corresponding patch to pm-utils will be forthcoming.