FS#20699 - [pm-utils] set wrong hdparm -B values when on battery
Attached to Project:
Arch Linux
Opened by Jirka Daněk (juraad) - Wednesday, 01 September 2010, 12:29 GMT
Last edited by Jan de Groot (JGC) - Thursday, 20 January 2011, 20:52 GMT
Opened by Jirka Daněk (juraad) - Wednesday, 01 September 2010, 12:29 GMT
Last edited by Jan de Groot (JGC) - Thursday, 20 January 2011, 20:52 GMT
|
Details
Description: Disc keep spinning up and down when running on
battery due to (IMHO) a typo in one of the pm-utils
files.
Package versions: * pm-utils 1.4.0-1 Config and/or log files etc. * /usr/lib/pm-utils/power.d/harddrive The harddrive hook contains these values: # Default values on AC DRIVE_SPINDOWN_VALUE_AC="${DRIVE_SPINDOWN_VALUE_AC:-0}" DRIVE_WRITE_CACHE_AC="${DRIVE_WRITE_CACHE_AC:-1}" DRIVE_POWER_MGMT_AC="${DRIVE_POWER_MGMT_AC:-254}" DRIVE_ACOUSTIC_MGMT_AC="${DRIVE_ACOUSTIC_MGMT_AC:-0}" # Default values on battery DRIVE_SPINDOWN_VALUE_BAT="${DRIVE_SPINDOWN_VALUE_BAT:-6}" DRIVE_WRITE_CACHE_BAT="${DRIVE_WRITE_CACHE_BAT:-0}" DRIVE_POWER_MGMT_BAT="${DRIVE_POWER_MGMT_BAT:-1}" DRIVE_ACOUSTIC_MGMT_BAT="${DRIVE_ACOUSTIC_MGMT_BAT:-254}" Setting DRIVE_POWER_MGMT_BAT to 1 results in calling hdparam with -H 1. The disk then keeps spinning up and down. That has negative inpact on HDD lifetime and also can produce clicking noise in case of some laptops. Because of it im setting the bug severity to High. Fix: First of all, I think the DRIVE_POWER_MGMT_BAT=1 is a typo, because in subsequent comments in that file the default values are said to be 254 for AC (agrees, that is so) and 128 for BAT (that doesn´t). But value 128 is inconsistent with DRIVE_SPINDOWN_VALUE_BAT=6. That translates into hdparm -S 6 and according to hdparm manpage, spindown is enabled only for -H values between 1 and 127. In conclusion: I propose either changing the value to 127, or maybe better, by default disable the power-management features in pm-utils and let users to decide wether they want them or not. Workaround: Disable the config file by creating an empty file in your /etc mkdir -p /etc/pm/power.d/ touch /etc/pm/power.d/harddisk Confirmations in forum: * https://bbs.archlinux.org/viewtopic.php?pid=812670 * https://bbs.archlinux.org/viewtopic.php?id=99958 |
This task depends upon
Closed by Jan de Groot (JGC)
Thursday, 20 January 2011, 20:52 GMT
Reason for closing: Fixed
Additional comments about closing: the hook has been removed.
Thursday, 20 January 2011, 20:52 GMT
Reason for closing: Fixed
Additional comments about closing: the hook has been removed.
I am sorry for messing this up
Anyway this should be reported to upstream.
Also, these powersaving features of pm-utils interfiere with those of laptop-mode. For example in case of hdparm -B the pm-utils settings override the values set in laptop-mode. That can make powersaving very difficult to set-up on Arch.
This is a major bug, it's been known for years now that such aggressive powersaving will kill laptop hard drives very quickly. I'd rather have my battery run down a little faster than have my hard drive blow out in six months :)
DRIVE_POWER-MGMT_BAT=254