[Pm-utils] Quirk for running hdparm after resume from suspend and hibernate
Victor Lowther
victor.lowther at gmail.com
Thu Jan 29 16:19:00 PST 2009
On Thu, 2009-01-29 at 07:36 -0800, Pedro R wrote:
> Sorry for coming into the discussion like this, but i joined this mailing list because of exactly the same problem.
>
> This hdparm issue is distro specific, i'm sure hdparm upstream will not want to handle it, because honestly they don't have to. Fixing it in pm-utils is pernicious, because this issue only affects laptops, but i still think it's the best way.
Sorry, but this is the sort of hook that I want to have migrated out of
pm-utils. We provide a pkg-config hook to make it easy for other
packages to integrate with pm-utils precisely to make it easy for the
distro maintainers and other projects to use pm-utils.
> This is a major issue going on since 2005 and nobody seems to want to get their hands dirty fixing it. It would be great to include this in pm-utils, since the collateral overhead for desktop computers is not that big either.
I agree, and the best way to do that is to is to get it integrated into
the hdparm package, either at the distro level or by the hdparm folks
themselves.
> Anyway the hook should be executed on resume (but not on hibernate / standby) and on power change: battery -> ac adaptor and ac adaptor -> battery, because when on battery the setting should be -B 128 (because of physical shocks - for an explanation refer to the load_cycle_count issue on google) and on ac power it should be -B 254. To do this, the hook should not rely on other than the kernel itself. Like this:
>
> if cat /proc/acpi/ac_adapter/ACAD/state | grep 'off-line' ; then
> hdparm -B 128 $dev
> else
> hdparm -B 254 $dev
Dan has already brought this back up, but you are conflating power
management with suspend/resume handling. This code belongs in a
pm-powersave hook, not in pm-suspend. If you take a look at the
powersave-hooks branch, on http://git.freedesktop.org/pm-utils/, you ca
nsee what I am talking about.
> If Pacho Ramos won't mind sending me his hook, i can complete it this way.
>
> Pedro Ribeiro
>
>
--
Victor Lowther
RHCE# 805008539634727
LPIC-2# LPI000140019
More information about the Pm-utils
mailing list