Comment 6 for bug 1026527

Revision history for this message
Jean Bruenn (himself-9) wrote :

Hello,

I have the same keyboard; To make it work in Linux in Gaming-Mode you have to higher the MAX_HID_USAGES to 64K without that, you'll get errors like this:

[ 2389.172128] hid-generic 0003:060B:2270.000E: usage index exceeded
[ 2389.172142] hid-generic 0003:060B:2270.000E: item 0 2 2 2 parsing failed
[ 2389.172177] hid-generic: probe of 0003:060B:2270.000E failed with error -22

Hence I would consider this a kernel bug. @Nolan: You helped me a lot. I just found your "solution" and if I switch to "normal"-mode the keyboard works without the above fix applied. Question remains if this can be called a bug because highering the MAX HID USAGES makes the gaming-mode of the keyboard work in Linux. Question is also, what's the difference between gaming and normal mode.

In case someone is interested in more information regarding this bug, I wrote the following to the linux-input maillinglist (and followed that mail by your fix using shift+ctrl+alt+n). I hope the information below will be helpful to further decide what to do with this pseudo-bug.

in short:
this mail is about the "Gigabyte K8100 Aivia USB Gaming Keyboard" which
is not working in Linux (xev, usbmon, showkey gives no output except
for backspace+multimedia keys, keyboard works in BIOS and at the
bootloader, dmesg reports: "usage index exceeded"). The solution to
make it working is to higher the value of HID_MAX_USAGES from 12K to
64K.

in long:
in January 2012 a user started a thread about this device on the usb
maillinglist: http://www.spinics.net/lists/linux-usb/msg57559.html
in April 2012 I joined that and added information plus the solution:
http://www.spinics.net/lists/linux-usb/msg60822.html (Solution:
http://www.spinics.net/lists/linux-usb/msg60859.html)

Unfortunately nobody fixed this issue in the past months (probably
I've been on the wrong maillinglist. Hopefully this one is the correct
one). I'm not very familiar with kernel-/driver development and I'm not
sure what side-effects the change might introduce (I couldn't find any,
tested my fix up to kernel 3.3.1), hence I didn't submit a patch. I
wrote to the developer listed in the file but got no response (which is
okay to me, no worries). Now that I've shown the solution in a German
board I'm getting PMs of users with the same or similar keyboard asking
me how they can compile the kernel themselves to make their keyboard
working (so I assume this is not just some rare-used device).

Current state is, that the keyboard is still not working (last tested
kernel: 3.5.0). The keyboard works fine in BIOS and at the bootloader.
Within Linux no keys except for Backslash and the multimedia keys work.
xev shows output for backspace + the 5 multimedia keys. showkey on
the console works only for backspace. the approach using usbmon with
"7u" produces output for backspace and the multimedia keys. just to
verify I tried 0u with the same result: backspace + multimedia keys
work. All other keys aren't working.

dmesg/syslog reports: usage index exceeded

Hence I played around with HID_MAX_USAGES in include/linux/hid.h on
line 346 and I found out that a setting of 32K won't help. A setting
HIGHER than 32K (I would need to test again to give the exact value)
made the keyboard working - I've just changed it to 64K and all was
working as expected:

#define HID_MAX_USAGES 65534

If I plug the usb keyboard in, the following three devices are added in
"lsusb":

Bus 007 Device 006: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port
HUB Bus 007 Device 007: ID 1044:7a02 Chu Yuen Enterprise Co., Ltd
Bus 007 Device 008: ID 060b:2270 Solid Year