Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

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
Comment by Tobias Powalowski (tpowa) - Wednesday, 23 January 2013, 16:09 GMT
Status on 3.7.x?
Comment by Max Harmathy (kastanienaxt) - Thursday, 24 January 2013, 09:48 GMT
The problem still persists in 3.7 as well as in the upcoming 3.8 kernel.
Comment by Thomas Bächler (brain0) - Thursday, 24 January 2013, 10:00 GMT
Your last comment suggests that there is a proper way to solve this problem, similarly to the holtek driver. However, we lack the knowledge to do that ourselves, an upstream bug report may be in order.
Comment by Guilherme (GUiHKX) - Wednesday, 24 April 2013, 06:16 GMT
Any progress on this? I'm having the same issue with my mouse. There is a comment in OpenSuse bugtracker that says that the fix for HID_MAX_USAGES is invalid:

https://bugzilla.novell.com/show_bug.cgi?id=774676#c3
Comment by Mikołaj (travnick) - Saturday, 11 May 2013, 21:27 GMT
It would be nice to get those devices working. I tired new mouse today:

[ 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.
Comment by Tobias Powalowski (tpowa) - Thursday, 23 May 2013, 19:46 GMT
Status on 3.9?
Comment by Mikołaj (travnick) - Thursday, 23 May 2013, 21:27 GMT
uname -a
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 */
Comment by Michael Eder (becha) - Monday, 03 June 2013, 12:07 GMT Comment by Tobias Powalowski (tpowa) - Monday, 03 June 2013, 13:11 GMT
This not yet merged into the kernel tree.
Comment by Yannick Lange (FoolEcho) - Monday, 01 July 2013, 07:37 GMT
Waiting a potential merge, I provide the patch and the module given by Michael Eder through AUR, check hid-holtek-mouse.

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).
Comment by Yannick Lange (FoolEcho) - Tuesday, 17 September 2013, 09:33 GMT
Just to alert that the hid-holtek-mouse module is now part of the kernel 3.11, therefore my previous package is now senseless and removed.

Loading...