Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jan 2006 14:19:13 -0800
From:      Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
To:        Eugeny Kuzakov <coredumped@coredumped.org.ru>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: kbdmux: unable to work with dual keyboard
Message-ID:  <bb4a86c70601131419t52d98cb6we0544eec0c56c228@mail.gmail.com>
In-Reply-To: <43C82162.40909@coredumped.org.ru>
References:  <E1EwtLl-000IPw-00.coredumped-mail-ru@f9.mail.ru> <bb4a86c70601121140j6ba00bffua99454515139d654@mail.gmail.com> <43C7DA71.5080609@coredumped.org.ru> <bb4a86c70601130948k345172aagdd470c36fb0ce731@mail.gmail.com> <43C82162.40909@coredumped.org.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
> >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@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   =20
max@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb4a86c70601131419t52d98cb6we0544eec0c56c228>