kbdmux: unable to work with dual keyboard

Maksim Yevmenkin maksim.yevmenkin at gmail.com
Fri Jan 13 14:19:22 PST 2006


> >no, its not the same as in your previous email. you got different
> >error. did you run your script in console or xterm window?
> >
> >also, just to be on the safe side, you might want to replace
> >/dev/console with /dev/ttyv0, i.e.
>
> kbdcontrol -K < /dev/ttyv0
> kbdcontrol -a ukbd0 < /dev/kbdmux0
> kbdcontrol -a atkbd0 < /dev/kbdmux0
> kbdcontrol -k /dev/kbdmux0 < /dev/ttyv0
>
> output:
>
> root at coredumped:/add/home/coredumped/tmp$cat mmm.log
> + kbdcontrol -K
> kbd0
>     atkbd0, type:AT 101/102 (2)
> + kbdcontrol -a ukbd0
> kbdcontrol: unable to (un)mux the keyboard: Operation not supported by
> device
> kbd1
>     kbdmux0, type:AT 101/102 (2)
> + kbdcontrol -a atkbd0
> kbdcontrol: unable to (un)mux the keyboard: Operation not supported by
> device
> kbd1
>     kbdmux0, type:AT 101/102 (2)
> + kbdcontrol -k /dev/kbdmux0
> kbd1
>     kbdmux0, type:AT 101/102 (2)
> ---14-01-2006 00:53:15

well, you are doing something wrong. stupid questions: did you kldload
kbdmux? is your userland and kernel in sync? i just tried

beetle# uname -a
FreeBSD beetle.digisle.com 7.0-CURRENT FreeBSD 7.0-CURRENT #47: Thu
Jan  5 14:20:02 PST 2006    
max at beetle.digisle.com:/usr/obj/usr/src/sys/GENERIC  i386

beetle# ls -la /dev/*kbd*
crw-------  1 root  wheel    0,  39 Jan  6 12:21 /dev/atkbd0
lrwxr-xr-x  1 root  wheel         6 Dec 31  1969 /dev/kbd0 -> atkbd0
lrwxr-xr-x  1 root  wheel         5 Jan  6 04:21 /dev/kbd1 -> ukbd0
lrwxr-xr-x  1 root  wheel         7 Jan 13 09:46 /dev/kbd2 -> kbdmux0
crw-------  1 root  wheel    0, 124 Jan  6 12:21 /dev/kbdmux0
crw-------  1 root  wheel    0,  89 Jan  6 12:21 /dev/ukbd0

beetle# cat k.sh
#!/bin/sh -x

kbdcontrol -K < /dev/ttyv0
kbdcontrol -a atkbd0 < /dev/kbdmux0
kbdcontrol -a ukbd0 < /dev/kbdmux0
kbdcontrol -k /dev/kbdmux0 < /dev/ttyv0

beetle# sh -x k.sh
+ kbdcontrol -K
kbd0
    atkbd0, type:AT 101/102 (2)
+ kbdcontrol -a atkbd0
kbd2
    kbdmux0, type:AT 101/102 (2)
+ kbdcontrol -a ukbd0
kbd2
    kbdmux0, type:AT 101/102 (2)
+ kbdcontrol -k /dev/kbdmux0
kbd2
    kbdmux0, type:AT 101/102 (2)

and both keyboards work.

you might want to try other way, i.e.

1) connect usb keyboard and make sure it is _NOT_ default, i.e.
comment out ubkd section in /etc/devd.conf and restart devd

2) kbdcontrol -a ukbd0 < /dev/kbdmux0 -- this should add ukbd0 to
kbdmux0 but it will _NOT_ switch the keyboards.

3) if (3) above was succesful, then kbdcontrol -k /dev/kbdmux0 <
/dev/ttyv0 -- this should switch the keyboard to kbdmux0 (and ukbd0).
it should also cut out atkbd0.

4) add atkbd0 to kbdmux0 kbdcontrol -a atkbd0 < /dev/ttyv0

if everything above worked then you should have both keyboards working.

thanks,
max


More information about the freebsd-questions mailing list