Waking up on key release
pgf at laptop.org
Thu Sep 22 18:21:18 EDT 2011
> On Thu, Sep 22, 2011 at 06:00:54PM +0100, Daniel Drake wrote:
> > ... because the system might suspend before the 'enter released'
> > condition is raised, meaning that it would suspend and immediately
> > resume due to being woken up by the key release event. The following
> > would avoid that:
> > sleep 1; echo mem > /sys/power/state
> But not if the enter key is held down for over a second.
> Might this be implemented as a script "olpc-sleep" to complement our
> existing "olpc-nosleep", and rather than sleeping for one second wait
> for all keys to be released?
i'm not quite sure how the script would work, unless you mean, "a script
which talks to powerd, which does the dirty work". but then, that's
not really the same as "echo mem > /sys/power/state".
i guess it depends on who you think will be using this command.
paul fox, pgf at laptop.org
More information about the Devel