Bug 236905 - major pm-utils update for fine-grained chipset support
Summary: major pm-utils update for fine-grained chipset support
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: pm-utils   
(Show other bugs)
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Phil Knirsch
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 235665
TreeView+ depends on / blocked
 
Reported: 2007-04-18 11:52 UTC by Florian La Roche
Modified: 2015-03-05 01:18 UTC (History)
6 users (show)

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


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0538 normal SHIPPED_LIVE pm-utils bug fix and enhancement update 2007-10-30 16:16:54 UTC

Comment 1 RHEL Product and Program Management 2007-04-25 20:11:22 UTC
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
release.

Comment 2 Phil Knirsch 2007-05-02 15:51:43 UTC
Required update for better laptop support. Devel ACK.

Read ya, Phil

Comment 7 David Zeuthen 2007-06-25 21:08:41 UTC
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

http://people.freedesktop.org/~david/hal-spec/hal-spec.html#interface-device-systempower

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 23:10:01 UTC
See bug 236907 comment 6 for details on updated hal packages. Thanks.

Comment 9 Richard Hughes 2007-06-26 09:07:39 UTC
(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?

Richard.


Comment 10 Phil Knirsch 2007-06-26 09:17:17 UTC
So do a:

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

instead?

Comment 11 Phil Knirsch 2007-06-26 13:37:21 UTC
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 \
          int32:0

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-0.5.8.1.

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

Read ya, Phil

Comment 12 David Zeuthen 2007-06-26 15:17:48 UTC
(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 15:38:46 UTC
Thanks for the catch, David. Fixed in latest build.

Read ya, Phil

Comment 15 Cameron Meadors 2007-09-26 15:36:55 UTC
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 19:00:23 UTC
On comment 15: this probably is the issue that Florian mentiones in
https://bugzilla.redhat.com/show_bug.cgi?id=251544#c21



Comment 21 Cameron Meadors 2007-09-27 16:12:12 UTC
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 17:55:40 UTC
It's there now.

Comment 23 Cameron Meadors 2007-09-27 18:17:11 UTC
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 16:44:03 UTC
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.

http://rhn.redhat.com/errata/RHBA-2007-0538.html



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