FS#33322 - [linux] 3.6.11 - 3.9.x usage index exceeded bug in hid driver for 04D9 devices
Attached to Project:
Arch Linux
Opened by Max Harmathy (kastanienaxt) - Monday, 07 January 2013, 14:03 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 17 September 2013, 09:35 GMT
Opened by Max Harmathy (kastanienaxt) - Monday, 07 January 2013, 14:03 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 17 September 2013, 09:35 GMT
|
Details
The Sharkoon Drakonia gaming mouse refuses to work with the
standard arch kernel.
The device identifies itself as 04d9:a067 Holtek Semiconductor, Inc. dmesg gives: [ 65.241958] usb 8-2: new full-speed USB device number 2 using ohci_hcd [ 65.417166] input: Holtek USB Gaming Mouse as /devices/pci0000:00/0000:00:13.1/usb8/8-2/8-2:1.0/input/input17 [ 65.417245] hid-generic 0003:04D9:A067.0002: input,hidraw1: USB HID v1.10 Keyboard [Holtek USB Gaming Mouse] on usb-0000:00:13.1-2/input0 [ 65.426215] hid-generic 0003:04D9:A067.0003: usage index exceeded [ 65.426219] hid-generic 0003:04D9:A067.0003: item 0 2 2 2 parsing failed [ 65.426228] hid-generic: probe of 0003:04D9:A067.0003 failed with error -22 [ 65.433064] hid-generic 0003:04D9:A067.0004: hiddev0,hidraw2: USB HID v1.10 Device [Holtek USB Gaming Mouse] on usb-0000:00:13.1-2/input2 I also attached the complete output of lsusb -v. This seems to be a common problem with 04D9 devices: https://bbs.archlinux.org/viewtopic.php?id=144132 In the OpenSuse forum I found a workaround, which suggests to set the constant HID_MAX_USAGES in include/linux/hid.h from 12288 to a value greater than 32k. http://forums.opensuse.org/english/get-technical-help-here/hardware/473200-usb-gaming-mouse-04d9-a078-not-working-linux-plus-workaround.html I tried this workaround with a recompiled standard kernel and it worked for me. However this seems to be a rather dirty workaround. The same bug is also reported in ubuntu with a different device from the same manufacturer: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1064490 In post #19 there is a hint that this problem was solved for Holtek keyboard, which had the same problem, in a clean way in the kernel: http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=drivers/hid/hid-holtek-kbd.c |
This task depends upon
Closed by Tobias Powalowski (tpowa)
Tuesday, 17 September 2013, 09:35 GMT
Reason for closing: Fixed
Additional comments about closing: 3.11.1
Tuesday, 17 September 2013, 09:35 GMT
Reason for closing: Fixed
Additional comments about closing: 3.11.1
https://bugzilla.novell.com/show_bug.cgi?id=774676#c3
[ 272.640147] usb 6-1: new full-speed USB device number 2 using uhci_hcd
[ 272.864956] input: Newman USB Gaming Mouse as /devices/pci0000:00/0000:00:1d.0/usb6/6-1/6-1:1.0/input/input21
[ 272.865245] hid-generic 0003:04D9:A04A.0007: input,hidraw4: USB HID v1.10 Keyboard [Newman USB Gaming Mouse] on usb-0000:00:1d.0-1/input0
[ 272.874127] hid-generic 0003:04D9:A04A.0008: usage index exceeded
[ 272.874142] hid-generic 0003:04D9:A04A.0008: item 0 2 2 2 parsing failed
[ 272.874187] hid-generic: probe of 0003:04D9:A04A.0008 failed with error -22
so this device is unusable for me ... very frustrating.
there are patches, for eg.: https://patchwork.kernel.org/patch/111940/ but nowhere any explanation why the value is 12288 ant why no answer since 2010 !!
As you can see on google solution fot it is to change HID_MAX_USAGES in include/linux/hid.h from 12288 to a value greater than 32k.
Linux 3.9.3-1-ARCH #1 SMP PREEMPT Sun May 19 22:50:29 CEST 2013 x86_64 GNU/Linux
grep "HID_MAX_USAGES" /usr/src/ -R
/usr/src/linux-3.9.3-1-ARCH/include/linux/hid.h:#define HID_MAX_USAGES 12288
/usr/src/linux-3.9.3-1-ARCH/include/linux/hid.h: unsigned usage[HID_MAX_USAGES]; /* usage array */
/usr/src/linux-3.9.3-1-ARCH/include/linux/hid.h: unsigned collection_index[HID_MAX_USAGES]; /* collection index array */
https://patchwork.kernel.org/patch/2595331/
https://aur.archlinux.org/packages/hid-holtek-mouse/
It was tested by a French user using this kind of mouse ( http://forums.archlinux.fr/topic13741.html -- sorry, french community) and seems to work well (I'm not an expert in module creation however, therefore I don't know if the package needs a better presentation).