USB keyboard and KVM

Ian Dowse iedowse at maths.tcd.ie
Tue Jun 10 12:47:22 PDT 2003


In message <49AD623F-9B60-11D7-B332-003065D644E8 at sprynet.com>, Scott Saunders w
rites:
>I have one issue I haven't been able to figure out yet. I'm using a USB 
>keyboard with a USB KVM switch. When the machine boots, the keyboard is 
>recognized and works fine. (The keyboard doesn't seem to have any 
>effect at the "Hit [enter] to boot immediately..." line of startup, 
>though.) However, if I switch the KVM to another computer and back, the 
>machine doesn't respond to the keyboard. The monitor comes back fine, 
>but the keyboard and mouse don't seem to do anything. I can log in via 
>SSH, but I would like to turn SSH off and just use the KVM set up.
...
>I added:
>kbdcontrol -k /dev/kbd0 < /dev/ttyv0 > /dev/null
>to the end of /etc/rc.i386 based on the FAQ.

The above command will only run once when the machine boots, so you
need to have something that repeats this when the keyboard is
(effectively) plugged back in after being removed. Try adding the
following lines near the end of /etc/usbd.conf instead:

device "Keyboard"
	devname "ukbd0"
	attach "kbdcontrol -k /dev/kbd0 < /dev/ttyv0"

On a box that has both a PS/2 and a USB keyboard, I've used an entry
like the following to have FreeBSD switch to the USB one when it
is plugged in, though this isn't what you want if you only have a
USB keyboard.

device "Keyboard"
	devname "ukbd0"
	attach "kbdcontrol -k /dev/kbd1 -r 250.50 < /dev/console"
	detach "kbdcontrol -k /dev/kbd0 < /dev/console"


Ian


More information about the freebsd-questions mailing list