Re: [patch] fix magic sysrq on strange keyboards



Pavel Machek <pavel@xxxxxxx> wrote:

Magic sysrq fails to work on many keyboards, particulary most of
notebook keyboards. This should help...

The idea is quite simple: Discard the SysRq break code if Alt is still
being held down. This way the broken keyboard can send the break code
(or the user with a normal keyboard can release the SysRq key) and the
kernel waits until the next key is pressed or the Alt key is released.

From: Fredrik Roubert <roubert@xxxxxxxxx>
Signed-off-by: Pavel Machek <pavel@xxxxxxx>


What kernel are you patching here?


index 5d84839..4602cf3 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -149,7 +149,8 @@ unsigned char kbd_sysrq_xlate[KEY_MAX +
"\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */
"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
"\r\000/"; /* 0x60 - 0x6f */
-static int was_sysrq;
+static int sysrq_down;
+static int sysrq_alt_use;

bix:/usr/src/linux-2.6.17-rc4> grep was_sysrq drivers/char/sysrq.c
bix:/usr/src/linux-2.6.17-rc4>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • [patch] fix magic sysrq on strange keyboards
    ... notebook keyboards. ... Discard the SysRq break code if Alt is still ... +static int sysrq_down; ...
    (Linux-Kernel)
  • Re: [patch] fix magic sysrq on strange keyboards
    ... probably sent patch to my own kernel... ... notebook keyboards. ... Discard the SysRq break code if Alt is still ... static int sysrq_down; ...
    (Linux-Kernel)
  • sysrq docs: document sequence that actually works
    ... Document sequence of keypresses that actually works. ... year-or-so ago. ... keyboards may not have a key labeled 'SysRq'. ...
    (Linux-Kernel)
  • [patch] Re: Magic Alt-SysRq change in 2.6.18-rc1
    ... Documentation/sysrq.txt and this was working on _many_ more keyboards just ... The fact is this patch changes existing behaviour, ... features is not acceptable without a very good reason. ... BTW I believe that original way (alt down, sysrq down, b down) still ...
    (Linux-Kernel)
  • Re: 2.6.0-test5 vs. Japanese keyboards [3]
    ... AB> so, what patch? ... keyboards, only 183 is enough, but both are needed for some ... - The keymap arrays in defkeymap.c_shipped are all defined to ... The change does not bloat the kernel binary. ...
    (Linux-Kernel)