[BUG?] how should we handle KEY_SLEEP with Hibernation?

View: New views
3 Messages — Rating Filter:   Alert me  

[BUG?] how should we handle KEY_SLEEP with Hibernation?

by Wu Zhangjin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

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?

what about your ideas?

Regards,
        Wu Zhangjin

_______________________________________________
hal mailing list
hal@...
http://lists.freedesktop.org/mailman/listinfo/hal

Re: [BUG?] how should we handle KEY_SLEEP with Hibernation?

by Dmitry Torokhov-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 09, 2009 at 10:38:26AM +0800, Wu Zhangjin wrote:

> 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.
>
> 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.

--
Dmitry
_______________________________________________
hal mailing list
hal@...
http://lists.freedesktop.org/mailman/listinfo/hal

Re: [BUG?] how should we handle KEY_SLEEP with Hibernation?

by Matthew Garrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 09, 2009 at 09:20:09AM -0700, Dmitry Torokhov wrote:

> 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.

--
Matthew Garrett | mjg59@...
_______________________________________________
hal mailing list
hal@...
http://lists.freedesktop.org/mailman/listinfo/hal