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

Stefan Seyfried seife at suse.de
Mon May 1 23:16:26 PDT 2006


On Mon, May 01, 2006 at 06:51:26PM +0100, Richard Hughes wrote:
> 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
> that.

If we are going to implement this workaround, please do not only look for
/dev/pmu, but go for "uname -i" or (IMO best solution), include an option
in the super small C program, that checks if the pmu dev is actually
there (open it, do a "harmless" ioctl on it, PMU_GET_VERSION looks as it
would be suitable) and return true or false, so we can do:

    if pm-pmu-sleep check; then
	pm-pmu-sleep ram
	echo mem > /sys/power/state

or just implement this in s2ram, so calling s2ram will send the machine
to sleep, no matter what architecture ;-)
Stefan Seyfried                  \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices      \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, Nürnberg \                    -- Leonard Cohen

More information about the Pm-utils mailing list