[PLUG] interesting (painful) mystery

Keith Lofstrom keithl at kl-ic.com
Tue Oct 23 00:24:39 UTC 2007


On Sun, Oct 21, 2007 at 05:36:23PM -0700, Kurt Sussman wrote:
...
> I cannot imagine how a physical keyboard issue could be resolved by
> mounting a disk partition. I have not tried another keyboard for this
> reason. I guess the keyboard chip could be getting initialized
> improperly, but that's still not a keyboard issue.

Reality is not digital.  A keyboard is accessed differently during
some operating states than others, and a flaky keyboard (or hard
drive, or power supply, or ...) may fail under some conditions and
not others, because of voltage changes, timing changes, etc.  
Keyboards fail like analog devices, not digital ones, and it is
inevitable that they fail first under a subset of all conditions.

Without good builtin hardware and software diagnostics, differential
diagnosis is the only option - performing a series of experiments with one
thing changed.  Diagnose software problems by swapping software (if you
are allowed to ... yay, Linux!), and diagnose hardware problems by swapping
hardware.  An external keyboard (USB or PS/2) is a good way to take a lot
of potentially flaky keyboard hardware (and some software) out of the
picture.  A live CD is a way to swap software.  Moving the disk hard
drive to another, similar laptop is a way to take most of the hardware
out of the picture.  A diagnosis is built from these observations. 

If your diagnosis starts with a lot of assumptions, repair becomes
much harder, because you are testing not only hardware and software but
also the assumptions.  Even the people that design this stuff make too
many assumptions (which is one of the reasons things fail), and your
assumptions can only be less reliable than the deisgners.  So try to
discard as many assumptions as possible, and follow the experimental
data instead.

I have seen keyboards fail mechanically A LOT ( just a little corrosion
can make a keyboard intermittent and timing dependent ) and I have seen
a keyboard controller chip fail twice.  I keep spare keyboards around
for just that reason - they are the most likely component to fail.
Fortunately, keyboards can be removed from most laptops by removing two
or three screws.   And once they are pulled, you can look horizontally
through them at a bright light, and see the jungle of garbage that
collects beneath the keys.  It makes you wonder how they ever work at
all.  A complete disassembly and careful cleaning can sometimes bring
keyboards back to life, but most laptop keyboards are hard to rebuild.

Yes, clever software can be amazingly tolerant of flaky hardware.
Chances are, whoever wrote the software you are using does not have
access to the vast collection of flaky hardware necessary to write
fiendishly clever fault-tolerant software.  So you are stuck with 
software that works /almost/ all the time.  

So - try an external keyboard, first.  Try booting from a Live CD,
next.  If the problem is fixed by an external keyboard, it is most
likely the keyboard hardware, or the connection cable, or the 
keyboard scanner chip.  Once you do get the machine working, keep
the old keyboard for experimentation, and delve into the keyboard
scan software if you have the skills for it.  You just might be
able to make that software a little more fault tolerant.

Keith

P.S. - you can watch the keycodes coming off the keyboard with the
program "xev".  That drags information out of the event pipe before
it is processed by keyboard maps, and is good for software diagnostics. 
You can (somewhat indirectly) launch programs like that through a
remote connection - if the display or keyboard or mouse is out, you
can still diagnose your flaky system from another one.

Keith

-- 
Keith Lofstrom          keithl at keithl.com         Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs



More information about the PLUG mailing list