suspend oddities

Deepak Saxena dsaxena at laptop.org
Wed Jul 30 13:56:01 EDT 2008


On Jul 30 2008, at 14:17, pgf at laptop.org was caught saying:
> since i'm not sure which of these are known/expected/
> alreadyfixed/beingignored, here are a few things i've noticed
> with suspend.  i'll trac any that people think should, or comment
> existing trac if appropriate.
> 
> disclaimer:  some of this testing has been on my g1g1 machine,
> running 2159, XFCE (not sugar), with a USB keyboard.
> 
>     - gamepad keypresses aren't ignored during suspend.  whether or
>         not the gamepad is selected as a candidate wakeup event
>         (via /sys/power/wakeup_events/gamekey), those keys will
>         be queued for tty input while we're suspended.  test by
>         starting hexdump (or other key capture program), suspending,
>         pushing any of the 8 keys on the bezel, and then resuming.
>         note that the keys have registered.  (this is/was true in 708
>         as well.)

The gamekeys go through PS2 so I'm guessing the EC is queeing that event for
us. I can reproduce the same sort of behaviour with by switching to console 
on the XO, sleeping via /sys/power/state on serial console, and then hitting
a keyboard key to wake up. On wakeup, the character appears on the shell.  

However, I just did the following here:

echo 0 > /sys/power/wakeup_events/ps2event
echo mem > /sys/power/state
hit a key
hit power button

And I don't see the character on console, which means it did not get
queued during suspend when wakeup on keypress is disabled. 

How are you trigerring resume?

(FYI, gamekey has been renamed ps2event in latest kernels)

>     - the camera LED flashes while suspended.  suspend the laptop,
>         use the touchpad or a keyboard key.  observe camera indicator
>         blinking.  also true on 708.

The way suspend currently works is that we actually go all the way back to 
userland and OHM makes a decision on whether we actually want to wake up 
or not based on our current state and what triggered the wakeup. I'm guessing 
the flashing is the camera driver resuming the device. If you're running 
XFCE on top of our OHM, you should see the same behaviour. The wakeup_event
interface was put in place to stop this by allowing OHM to specify when
we want to actually be woken up.

>     - this got me thinking about wakeups and keypresses in general.
>        if we're configured to wake up on keypresses or gamepad
>        presses (something i've not seen work yet, btw), then the
>        keypress causing the wake should be suppressed.  don't know
>        whether that's the case or not.


>From both our tests, it does not appear to be the case ATM.  Whether 
this is intended or not, someone who's been around longer needs to answer.

~Deepak

-- 
Deepak Saxena - Kernel Developer - dsaxena at laptop.org



More information about the Devel mailing list