From owner-freebsd-usb@FreeBSD.ORG Mon Feb 11 11:46:09 2013 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D48DA36B; Mon, 11 Feb 2013 11:46:09 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx1.freebsd.org (Postfix) with ESMTP id 881FB123; Mon, 11 Feb 2013 11:46:09 +0000 (UTC) Received: by mail-ve0-f172.google.com with SMTP id cz11so5150871veb.3 for ; Mon, 11 Feb 2013 03:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=rD/xQpUZkRVEuh8BYc3hlBic+KG5ejhcSScHZgCiBWg=; b=Qf9hEAyQkbaSYR9iUIx4USm3+HFrEA85dUmOjuGnFUsEfLfVvWOzqL4vd2PtWt7BAC BQN5dm4EBNyITdJWawf1Nz/huFbPPAjnI25xZVtq/+AQ4vUmSKKONCVtgRuyS7/hfCsO C9jHNzmGDU+7Hce+4dcUoZXa73r7XqymSRfBgtZbbNjqjwhufWt6QmlGqe5OohyHnusZ QAFY6xbS0WKrDjB10qa3+FpOym6m1hOG5KQfmcPFwZFJCSyDTa+pVxqyvF816fw4i9c5 GUe//tmFf/5RVKwYBTmEguSQwHt3msahUknXxau54eq4Owc2KN0C4gYHAEtyaSp7huzq vwWw== MIME-Version: 1.0 X-Received: by 10.52.33.68 with SMTP id p4mr6124954vdi.125.1360583163384; Mon, 11 Feb 2013 03:46:03 -0800 (PST) Received: by 10.58.100.147 with HTTP; Mon, 11 Feb 2013 03:46:03 -0800 (PST) In-Reply-To: <201302111126.08104.hselasky@c2i.net> References: <201302072140.r17Le1MG098491@freefall.freebsd.org> <201302111126.08104.hselasky@c2i.net> Date: Mon, 11 Feb 2013 11:46:03 +0000 Message-ID: Subject: Re: usb/175731: detaching USB keyboard freezes other USB keyboards From: Tom Evans To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: freebsd-x11@freebsd.org, 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: Mon, 11 Feb 2013 11:46:09 -0000 On Mon, Feb 11, 2013 at 10:26 AM, Hans Petter Selasky wrote: > 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 This sounds very similar to what happens when I undock my laptop from a dock which has a couple of USB keyboards attached. All keys stop responding in X, but I can use the built in keyboard to switch to a VT, hit a few keys, switch back to X and the built in keyboard has recovered in X. Cheers Tom