From owner-cvs-all@FreeBSD.ORG Thu Dec 29 21:34:15 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.ORG Delivered-To: cvs-all@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3682F16A41F; Thu, 29 Dec 2005 21:34:15 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from bugor.portaone.com (bugor.portaone.com [65.61.200.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5942B43D48; Thu, 29 Dec 2005 21:34:14 +0000 (GMT) (envelope-from sobomax@portaone.com) Received: from [192.168.0.96] ([70.68.0.213]) (authenticated bits=0) by bugor.portaone.com (8.13.4/8.13.4) with ESMTP id jBTLYBwN030703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Dec 2005 21:34:12 GMT (envelope-from sobomax@portaone.com) Message-ID: <43B45653.5050606@portaone.com> Date: Thu, 29 Dec 2005 13:34:11 -0800 From: Maxim Sobolev Organization: Porta Software Ltd User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Maksim Yevmenkin References: <200512292011.jBTKBkVa073791@repoman.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.87.1/1219/Wed Dec 28 22:57:59 2005 on bugor.portaone.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on bugor.portaone.com Cc: cvs-src@FreeBSD.ORG, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/usr.sbin/kbdcontrol kbdcontrol.1 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Maxim.Sobolev@portaone.com List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Dec 2005 21:34:15 -0000 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 > >