[Pm-utils] Cutting down on unnecessary hooks

Dan Nicholson dbn.lists at gmail.com
Wed Nov 26 14:21:36 PST 2008

On Wed, Nov 26, 2008 at 12:31 PM, Danny Kukawka <dkukawka at suse.de> wrote:
> On Mittwoch, 26. November 2008, Dan Nicholson wrote:
>> 55battery: Make HAL rescan the batteries on resume.
>> Shouldn't gnome-power-manager (or whatever HAL using policy agent) be
>> the one to tell HAL to do this? And since we're not doing anything
>> with the reply, why do we need to specify a timeout?
> At least this one is complete useless since HAL already do the rescan on it's
> own after each suspend which was called via the HAL interface (check e.g.
> hal-system-power-suspend-linux).

Do you know which HAL release this is contained in? At least then we
can put a comment in the hook and packagers can remove it if their HAL
supports that feature.

>> 65alsa: Store/restore the driver state.
>> The comment here even says that newer ALSA doesn't need this. Can we
>> bail out on newer kernels? Or drop it completely since these bugs
>> should be fixed if they exist?
> Since pm-utils isn't for a special kernel version, you shouldn't remove it
> completely.

Does anyone know what kernels/drivers handle restoring the card after
resume? Maybe we can try to detect that and bail out.

>> 94cpufreq: Sets the cpufreq governor to performance for suspending if
>> available. I don't know why this would need to be done at all. If there are
>> bugs suspending under certain governors, those bugs should be fixed. At the
>> very least, I think TEMPORARY_CPUFREQ_GOVERNOR should be unset by
>> default and the hook should bail out in that case. This should only
>> ever be a temporary workaround like SUSPEND_MODULES.
> It's maybe useful to set governor from e.g. powersave to performance to speed
> up the suspend/resume. Especially suspend2disk ...

Looking at the history, the first commit says:

commit f32e7bcb5cc2c8d78a797c417492d8b0e1269439
Author: Peter Jones <pjones at redhat.com>
Date:   Tue Jun 13 21:11:03 2006 +0000

    - add hook to make sure cpufreq is set to userspace control during hibernate
      or else we get nasty deadlock issues.  (this can be reverted/disabled when
      the kernel gets fixed)

Later, it was changed from userspace to performance:

commit 05ffa5cb342bd850abd719f02d5a6ba1ba31fe29
Author: Victor Lowther <victor.lowther at gmail.com>
Date:   Mon Jan 28 20:52:12 2008 +0000

    Use file globbing instead of trying to parse the output of ls, change
    default governor from userspace to performance because performance
    is the compiled-in default for just about everything that uses

If the real reason is that we're avoiding deadlocks, then maybe this
can be dropped altogether. Matthew, do you have any idea if this is
needed/wanted anymore?


More information about the Pm-utils mailing list