From owner-freebsd-usb@FreeBSD.ORG Sat Aug 11 09:52:12 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 574F4106566B for ; Sat, 11 Aug 2012 09:52:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.c2i.net [212.247.154.130]) by mx1.freebsd.org (Postfix) with ESMTP id BF7498FC15 for ; Sat, 11 Aug 2012 09:52:11 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [176.74.212.201] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe05.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 303254936; Sat, 11 Aug 2012 11:52:02 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 11 Aug 2012 11:52:35 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: In-Reply-To: X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201208111152.35966.hselasky@c2i.net> Cc: 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 09:52:12 -0000 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