spindown settings lost on pm-suspend indirectly affects powernap power savings
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hdparm (Ubuntu) |
Fix Released
|
Undecided
|
Martin Pitt | ||
pm-utils (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: hdparm
Upon wakeup from pm-suspend, all spindown settings on drives as set in hdparm.conf are lost and drives will not spindown until reboot.
This will affect the performance of such useful packages such as powernap, since drives will not enter spindown after the first time a system is suspended and then resumed. Power will be wasted, watts that could be saved will be lost!!!
Upon investigation I found that a similar problem has been found and fixed for APM settings by use of the script /usr/lib/
Since laptop-mode-tools is not a suitable package for a server environment, it is important the hdparm provide a similar script for spindown. Indeed, hdparms has already set the precedent that it should provide such backstop functionality as part of the package to support pm-utils functionality for critical drive parameters.
I have prepared a patch file that is more or less a clone of the script used for the APM functionality, but which restores the '-S' spindown hdparm parameters. I suggest that it be placed in /usr/lib/
As a side note, I also have a patch I am submitting to powernap to extend functionality to add a monitor plugin that will key off drive standby/sleep state. The patch will only work, however, if the drives spindown more than once per boot...
Related branches
tags: | added: patch |
Changed in pm-utils (Ubuntu): | |
status: | New → Invalid |
(This should be fixed in hdparm, closing pm-utils task).
Thanks heckneck for this report!
So essentially your script changes two things:
* It runs at suspend/resume time instead of when changing AC <-> Battery (by being placed into suspend.d instead of power.d) pm-utils/ power.d/ 95hdparm- apm even supports being called as suspend.d already. I'm happy to add a symlink to suspend.d/ to this.
I agree that this should be fixed, and the existing /usr/lib/
* It adds handling of the -S option from /etc/hdparm.conf. We don't specify one by default, so adding support for this sounds safe, as it won't change default behaviour.
However, don't think we should handle -S only for the power.d script and -B only for suspend, but both in both modes.