From owner-freebsd-usb@FreeBSD.ORG Tue Jan 15 09:11:22 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D1B636A5 for ; Tue, 15 Jan 2013 09:11:22 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id B4F2872E for ; Tue, 15 Jan 2013 09:11:22 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id r0F9BHVW064309; Tue, 15 Jan 2013 01:11:17 -0800 (PST) (envelope-from yuri@rawbw.com) Message-ID: <50F51D34.9040904@rawbw.com> Date: Tue, 15 Jan 2013 01:11:16 -0800 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Hans Petter Selasky Subject: Re: Plugging out Microsoft Nano Tranceiver (USB mouse) causes PS2 keyboard to cease functioning References: <50F48D49.1060406@rawbw.com> <201301150812.33427.hselasky@c2i.net> In-Reply-To: <201301150812.33427.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2013 09:11:22 -0000 On 01/14/2013 23:12, Hans Petter Selasky wrote: > The problem is that the Nano transceiver also provides a keyboard, which is > set as default. > > See /etc/devd.conf and: > > # When a USB keyboard arrives, attach it as the console keyboard. > attach 100 { > device-name "ukbd0"; > action "/etc/rc.d/syscons setkeyboard /dev/ukbd0"; > }; > detach 100 { > device-name "ukbd0"; > action "/etc/rc.d/syscons setkeyboard /dev/kbd0"; > }; > > Which probably should be updated. These directives look quite crude. device-name "ukbd0"; should probably be device-name "ukbd[0-9]+"; Also why kbd0 is taken as new default after ukbd disconnect? Replacing kbd0 with kbd1 there didn't fix the problem though as I expected. Following /etc/rc.d/sysconsit looks like in my case "/etc/rc.d/syscons setkeyboard /dev/ukbd0" doesn't do anything, since "kbdcontrol -k ${kbd} < ${kbddev}" is only called when there is no kbdmux. Here is another problem: In the presence of mouse, this command doesn't show ukbd0 attached to kbdmux: # kbdcontrol -i < /dev/ttyv0 kbd1: kbdmux0, type:AT 101/102 (2) Also it looks like the keyboard provided by mouse isn't working. Mouse keyboard only has 2 buttons, by default Page-Up and Page-Down and these events are never triggered. Trying to attach it manually, following kbdcontrol(1), I get this error: # kbdcontrol -a ukbd0 < /dev/kbdmux0 su: /dev/kbdmux0: Device busy Who is normally supposed to connect ukbd to kbdmux? Yuri