Bug 236905 - major pm-utils update for fine-grained chipset support
major pm-utils update for fine-grained chipset support
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: pm-utils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Knirsch
Depends On:
Blocks: 235665
  Show dependency treegraph
Reported: 2007-04-18 07:52 EDT by Florian La Roche
Modified: 2015-03-04 20:18 EST (History)
6 users (show)

See Also:
Fixed In Version: RHBA-2007-0538
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-07 11:44:03 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 1 RHEL Product and Program Management 2007-04-25 16:11:22 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 2 Phil Knirsch 2007-05-02 11:51:43 EDT
Required update for better laptop support. Devel ACK.

Read ya, Phil
Comment 7 David Zeuthen 2007-06-25 17:08:41 EDT
More comments. The patch pm-utils-0.99.3-hal.patch is wrong:

+       if [ "$FROMHAL" == "true" ]; then
+               pm-pmu --suspend || echo -n "mem" > /sys/power/state
+       else
+               dbus-send  --session \
+                       --dest=org.freedesktop.PowerManagement \
+                       --type=method_call \
+                       --print-reply /org/freedesktop/PowerManagement \
+                       org.freedesktop.PowerManagement.Suspend

I think you've got the layers pretty badly mixed up here; there's no way at all
you can assume there's a session bus running let alone access it. One way around
this is to just use dbus-send to invoke Suspend() on HAL, see


which will then invoke pm-suspend _again_ but this time with the right quirks
(if any).

pm-utils-0.99.3-autoquirk.patch: this is confusing; the whole point was that if
pm-suspend + friends _wasn't_ invoked from HAL we'd get the quirks from there
(if any). But this patch seems to suggest we're sometimes getting the quirks
from the old heuristic.

So in conclusion: pm-utils-0.99.3-hal.patch needs to be fixed to call a
well-known service and pm-utils-0.99.3-autoquirk.patch just needs to go I think.

Hope this helps.

Will upload a new EL5 SRPM for hal later today that passes the right quirks and
also invokes pm-suspend/pm-hibernate with the --from-hal option.
Comment 8 David Zeuthen 2007-06-25 19:10:01 EDT
See bug 236907 comment 6 for details on updated hal packages. Thanks.
Comment 9 Richard Hughes 2007-06-26 05:07:39 EDT
(In reply to comment #7)
> ...there's no way at all you can assume there's a session bus running let 
> alone access it.

Totally agree. You can go session->system but not system->session.

> One way around
> this is to just use dbus-send to invoke Suspend() on HAL, see

I thought this was the plan all along.

> which will then invoke pm-suspend _again_ but this time with the right quirks
> (if any).

Good plan.

> also invokes pm-suspend/pm-hibernate with the --from-hal option.

Is this going upstream?

Comment 10 Phil Knirsch 2007-06-26 05:17:17 EDT
So do a:

dbus-send --system \
          --dest=org.freedesktop.Hal.Device.SystemPowerManagement \
          --type=method_call \
          --print-reply /org/freedesktop/Hal/Device/SystemPowerManagement \

Comment 11 Phil Knirsch 2007-06-26 09:37:21 EDT
Talked with Richard, the final dbus-send call looks like this now:

dbus-send --system --print-reply \
          --dest=org.freedesktop.Hal \
          --type=method_call \
          /org/freedesktop/Hal/devices/computer \
          org.freedesktop.Hal.Device.SystemPowerManagement.Suspend \

We also discussed the autoquirk patch. The old autoquirks are disabled by
default and need to be manually activated with the --quirk-old quirk to be
inline with the other quirks (in case a customer has problems with the new HAL
Info based quirks and the old ones worked).

I've also fixed the Requires to >= hal-

Package is building atm and will be in the errata soon.

Read ya, Phil
Comment 12 David Zeuthen 2007-06-26 11:17:48 EDT
(In reply to comment #11)
> dbus-send --system --print-reply \
>           --dest=org.freedesktop.Hal \
>           --type=method_call \
>           /org/freedesktop/Hal/devices/computer \
>           org.freedesktop.Hal.Device.SystemPowerManagement.Suspend \
>           int32:0

IIRC pm-utils holds a lock here and there; make sure to give that lock up (since
HAL will invoke pm-utils; ie. there's some reentrancy issues here). Thanks.
Comment 13 Phil Knirsch 2007-06-26 11:38:46 EDT
Thanks for the catch, David. Fixed in latest build.

Read ya, Phil
Comment 15 Cameron Meadors 2007-09-26 11:36:55 EDT
From my testing on errata 2007:0632, I have found a problems with this fix.  Hal
does not get called from pm-utils when run from the command line when you do not
specify any quirks.
Comment 18 Daniel Riek 2007-09-26 15:00:23 EDT
On comment 15: this probably is the issue that Florian mentiones in

Comment 21 Cameron Meadors 2007-09-27 12:12:12 EDT
I cannot find pm-utils-0.99.3-6.el5.16.  Brew indicates that it did not build. 
Can you provide me with a link to the package?
Comment 22 Dennis Gregorovic 2007-09-27 13:55:40 EDT
It's there now.
Comment 23 Cameron Meadors 2007-09-27 14:17:11 EDT
Looks good to me.  I looked over to the code and tested on a t60.  I get the
same results with pm-suspend as using g-p-m to suspend.  Quirks look the same
both ways.
Comment 27 errata-xmlrpc 2007-11-07 11:44:03 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.