Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Dec 2005 13:34:11 -0800
From:      Maxim Sobolev <sobomax@portaone.com>
To:        Maksim Yevmenkin <maksim.yevmenkin@gmail.com>
Cc:        cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.sbin/kbdcontrol kbdcontrol.1
Message-ID:  <43B45653.5050606@portaone.com>
In-Reply-To: <bb4a86c70512291324y7a12ba62qd9a1713cfe53a386@mail.gmail.com>
References:  <200512292011.jBTKBkVa073791@repoman.freebsd.org> <bb4a86c70512291324y7a12ba62qd9a1713cfe53a386@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Maksim Yevmenkin wrote:
> Maxim,
> 
>> sobomax     2005-12-29 20:11:46 UTC
>>
>>   FreeBSD src repository
>>
>>   Modified files:
>>     usr.sbin/kbdcontrol  kbdcontrol.1
>>   Log:
>>   Reveal sacred spells necessary for putting kbdmux(4) to real use.
>>
>>   Hopefully gods of RTFS and RTFCL will not go after me.
>>
>>   Revision  Changes    Path
>>   1.39      +15 -0     src/usr.sbin/kbdcontrol/kbdcontrol.1
> 
> thanks for doing this! unfortunately, the sequence of command you have
> put into the man page not entirely correct.
> 
> it will work, if you do all the commands from the scripts and do it
> fast enough. note that syscons(4) will try to grab the first available
> keyboard when it does not have one, and, the first thing you do is to
> release current keyboard.

Actually I think you not quite correct - such syscons(4) behaviour is 
optional (opt in) and depends on 0x100 flags to sc(4).

At least that sequence works here with GENERIC kernel/hints just fine.

In fact I believe the better way to handle this problem is to allow 
kbdmux(4) to be reconfigured on the fly, that is when it's already 
attached to the console. This way you will be able to attach it to the 
console first and then add/remove actual keyboards as you see fit. I 
don't think it will be very hard to do.

What do you think?

-Maxim

> there is a better way to do it. syscons(4) supports KBADDKBD and
> KBRELKBD ioctl(2)s, so you could do
> 
> (assuming atkbd0 is the default keyboard)
> 
> # kbdcontrol -a ukbd0 < /dev/kbdmux0 -- attach ukbd0 to kbdmux0
> # kbdcontrol -k /dev/kbdmux0 < /dev/ttyv0 -- switch console to kbdmux0/ukb0
> # kbdcontrol -a atkbd0 < /dev/ttyv0 -- add atkbd0 to kbdmux0
> 
> i still cant figure out why my system locks up in X when i use
> kbdmux(4)/atkbd(4) and psm(4). my only guess that kbdmux(4) somehow
> changes order of evens and atkbd(4) and/or psm(4) access ps2 hardware
> in the wrong way.
> 
> thanks,
> max
> 
> 




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