linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Solution to get Gigabyte K8100 Aivia USB Gaming Keyboard working in Linux
@ 2013-02-24 16:19 Jean-Michel Bruenn
  2013-02-24 17:04 ` Jean-Michel Bruenn
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Michel Bruenn @ 2013-02-24 16:19 UTC (permalink / raw)
  To: linux-input

Hello,

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

Thanks for your attention, I hope someone on this list is able to help
and make a fix so that this keyboard will work in newer kernels without
the requirement to manually higher the HID_MAX_USAGES and
recompile of the kernel.

If I can provide any further information, please let me know. I can
send debug output (just tell me the commands you're interested in) and
I can test fixes (just send me a patch).

Jean

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Solution to get Gigabyte K8100 Aivia USB Gaming Keyboard working in Linux
  2013-02-24 16:19 Solution to get Gigabyte K8100 Aivia USB Gaming Keyboard working in Linux Jean-Michel Bruenn
@ 2013-02-24 17:04 ` Jean-Michel Bruenn
  2013-02-26  8:38   ` Jean-Michel Bruenn
  0 siblings, 1 reply; 3+ messages in thread
From: Jean-Michel Bruenn @ 2013-02-24 17:04 UTC (permalink / raw)
  To: linux-input

Hello,

I just noticed something weird... It seems this keyboard has a gaming
mode and a "normal" mode. In "gaming" mode you have to higher the
MAX_HID_USAGES to get the keyboard to work...

...you can switch to normal mode by pressing: shift+ctrl+alt+n, which
makes the keyboard work in linux without the MAX_HID_USAGES highered to
64K (it took me nearly a year to find out...) - Wondering if that still
can be considered a bug which requires a fix?

To switch back you issue shift+ctrl+alt+g and the keys stop working.
Here's some more output from dmesg:

[ 2389.147309] usb 1-3.4: Manufacturer: KB
[ 2389.158002] input: KB USB Keyboard
as /devices/pci0000:00/0000:00:02.1/usb1/1-3/1-3.4/1-3.4:1.0/input/input9
[ 2389.158390] hid-generic 0003:060B:2270.000D: input,hidraw6: USB HID
v1.11 Keyboard [KB USB Keyboard] on usb-0000:00:02.1-3.4/input0
[ 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

Jean

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Solution to get Gigabyte K8100 Aivia USB Gaming Keyboard working in Linux
  2013-02-24 17:04 ` Jean-Michel Bruenn
@ 2013-02-26  8:38   ` Jean-Michel Bruenn
  0 siblings, 0 replies; 3+ messages in thread
From: Jean-Michel Bruenn @ 2013-02-26  8:38 UTC (permalink / raw)
  To: linux-input

Hey,

so the fix using shift+ctrl+alt+n works; However, I have to do that on
every boot. Is there some way to debug what happens if I press shift
+ctrl+alt+n / +g so that one could add a patch which allows the use of
this keyboard in linux without pressing shift+ctrl+alt+n? And should
the "gaming"-mode be fixed as well (would require to higher the
HID_MAX_USAGES value) would it be possible to add an if or something
(I'm not a kernel-/driver developer, so I really don't know if that's
bad practise or something) like "if keyboard == .. HID_MAX_USAGES.."
That'd solve the gaming-mode of the keyboard and it wouldn't require
the key-combo to make it work in Linux.

Thanks in advance,
jean

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-26  8:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-24 16:19 Solution to get Gigabyte K8100 Aivia USB Gaming Keyboard working in Linux Jean-Michel Bruenn
2013-02-24 17:04 ` Jean-Michel Bruenn
2013-02-26  8:38   ` Jean-Michel Bruenn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).