Re: [RFC/RFT] Reinject Alt+SysRq when no hotkeys have been pressed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/10/2010 02:27 PM, Dmitry Torokhov wrote:
> On Wednesday, November 10, 2010 12:13:20 pm Jason Wessel wrote:
>> On 11/09/2010 01:34 AM, Dmitry Torokhov wrote:
>>> Now that KGDB knows how to release keys that have been pressed when
>>> entering the debugger the only issue left is that SysRq handler is too
>>> greedy and always swallows Alt+SysRq, causing print screen hotkey to
>>> stop working. The solution is to re-inject the key combo when user
>>> releases SysRq without pressing any other keys. The patch below does
>>> just that and also releases keys that have been pressed before we enter
>>> SysRq mode.
>>>
>>> Note that it depends on a patch to input core that will stop events
>>> injected by one input handler from reaching the very same input handler
>>> (attached).
>>>
>>> Comments/testing/suggestion are sought after.
>> I applied both patches and tested all the known failures cases I had on
>> my list and it looks good, for the non kdb cases.
>>
>> Tested-by: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
>>

>> However...  I also tested this with the kdb keyboard release
>> patches plus your latest 2 patches and we appear to have an
>> incompatibility.  The behavior is that when exiting kdb the print
>> screen trigger fires.  I had not had a chance to debug it as of
>> yet.
>>
>
> Hmm, let me think...
>

So I debugged it.  The key up events are peeled off in linear order
with the kdb release key code.

The sequence looks like this

down - alt
down - printScr
down - g           <-- Enters kdb

The kdb release code simulates the events
up - g
up - alt
up - printScr

That tells me we have something bad about the key events going on, or
that we care about release ordering in the release handler.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux