Subject: pc keyboard re-initialization vs. getty....
To: NetBSD/i386 Discussion List <port-i386@netbsd.org>
From: Greg A. Woods <woods@most.weird.com>
List: port-i386
Date: 01/18/1999 13:11:51
Although NetBSD more reliably handles the removal and re-insertion of
the keyboard than ever before (and indeed perhaps more reliably than any
other OS I've ever used), I found that I had to kill the getty on the
console (ttyv0) yesterday before even the caps-lock and num-lock keys
would work (and of course no other keys had any effect either).

Magically once the getty restared the num-lock light came on all by
itself and the keyboard began to respond normally.

I should also point out that shortly after the keyboard plug was
inserted the lights did all flash in unison, and this was seemingly
infinitely repeatable.

I suspect there's some bit of state being stuck in the driver sometimes
if the device is already open but that a close and re-open successfully
resets that state.  The driver does not always get stuck in this state
when the keyboard is removed and re-connected (this is the first time
I've observed it).  I note that when I kill the getty when everything's
in the correct state the third LED comes on until the new getty re-opens
the tty (the num-lock light stayed on, the caps-lock light stayed off),
unlike on my Suns where it seems all the lights flash when the device is
opened.

(This was on my NetBSD-1.3I system (sources sup'ed about Dec. 2), with a
PS2 keyboard [IBM PC Server 325 and a Compaq "domestic" 166516-001
(replacement part 166514-001) keyboard].)

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods@acm.org>      <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>