Subject: Are PS/2 keyboards always auto-detected, even if not plugged in?
To: None <netbsd-users@netbsd.org>
From: Anthony Mallet <anthony.mallet@ficus.yi.org>
List: netbsd-users
Date: 07/03/2001 21:10:21
Hi,

I was wondering why my PS/2 keyboard is always auto-detected (i386,
1.5.1), even when it is not present ?

To be able to use either a PS/2 or an USB keyboard, I set up my kernel
like this :

pckbc0		at isa?
pckbd*		at pckbc?
wskbd1 		at pckbd? console ?

ukbd*	at uhub? port ? configuration ? interface ?
wskbd0	at ukbd? console ? mux 1

And here is the dmesg when I only have the USB keyboard plugged-in:

[...]
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd1 at pckbd0: console keyboard, using wsdisplay0
[...]
ukbd0 at uhub0 port 2 configuration 1 interface 0
ukbd0: Sun Microsystems Type 6 USB, rev 1.00/1.02, addr 3, iclass 3/1
wskbd0 at ukbd0 mux 1

This causes (minor) problems with keys like "caps lock" or "num lock"
that try to send commands to the (unplugged) PS/2 keyboard, ending up in
a "pckbc: cmd failed" for the PS/2 keyboard.

I think a basic test at boot time should detect that the keyboard is not
present and just forget about it. Maybe I could try to send-pr a patch ?