Bug 928561 - Gaming USB Keyboard Genius GX Imperator - multimedia keys not working
Gaming USB Keyboard Genius GX Imperator - multimedia keys not working
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
19
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Benjamin Tissoires
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-27 19:08 EDT by Honza Brázdil
Modified: 2013-10-02 21:11 EDT (History)
7 users (show)

See Also:
Fixed In Version: kernel-3.10.13-101.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-30 21:58:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
relevant output of # lsusb -v (8.54 KB, text/plain)
2013-07-11 18:23 EDT, Honza Brázdil
no flags Details
output of # lsusb -v (14.15 KB, text/plain)
2013-07-12 04:17 EDT, Honza Brázdil
no flags Details
hid-recorder /dev/hidraw2 (1.86 KB, text/plain)
2013-07-12 05:14 EDT, Honza Brázdil
no flags Details
hid-recorder /dev/hidraw3 (935 bytes, text/plain)
2013-07-12 05:15 EDT, Honza Brázdil
no flags Details
hid-recorder /dev/hidraw4 (47.08 KB, text/plain)
2013-07-12 05:15 EDT, Honza Brázdil
no flags Details

  None (edit)
Description Honza Brázdil 2013-03-27 19:08:34 EDT
I have Gaming USB Keyboard Genius GX Imperator and multimedia and macro keys are not working. 
I tried xev and showkey programs to detect keycodes of the multimedia/macro keys but none was detected.

I tried to get some information I though would be useful. Is there some more information I can provide?

$ lsusb 
Bus 003 Device 004: ID 0458:4018 KYE Systems Corp. (Mouse Systems)

$ uname -a
Linux janinko-privat 3.8.4-202.fc18.x86_64 #1 SMP Thu Mar 21 17:02:20 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ tail /var/log/messages
Mar 28 00:02:22 janinko-privat kernel: [11834.572846] usb 3-4: USB disconnect, device number 3
Mar 28 00:02:28 janinko-privat kernel: [11841.100084] usb 3-4: new full-speed USB device number 4 using xhci_hcd
Mar 28 00:02:28 janinko-privat kernel: [11841.118553] usb 3-4: New USB device found, idVendor=0458, idProduct=4018
Mar 28 00:02:28 janinko-privat kernel: [11841.118557] usb 3-4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Mar 28 00:02:28 janinko-privat kernel: [11841.118560] usb 3-4: Product: Imperator
Mar 28 00:02:28 janinko-privat kernel: [11841.122511] input: Imperator as /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.0/input/input14
Mar 28 00:02:28 janinko-privat kernel: [11841.122821] hid-generic 0003:0458:4018.0008: input,hidraw2: USB HID v1.10 Keyboard [Imperator] on usb-0000:00:14.0-4/input0
Mar 28 00:02:28 janinko-privat kernel: [11841.128972] hid-generic 0003:0458:4018.0009: usage index exceeded
Mar 28 00:02:28 janinko-privat kernel: [11841.128977] hid-generic 0003:0458:4018.0009: item 0 2 2 2 parsing failed
Mar 28 00:02:28 janinko-privat kernel: [11841.128993] hid-generic: probe of 0003:0458:4018.0009 failed with error -22
Mar 28 00:02:28 janinko-privat kernel: [11841.131563] input: Imperator as /devices/pci0000:00/0000:00:14.0/usb3/3-4/3-4:1.2/input/input15
Mar 28 00:02:28 janinko-privat kernel: [11841.131874] hid-generic 0003:0458:4018.000A: input,hidraw3: USB HID v1.10 Keyboard [Imperator] on usb-0000:00:14.0-4/input2
Mar 28 00:02:28 janinko-privat mtp-probe: checking bus 3, device 4: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4"
Mar 28 00:02:28 janinko-privat mtp-probe: bus: 3, device: 4 was not an MTP device
Comment 1 Honza Brázdil 2013-07-11 06:15:47 EDT
Fedora 19 - still not working. Is there anything I can do to make it working?

$ uname -a
Linux janinko-privat 3.9.9-301.fc19.x86_64 #1 SMP Thu Jul 4 15:10:36 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Comment 2 Benjamin Tissoires 2013-07-11 09:06:34 EDT
I just solved the same problem on bug #959721. However, I need a way for you to dump the full report descriptors. Once I have them, I will be able to write the same fix for your device.

As hid-generic is failing, I need you to follow these steps:
 1. Locate the device in USB/HID
go to /sys/bus/usb/drivers/usbhid
use the Sysfs lines from /proc/bus/input/devices to identify which file names of the form 2-1:1.0 correspond to your device (the folders containing 0003:0458:4018.XXXX).

2. Release the device from USB/HID
for every of these, do echo 2-1:1.0 > unbind. Of course, 2-1:1.0 is just an example. Be careful not to include any trailing / in the file name.
check that your device has disappeared from the directory

3. Retrieve the description of the device
type lsusb -v > /tmp/descriptors.txt

4. unplug/replug the keyboard to make it work again

If you can get the reports (i.e. no "Report Descriptors: ** UNAVAILABLE **") in the output of lsusb -v, I should be able to do the proper patch.
Comment 3 Honza Brázdil 2013-07-11 18:23:37 EDT
Created attachment 772456 [details]
relevant output of # lsusb -v

I believe this is the relevant part of the lsusb -v output.
Comment 4 Benjamin Tissoires 2013-07-12 03:48:35 EDT
(In reply to Honza Brázdil from comment #3)
> I believe this is the relevant part of the lsusb -v output.

Nearly :)
I have got the two report descriptors from the working interfaces, but I am missing the reports from the second interface:

          wDescriptorLength     131
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:

There should be one device in usbhid still attached.
Comment 5 Honza Brázdil 2013-07-12 04:17:39 EDT
Created attachment 772571 [details]
output of # lsusb -v

Sorry, the second interface didn't show up in /proc/bus/input/devices so i missed it.
Comment 6 Benjamin Tissoires 2013-07-12 04:49:14 EDT
Thanks for the new lsusb.

I made a patch [1] for you to test.

After cloning, just run "make ; sudo make install". Then unplug / replug the keyboard.

The kye module should handle the device and you should see in your dmesg something like:
[ 8474.687051] kye 0003:0458:4018.0022: fixing up Genius Gx Imperator Keyboard report descriptor
[ 8474.687568] input: KYE Systems Corp. (Mouse Systems)  Imperator as /devices/virtual/misc/uhid/input47
[ 8474.688106] kye 0003:0458:4018.0022: input,hidraw5: USB HID v0.00 Mouse [KYE Systems Corp. (Mouse Systems)  Imperator] on 

If so, I'd like you to record some traces of the 3 hidraw devices attached to your keyboard thanks to hid-recorder [2]. I need them in case we made a deep change in the hid subsystem, so that we can replay the events and check if everything is fine.

Thanks!


[1] https://github.com/bentiss/hid-kye
[2] http://bentiss.github.io/hid-replay-docs/
Comment 7 Honza Brázdil 2013-07-12 05:14:57 EDT
Created attachment 772605 [details]
hid-recorder /dev/hidraw2
Comment 8 Honza Brázdil 2013-07-12 05:15:26 EDT
Created attachment 772606 [details]
hid-recorder /dev/hidraw3
Comment 9 Honza Brázdil 2013-07-12 05:15:58 EDT
Created attachment 772607 [details]
hid-recorder /dev/hidraw4
Comment 10 Honza Brázdil 2013-07-12 05:26:51 EDT
Thanks, the multimedia keys are now working. But xev didn't captured anything when I pressed macro keys (but they aren't so important).

The hidraw2 reacted to macro preset keys, macro keys and right-click-key (next to right ctrl).

The hidraw3 reacted to multimedia keys and macro preset keys.

The hidraw4 reacted to macro preset keys and normal keyboard keys.
Comment 11 Benjamin Tissoires 2013-07-12 08:31:53 EDT
Thanks for the feedback.

I took some time to investigate the non-working macros, and I believe they are not working because they are not set by the Windows driver :)

In the hidraw3 file you sent, they just send a null pointer motion event, in addition to a vendor specific event.

In the hidraw2 file, macros are sending out of range events that are not documented in the spec. So having the macro keys working will be more effort.

Anyway, I'll still send my current patch upstream so that we can include it in Fedora.
Comment 12 Benjamin Tissoires 2013-07-15 04:36:04 EDT
Link to the upstream commit:
http://git.kernel.org/cgit/linux/kernel/git/jikos/hid.git/commit/?h=for-3.12/upstream&id=0adb9c2c5ed42f199cb2a630c37d18dee385fae2

It will land in v3.12.
Comment 13 Josh Boyer 2013-09-18 16:39:53 EDT
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 19 kernel bugs.

Fedora 19 has now been rebased to 3.11.1-200.fc19.  Please test this kernel update and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you experience different issues, please open a new bug report for those.
Comment 14 Benjamin Tissoires 2013-09-18 16:46:32 EDT
This bug has been fixed in upstream commit 0adb9c2c5ed42f199cb2a630c37d18dee385fae2

It will land in a 3.12 kernel (it is already in 3.12-rc1), so 3.11 does not ship it.
Comment 15 Josh Boyer 2013-09-18 16:47:49 EDT
We'll look at backporting that.
Comment 16 Josh Boyer 2013-09-20 10:16:54 EDT
Added this to F18-F20.
Comment 17 Fedora Update System 2013-09-27 17:43:21 EDT
kernel-3.11.2-201.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/kernel-3.11.2-201.fc19
Comment 18 Fedora Update System 2013-09-28 16:45:29 EDT
kernel-3.10.13-101.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/kernel-3.10.13-101.fc18
Comment 19 Fedora Update System 2013-09-28 21:22:32 EDT
Package kernel-3.11.2-201.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing kernel-3.11.2-201.fc19'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-17865/kernel-3.11.2-201.fc19
then log in and leave karma (feedback).
Comment 20 Fedora Update System 2013-09-30 12:28:50 EDT
kernel-3.11.2-301.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/kernel-3.11.2-301.fc20
Comment 21 Fedora Update System 2013-09-30 21:58:05 EDT
kernel-3.11.2-201.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 22 Fedora Update System 2013-10-02 02:36:54 EDT
kernel-3.11.2-301.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 23 Fedora Update System 2013-10-02 21:11:38 EDT
kernel-3.10.13-101.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.