From owner-freebsd-usb@FreeBSD.ORG Sat Aug 11 11:02:34 2012 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69C5E106566B for ; Sat, 11 Aug 2012 11:02:34 +0000 (UTC) (envelope-from kraotn@gmail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id D7A7E8FC08 for ; Sat, 11 Aug 2012 11:02:33 +0000 (UTC) Received: by weyx56 with SMTP id x56so1844077wey.13 for ; Sat, 11 Aug 2012 04:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=J1ljhTSIvAVK9ejygev4PQ+JvKvhso316pOmqkQy+i8=; b=g6pMfqiAaonuBq+9TlxoapU+QWAy5UL9ftD4muPz9tR2sCd3FwGDgLLzONJXr4ASbj ld2CNGkTPM+ruUWj13k7xu6Gb2fwQ9RXD/G23bCZsqTobDDceHfcU/CSkbruC7UNrDN7 NGOF90+XNEmUMXExCMxcdr289vGwepzC08D+8RrXyNz5Wjc1QCxTlhcVkdWLvITW4Lfc yu/iarKn7q6cC6t05nQr356J3UhnMxtGX2qdeOHwoBkBLUA+qG50wePYu03GX9mRdwgg HSHRdSS71TahByH1tymtGJaMq6unLorMxa2XEA8zS0zOA/MBbg7ZrjL3gQo/ErwLEXz8 jL7A== MIME-Version: 1.0 Received: by 10.216.221.74 with SMTP id q52mr2950339wep.181.1344682951987; Sat, 11 Aug 2012 04:02:31 -0700 (PDT) Received: by 10.223.70.200 with HTTP; Sat, 11 Aug 2012 04:02:31 -0700 (PDT) In-Reply-To: <201208111152.35966.hselasky@c2i.net> References: <201208111152.35966.hselasky@c2i.net> Date: Sat, 11 Aug 2012 13:02:31 +0200 Message-ID: From: Kra OTN To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-usb@freebsd.org Subject: Re: USB keyboard partially functioning X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Aug 2012 11:02:34 -0000 Hans, Thank you for your support. Executing the "usbconfig -d x.y add_quirk UQ_KBD_BOOTPROTO" -command did the trick once but after a warm reboot and executing the above command again results in a, what it looks like, a bus error / conflict. The keyboard LEDs are flashing rapidly and my USB mouse has stopped working also (rapidly flashing light). Debugging gives me the following error messages: ------------------------------------------------------------------------------------- Aug 11 12:33:35 desktop kernel: uhid0: at uhub5, port 1, addr 3 (disconnected) Aug 11 12:33:35 desktop kernel: ukbd_intr_callback: error=USB_ERR_STALLED Aug 11 12:33:35 desktop last message repeated 3 times Aug 11 12:33:35 desktop kernel: usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_STALLED, ignored) Aug 11 12:33:35 desktop kernel: usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_STALLED Aug 11 12:33:35 desktop kernel: ukbd_intr_callback: error=USB_ERR_STALLED Aug 11 12:33:36 desktop last message repeated 8 times Aug 11 12:33:36 desktop kernel: usbd_req_re_enumerate: addr=3, set address failed! (USB_ERR_STALLED, ignored) Aug 11 12:33:36 desktop kernel: usbd_setup_device_desc: getting device descriptor at addr 3 failed, USB_ERR_STALLED Aug 11 12:33:36 desktop kernel: ukbd_intr_callback: error=USB_ERR_STALLED Aug 11 12:58:09 desktop kernel: ugen3.4: at usbus3 (disconnected) Aug 11 12:58:09 desktop kernel: uhub_reattach_port: could not allocate new device ------------------------------------------------------------------------------------- Is it possible to auto quirk at boot? Many thanks, M. On Sat, Aug 11, 2012 at 11:52 AM, Hans Petter Selasky wrote: > On Saturday 11 August 2012 11:25:25 Kra OTN wrote: > > Hi guys, > > > > I'm currently facing a problem with my Corsair K60 USB keyboard on a > system > > that is running FreeBSD9 with a standard kernel (9.0-RELEASE FreeBSD > > 9.0-RELEASE #0: Tue Jan 3 07:46:30 UTC 2012 > > root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64) > > > > The keyboard is detected with the following device nodes: > > > > > --------------------------------------------------------------------------- > > > --------------------------------------------------------------------------- > > -------------------------- *syslog:* > > Aug 11 11:05:47 desktop kernel: ugen0.3: at usbus0 > > Aug 11 11:05:47 desktop kernel: ukbd_probe: > > Aug 11 11:05:47 desktop kernel: ukbd_probe: > > Aug 11 11:05:47 desktop kernel: ukbd0: > Keyboard, class 0/0, rev 2.00/1.00, addr 3> on usbus0 > > Aug 11 11:05:47 desktop kernel: ukbd_attach: Parsing HID descriptor of 65 > > bytes > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found left control > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found right control > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found left shift > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found right shift > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found left alt > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found right alt > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found left GUI > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found right GUI > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found keyboard events > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found keyboard numlock > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found keyboard capslock > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found keyboard scrolllock > > Aug 11 11:05:47 desktop kernel: ukbd_set_leds: leds=0x00 > > Aug 11 11:05:47 desktop kernel: ukbd_set_leds: leds=0x02 > > Aug 11 11:05:47 desktop kernel: kbd2 at ukbd0 > > Aug 11 11:05:47 desktop kernel: ukbd_probe: > > Aug 11 11:05:47 desktop kernel: ukbd_set_leds_callback: len=1, id=0 > > Aug 11 11:05:47 desktop kernel: uhid0: > Keyboard, class 0/0, rev 2.00/1.00, addr 3> on usbus0 > > Aug 11 11:05:47 desktop kernel: ukbd_probe: > > Aug 11 11:05:47 desktop kernel: ukbd_probe: > > Aug 11 11:05:47 desktop kernel: ukbd1: > Keyboard, class 0/0, rev 2.00/1.00, addr 3> on usbus0 > > Aug 11 11:05:47 desktop kernel: ukbd_attach: Parsing HID descriptor of 37 > > bytes > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found left control > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found right control > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found left shift > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found right shift > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found left alt > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found right alt > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found left GUI > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found right GUI > > Aug 11 11:05:47 desktop kernel: ukbd_parse_hid: Found keyboard events > > Aug 11 11:05:47 desktop kernel: ukbd_set_leds: leds=0x00 > > Aug 11 11:05:47 desktop kernel: ukbd_set_leds: leds=0x02 > > Aug 11 11:05:47 desktop kernel: kbd3 at ukbd1 > > > --------------------------------------------------------------------------- > > > --------------------------------------------------------------------------- > > -------------------------- *usbconfig:* > > ugen0.1: at usbus0, cfg=0 md=HOST spd=HIGH > (480Mbps) > > pwr=SAVE > > ugen1.1: at usbus1, cfg=0 md=HOST spd=SUPER > > (5.0Gbps) pwr=SAVE > > ugen2.1: at usbus2, cfg=0 md=HOST spd=SUPER > > (5.0Gbps) pwr=SAVE > > ugen3.1: at usbus3, cfg=0 md=HOST spd=HIGH > (480Mbps) > > pwr=SAVE > > ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH > > (480Mbps) pwr=SAVE > > ugen3.2: at usbus3, cfg=0 md=HOST spd=HIGH > > (480Mbps) pwr=SAVE > > ugen3.3: at usbus3, cfg=0 md=HOST spd=FULL > > (12Mbps) pwr=ON > > ugen0.3: at usbus0, cfg=0 > md=HOST > > spd=FULL (12Mbps) pwr=ON > > > --------------------------------------------------------------------------- > > > --------------------------------------------------------------------------- > > -------------------------- > > > > As the syslog suggests right/left shift, ctrl and alt keys are working > > correctly. But those keys are the _only_ functioning keys. Debugging ukbd > > (sysctl hw.usb.ukbd.debug=15) gives me the following output on a working > > key: > > > --------------------------------------------------------------------------- > > > --------------------------------------------------------------------------- > > -------------------------- ukbd_put_key: 0xe2 (226) pressed > > ukbd_intr_callback: actlen=15 bytes > > ukbd_intr_callback: modifiers = 0x0004 > > ukbd_put_key: 0x4e0 (1248) released > > > --------------------------------------------------------------------------- > > > --------------------------------------------------------------------------- > > -------------------------- > > > > But when pressing a key that is not working, the "a" for example I get > the > > following output: > > > --------------------------------------------------------------------------- > > > --------------------------------------------------------------------------- > > -------------------------- Aug 11 11:12:45 desktop kernel: > > ukbd_intr_callback: actlen=15 bytes Aug 11 11:12:45 desktop kernel: > > ukbd_intr_callback: modifiers = 0x0000 Aug 11 11:12:46 desktop kernel: > > ukbd_intr_callback: actlen=15 bytes Aug 11 11:12:46 desktop kernel: > > ukbd_intr_callback: modifiers = 0x0000 > > > -------------------------------------------------------------------------- > > > --------------------------------------------------------------------------- > > --------------------------- > > > > I want to remind you that _all_ keys are not working except those parsed > > by ukbd_parse_hid. > > > > The USB keyboard is functioning correctly on a Linux machine, so it's > not a > > hardware defect. Can someone help me out troubleshooting this problem? > > Hi, > > Usually the actlen should be only 8-bytes. ukbd makes certain assumptions > about where the key-data is supposed to be placed. > > Try using: > > usbdump -i usbusX -f Y -vvv > > To capture the data. There is also a quirk to set the BOOT protocol: > > usbconfig -d X.Y add_quirk UQ_KBD_BOOTPROTO > > Then re-plug the device. > > --HPS >