Matthew William Cox wrote:
On Sat, Feb 02, 2008 at 12:49:38AM +0100, Michael Biebl wrote:
That's not quite correct. Upstream is also broken, as pm-is-supported doesn't recognize pmu support.

In the interests of getting this fixed, I dug into pm-pmu.c and added
the ability to query the PMU to detect if suspending is supported. I've
tested it by manually building pm-pmu and checking the suspend and
can-suspend functions:

if sudo ./pm-pmu --can-suspend; then sudo ./pm-pmu --suspend; fi

This successfully suspends my Powerbook G4. I've tested it against
linux-image-2.6.22-3-powerpc, and against linux-image-2.6.24-1-powerpc.

Hopefully we can integrate this into pm-utils, and get this bug resolved.
My debian-fu isn't developed enough to understand how to dig into this
package fix the rest of it, but I am interested in doing the work. I'll
have to go read up on the debian packaging utilities before I continue.
In the mean time, if somebody else can use my patch to zap this bug,
please do.

Hi Matthew,

first of all, thanks for your efforts.
The original intent of Tim Dykstra, who removed pm-pmu from the Debian pm-utils package, was, that the functionality of pm-pmu is already existent in s2ram (from the uswsusp package). Dropping pm-pmu from pm-utils also made pm-utils an architecture:all package, which means, it only contains shell scripts. This has the advantage, that pm-utils doesn't have to be compiled for all the different architectures.

I'll have to discuss with Tim, if we are going to put pm-pmu back into pm-utils or rely on s2ram solely.

There are also some issues left, which require investigation.
E.g. /usr/bin/pm-is-supported currently has a check
[ -f /sys/power/state ] || exit 1
and /sys/power/state afaik isn't (necessarily) existent on pmu machines.
Also the suspend) section has to be augmented to support pmu machines.
Either we should use pm-pmu --can-suspend there or s2ram --test (or support both: first try s2ram and fall back to pm-pmu)

We probably also have to remove the
[ -f /sys/power/state ] || exit 1
check in /usr/lib/pm-utils/bin/pm-action

And finally, if we put back pm-pmu, do_suspend() in /usr/lib/pm-utils/functions should also be updated to properly support pmu machines.

cheers,
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to