[Pm-utils] Canceling resume

Enrico Zini enrico at enricozini.org
Thu Nov 19 07:12:27 PST 2009


On Thu, Nov 19, 2009 at 05:58:22AM -0800, Dan Nicholson wrote:

> > Is it possible for a resume script in pm-utils to say "Ok, I took care
> > of it, don't bother running the rest, let's go back to sleep" ?
> 
> The bulk of the resume is handed in the kernel. pm-utils just adds a
> little bit on top to pull it all together and has nothing to do with
> actually resuming the hardware. If you really need to block a resume,
> it should happen in the kernel. You could write a hook that
> immediately suspends again, but it would be a pretty nasty user
> experience.

Sorry, maybe I haven't been clear enough.

There is a need to resume and do something in user space, and I don't
see how dealing it in kernel would help: one example was to read the fix
from the GPS and write it in a file, then go back to sleep.

However, upon resume pm-utils will run the various scripts in /etc/pm in
order. The idea would be to have a hook, say, 80-openmoko, that tells
pm-utils: "forget it, we need to go back to sleep".  And at that point
pm-utils will:
 1. stop running further resume scripts
 2. start running suspend hooks starting from the one that canceled the
    resume 80-openmoko
 3. suspend again

This would allow to deal with the special resume reason without running
all scripts up the chain and then down again. This could give a
considerable gain in reaction time and power consumption.

I guess from your reply that it's not currently possible to do so.
If I tried to look into implementing such a feature, would it be
considered worth having?


Ciao,

Enrico

-- 
GPG key: 4096R/E7AD5568 2009-05-08 Enrico Zini <enrico at enricozini.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/pm-utils/attachments/20091119/19a76727/attachment.pgp 


More information about the Pm-utils mailing list