Subject: Re: timeout updating leds with new keyboard
To: Dave Huang <khym@bga.com>
From: Keith Browne <tuxedo@interlog.com>
List: port-i386
Date: 02/23/1997 02:44:01
On Sat, 22 Feb 1997, Dave Huang wrote:

> I just got a new keyboard (a PC Concepts "The 'Wave' 109-Key Keyboard"), 
> and whenever I hit caps lock, scroll lock, or num lock, I get "pc: 
> timeout updating leds", and the LEDs don't change. I'm using the "pc" 
> console driver, haven't tried with pcvt yet. The keyboard has a PS/2 
> style connector on it, and came with an adapter for the normal AT-style 
> connector.
> 
> Any ideas? :) It's not very important, but it's sorta annoying :)

I think pcvt will fix your problem.  I was having a similar problem
with NetBSD/i386 1.2 last fall, except that it was even more annoying.
Switching to pcvt was what worked for me.

I run XFree86, and I swap my left control key with my caps-lock key,
and I use Emacs and a lot of Emacs-like command-line editing tools.
As a result, I'm always over on the control key.  From time to time,
my whole keyboard would just lock up; I couldn't type anything any
more, even if I used mouse commands to exit X and return to the text
console.

It took some sleuthing, but I noticed my xconsole was showing the
"timeout updating leds" error whenever I locked up the keyboard, and
it seemed correlated with using the control key.  Under the standard
console, when I remapped the keys in X, the LED assignments stayed the
same, so every time I hit my caps-lock key to get the control-key
functionality, the caps-lock LED would toggle.  In the code for the
standard console driver, there's some mention of a potential race
condition; I'm pretty sure I was triggering it.

Then I recompiled with the pcvt console instead, and the problem went
away.  Not only does pcvt use different code for setting the LEDs,
which might have gotten rid of the race condition altogether, but it
changes my LED assignments when I remap the keys.  One fix, two wins.

Keith Browne
tuxedo@interlog.com