Skip to contentSkip to conversation

how should we handle KEY_SLEEP with Hibernation?

BUG? Dmitry Torokhov 2 participants 2 messages Oct 9, 2009 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1255055906.5810.99.camel@falcon

#1 lore raw
Quoted 12 lines · Wu Zhangjin

Hello,

A user reported such a problem on YeeLoong laptop:

He tried to make his system go into hibernation, so he pressed "Fn + F1"(KEY_SLEEP), but the system is VERY busy, he got NO(very slow) response, so, he tried "Fn + F1" again and again, at last, the system hibernated, and then, he tried to resume it from hibernation, the system booted normally but after entering into the system, it responded the not-handled KEY_SLEEPs, and went into hibernation again and again until there was no KEY_SLEEP left.

Quoted 4 lines

I guess this is not a YeeLoong-specific problem, perhaps we can try to make HAL(hald-addon-input) only handle ONE KEY_SLEEP event in a fixed time range to avoid this problem, or handle it in kernel-space?

Userspace solution please. The kernel is responsible for handlig issues like mechanical jitter but the decision of ignoring certain key presses for a period of time is a policy matter and thus belongs to userspace.

Signature · 1 line
Dmitry

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw
Quoted 3 lines · Dmitry Torokhov

Userspace solution please. The kernel is responsible for handlig issues like mechanical jitter but the decision of ignoring certain key presses for a period of time is a policy matter and thus belongs to userspace.

Equally, I don't think it's down to hal to do anything here other than pass the request along. Whatever implements policy in your system (gnome-power-manager under gnome, for instance) should ensure it drops identical requests that have arrived before the previous request has completed.

Signature · 1 line
Matthew Garrett | [email protected]