From owner-freebsd-x11@FreeBSD.ORG Mon Feb 11 10:25:04 2013 Return-Path: Delivered-To: x11@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AB787401; Mon, 11 Feb 2013 10:25:04 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id D480D192A; Mon, 11 Feb 2013 10:25:03 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 377444173; Mon, 11 Feb 2013 11:24:56 +0100 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, bug-followup@freebsd.org Subject: usb/175731: detaching USB keyboard freezes other USB keyboards Date: Mon, 11 Feb 2013 11:26:08 +0100 User-Agent: KMail/1.13.7 (FreeBSD/9.1-STABLE; KDE/4.8.4; amd64; ; ) References: <201302072140.r17Le1MG098491@freefall.freebsd.org> In-Reply-To: <201302072140.r17Le1MG098491@freefall.freebsd.org> X-Face: ?p&W)c( =?iso-8859-1?q?+80hU=3B=27=7B=2E=245K+zq=7BoC6y=7C=0A=09/D=27an*6mw?=>j'f:eBsex\Gi, Cc: x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2013 10:25:04 -0000 On Thursday 07 February 2013 22:40:01 Hans Petter Selasky wrote: > The following reply was made to PR usb/175731; it has been noted by GNATS. > Hi, You should look into HAL and xf86-input-keyboard ports. I don't have time to debug this currently. To prevent KBD X11 driver unload by /usr/ports/x11-drivers/xf86-input-keyboard change this in the source code: { - xf86AddInputDriver(&KBD, NULL, 0); + xf86AddInputDriver(&KBD, module, 0); return module; } The problem is deeper. When X11 sees that the keyboard is gone it issues some IOCTLs on /dev/console, like the keyboard MODE and then no more keys are received. See using ktrace on Xorg. This is a shared device receiving key-presses for all keyboards as far as I can see and it should only be programmed once. This is currently not handled. Inside the file referenced below code is present to set "x11_driver" to "kbd". Probably changing this will affect the outcome too: /usr/local/share/hal/fdi/policy/10osvendor/10-x11-input.fdi How to reproduce: Plug two USB keyboards using a HAL enabled Xorg server. Unplug one keyboard. Input from the other keyboard disappears until some other keyboard device is plugged again! --HPS