On Mon, 11 Feb 2008 00:41:33 -0500
Matthew William Cox <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> Stumbled across this bug tonight while trying to fix my pbook's hal
> suspend. Pursuant to Michael Biebl's Message #73, I cooked up the
> attached patch (also pasted inline for review):
> 
> >  case "$ARG" in
> >     suspend)
> > -           grep -q mem /sys/power/state || exit 1
> > +           grep -q mem /sys/power/state ||
> > +                   [ -c /dev/pmu -a -x /usr/sbin/s2ram ] || exit 1
> >             ;;
> >     hibernate)
> >             grep -q disk /sys/power/state || exit 1
> 
> This checks that /dev/pmu exists and that we can run s2ram. Now, it
> doesn't check that the PMU actually is willing to suspend the machine,
> to do that, we need to tap the PMU_IOC_CAN_SLEEP ioctl on /dev/pmu. No
> way to do THAT from a shell script, 

> but as far as I know, any machine with a PMU can suspend.

That is not true.

We could use `s2ram --test', that does the PMU_IOC_CAN_SLEEP test.

> Gnome-power-manager is willing and able to suspend my machine now. Yay!

Very good. I hope that there will be an upload for pm-utils soonish...

grts Tim

Attachment: signature.asc
Description: PGP signature

Reply via email to