[Pm-utils] pm-utils and pmu hardware.

Richard Hughes hughsient at gmail.com
Mon May 1 11:50:08 PDT 2006


On Mon, 2006-05-01 at 14:18 -0400, Peter Jones wrote:
> On Mon, 2006-05-01 at 18:51 +0100, Richard Hughes wrote:
> > On pmu, the best way to sleep is do:
> > 
> > where fd is /dev/pmu.
> > 
> > ioctl (fd, PMU_IOC_SLEEP, 0);
> > 
> > This is what we do in "hal-system-power-pmu sleep" and seems to work
> > well on PMU systems.
> > echo mem > /sys/power/state seems to only work on some ppc machines, on
> > newest kernels and if the wind is blowing in the right direction...
> > It's mainly because all the PPC stuff hasn't been hooked up to
> > the /sys/power/state mechanism properly, and has been broken for ages.
> > 
> > The hal suspend script should call pm-utils for all arch's (rather than
> > just i386) and so we need to handle this in pm-utils.
> 
> This looks to me like a kernel bug.  Why isn't "echo mem
> > /sys/power/state" doing the same thing as the ioctl handler on ppc?
> Somebody should fix that instead of special casing the userland.

It's been broken for as long as I've known ppc, although I probably
agree with you that it should be fixed.

I do think we have to work around this in the short term as otherwise
suspend breaks hard for ppc.

BenH *was* doing this, but I don't know why it wasn't finished.
Matthew?

Richard.




More information about the Pm-utils mailing list