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

Richard Hughes hughsient at gmail.com
Mon May 1 10:51:26 PDT 2006

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.

When we try to suspend, we should detect if we are running on pmu
systems (look for /dev/pmu) and then do execute a super small C program
that calls the ioctl, perhaps called pm-pmu-sleep or something like

Good idea?


More information about the Pm-utils mailing list