2003-06-09 10:40:56

by Jurgen Kramer

[permalink] [raw]
Subject: Completely disable AT/PS2 keyboard support in 2.4?

Hi,

Is it possible to completely disable AT/PS2 keyboard support
in 2.4 or is this still needed when I only use a USB keyboard?

I am currently getting dozens of keyboard messages:

keyboard.c: can't emulate rawmode for keycode 272
keyboard.c: can't emulate rawmode for keycode 272
keyboard.c: can't emulate rawmode for keycode 272
keyboard.c: can't emulate rawmode for keycode 272
keyboard.c: can't emulate rawmode for keycode 272
keyboard.c: can't emulate rawmode for keycode 272
keyboard.c: can't emulate rawmode for keycode 272
keyboard.c: can't emulate rawmode for keycode 272

I am not sure if the comes from the USB keyboard or from
the non-connected PS2 port.

Thanks,

Jurgen


2003-06-09 13:20:44

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: Completely disable AT/PS2 keyboard support in 2.4?

On 9 Jun 2003, Jurgen Kramer wrote:
> Is it possible to completely disable AT/PS2 keyboard support
> in 2.4 or is this still needed when I only use a USB keyboard?
>
> I am currently getting dozens of keyboard messages:
>
> keyboard.c: can't emulate rawmode for keycode 272
> keyboard.c: can't emulate rawmode for keycode 272
> keyboard.c: can't emulate rawmode for keycode 272
> keyboard.c: can't emulate rawmode for keycode 272
> keyboard.c: can't emulate rawmode for keycode 272
> keyboard.c: can't emulate rawmode for keycode 272
> keyboard.c: can't emulate rawmode for keycode 272
> keyboard.c: can't emulate rawmode for keycode 272
>
> I am not sure if the comes from the USB keyboard or from
> the non-connected PS2 port.

In 2.4.x, the input layer converts input events to PC/AT scancodes, and still
relies on the PS/2 low-level keyboard driver scancode conversion to interprete
them. This means you must include the PS/2 low-level keyboard driver. If you
don't, you may get strange results, especially on architectures where you have
a different low-level keyboard driver.

BTW, I guess your arrow keys are not working?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2003-06-09 14:35:00

by Jurgen Kramer

[permalink] [raw]
Subject: Re: Completely disable AT/PS2 keyboard support in 2.4?

My arrow keys are working just fine. The "can't emulate rawmode for
keycode" messages seem to appear without a key being pressed. The
keyboard or the keyboard receiver (it's a wireless keyboard) is probably
just sending out keycodes at will...


On Mon, 2003-06-09 at 15:34, Geert Uytterhoeven wrote:
> On 9 Jun 2003, Jurgen Kramer wrote:
> > Is it possible to completely disable AT/PS2 keyboard support
> > in 2.4 or is this still needed when I only use a USB keyboard?
> >
> > I am currently getting dozens of keyboard messages:
> >
> > keyboard.c: can't emulate rawmode for keycode 272
> > keyboard.c: can't emulate rawmode for keycode 272
> > keyboard.c: can't emulate rawmode for keycode 272
> > keyboard.c: can't emulate rawmode for keycode 272
> > keyboard.c: can't emulate rawmode for keycode 272
> > keyboard.c: can't emulate rawmode for keycode 272
> > keyboard.c: can't emulate rawmode for keycode 272
> > keyboard.c: can't emulate rawmode for keycode 272
> >
> > I am not sure if the comes from the USB keyboard or from
> > the non-connected PS2 port.
>
> In 2.4.x, the input layer converts input events to PC/AT scancodes, and still
> relies on the PS/2 low-level keyboard driver scancode conversion to interprete
> them. This means you must include the PS/2 low-level keyboard driver. If you
> don't, you may get strange results, especially on architectures where you have
> a different low-level keyboard driver.
>
> BTW, I guess your arrow keys are not working?
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds

2003-06-09 14:47:56

by Lionel Bouton

[permalink] [raw]
Subject: Re: Completely disable AT/PS2 keyboard support in 2.4?

Jurgen Kramer wrote:

>My arrow keys are working just fine. The "can't emulate rawmode for
>keycode" messages seem to appear without a key being pressed. The
>keyboard or the keyboard receiver (it's a wireless keyboard) is probably
>just sending out keycodes at will...
>
>

On my config (Logitech wireless mouse and kb with USB receiver) :
- 272 keycode happens on each left click,
- 273 or 276 on each right click (actual button pressed dependant there
are 2 buttons recognised as the right one on my Optical Trackman),
- 275 on each middle click,
- 274 on each wheel click...

Hope it helps.

LB

2003-06-09 14:53:36

by Randy.Dunlap

[permalink] [raw]
Subject: Re: Completely disable AT/PS2 keyboard support in 2.4?

On 09 Jun 2003 12:54:36 +0200 Jurgen Kramer <[email protected]> wrote:

| Hi,
|
| Is it possible to completely disable AT/PS2 keyboard support
| in 2.4 or is this still needed when I only use a USB keyboard?
|
| I am currently getting dozens of keyboard messages:
|
| keyboard.c: can't emulate rawmode for keycode 272
| keyboard.c: can't emulate rawmode for keycode 272
| keyboard.c: can't emulate rawmode for keycode 272
|
| I am not sure if the comes from the USB keyboard or from
| the non-connected PS2 port.

I have made a couple of patches for non-AT/PS2 keyboard controllers
in 2.4.x -- and which a few people have told me that they have
used successfully. The latest version that I have done is:
http://www.osdl.org/archive/rddunlap/patches/kbc_option_2420.patch
if you would like to try it.

--
~Randy

2003-06-09 18:25:37

by Pekka Pietikainen

[permalink] [raw]
Subject: Re: Completely disable AT/PS2 keyboard support in 2.4?

On Mon, Jun 09, 2003 at 05:01:32PM +0200, Lionel Bouton wrote:
> Jurgen Kramer wrote:
> On my config (Logitech wireless mouse and kb with USB receiver) :
> - 272 keycode happens on each left click,
> - 273 or 276 on each right click (actual button pressed dependant there
> are 2 buttons recognised as the right one on my Optical Trackman),
> - 275 on each middle click,
> - 274 on each wheel click...

Same here... Here's a patch that fixed it (something similar was added
to 2.5 recently)

--- linux-2.4.20-20.1.2007.nptl/drivers/input/keybdev.c.orig 2003-05-31 14:23:10.000000000 +0300
+++ linux-2.4.20-20.1.2007.nptl/drivers/input/keybdev.c 2003-05-31 14:23:58.000000000 +0300
@@ -172,7 +172,8 @@
if (type != EV_KEY) return;

if (emulate_raw(code, down))
- printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", code);
+ if(code < BTN_MISC)
+ printk(KERN_WARNING "keybdev.c: can't emulate rawmode for keycode %d\n", code);

tasklet_schedule(&keyboard_tasklet);
}

--
Pekka Pietikainen




2003-06-10 08:57:51

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: Completely disable AT/PS2 keyboard support in 2.4?

On 9 Jun 2003, Jurgen Kramer wrote:
> My arrow keys are working just fine. The "can't emulate rawmode for
> keycode" messages seem to appear without a key being pressed. The
> keyboard or the keyboard receiver (it's a wireless keyboard) is probably
> just sending out keycodes at will...

OK, so the arrow-keys (and other keys generating E0/E1-prefixed scancodes) not
working happens on `other' architectures only (e.g. MIPS with dummy
keyboard.c).

> On Mon, 2003-06-09 at 15:34, Geert Uytterhoeven wrote:
> > On 9 Jun 2003, Jurgen Kramer wrote:
> > > Is it possible to completely disable AT/PS2 keyboard support
> > > in 2.4 or is this still needed when I only use a USB keyboard?
> > >
> > > I am currently getting dozens of keyboard messages:
> > >
> > > keyboard.c: can't emulate rawmode for keycode 272
> > > keyboard.c: can't emulate rawmode for keycode 272
> > > keyboard.c: can't emulate rawmode for keycode 272
> > > keyboard.c: can't emulate rawmode for keycode 272
> > > keyboard.c: can't emulate rawmode for keycode 272
> > > keyboard.c: can't emulate rawmode for keycode 272
> > > keyboard.c: can't emulate rawmode for keycode 272
> > > keyboard.c: can't emulate rawmode for keycode 272
> > >
> > > I am not sure if the comes from the USB keyboard or from
> > > the non-connected PS2 port.
> >
> > In 2.4.x, the input layer converts input events to PC/AT scancodes, and still
> > relies on the PS/2 low-level keyboard driver scancode conversion to interprete
> > them. This means you must include the PS/2 low-level keyboard driver. If you
> > don't, you may get strange results, especially on architectures where you have
> > a different low-level keyboard driver.
> >
> > BTW, I guess your arrow keys are not working?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds