Waking up on key release

James Cameron quozl at laptop.org
Thu Sep 22 17:34:16 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?

-- 
James Cameron
http://quozl.linux.org.au/


More information about the Devel mailing list