Bug 196053 - Redragon Asura USB keyboard maps all modifier keys to left shift
Summary: Redragon Asura USB keyboard maps all modifier keys to left shift
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-13 08:56 UTC by Robert Munteanu
Modified: 2019-04-09 08:59 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.11.3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
rdesc output for first HID device (14.41 KB, text/plain)
2017-06-13 08:59 UTC, Robert Munteanu
Details
rdesc output for second HID device (57.30 KB, text/plain)
2017-06-13 09:01 UTC, Robert Munteanu
Details

Description Robert Munteanu 2017-06-13 08:56:36 UTC
I have started using a Redragon Asura Keyboard [1]. All modifier keys are mapped as left shift.

When plugged in I have the following in the kernel log

[185765.848957] input: USB Keyboard as
/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:0C45:760B.0022/input/input50
[185765.905395] hid-generic 0003:0C45:760B.0022: input,hidraw3: USB
HID v1.11 Keyboard [USB Keyboard] on usb-0000:00:14.0-3/input0
[185765.949342] input: USB Keyboard as
Fwd: Redragon Asura Keyboard - All Shift, Ctrl, Alt, Win keys function
as left shift/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.1/0003:0C45:760B.0023/input/input51
[185766.009474] hid-generic 0003:0C45:760B.0023:
input,hiddev0,hidraw4: USB HID v1.11 Keyboard [USB Keyboard] on
usb-0000:00:14.0-3/input1

The first input device sends absolutely no input, the second one sends
all the input.

With evtest, all modifier keys produce the following output:

Event: time 1497272760.897616, type 4 (EV_MSC), code 4 (MSC_SCAN), value 700e1
Event: time 1497272760.897616, type 1 (EV_KEY), code 42 (KEY_LEFTSHIFT), value 1

In sys/kernel/debug/hid I have two entries:

- 0003:0C45:760B.0037
- 0003:0C45:760B.0038

I will attach the rdesc files, but according to [2] the key mappings are correct.

I've taken the hexdump output when pressing the affected keys. The
keypresses, in order, were:

- Left Shift
- Left Ctrl
- Win
- Left Alt
- Right Alt
- Right Ctrl
- Right Shift

00000000  04 00 00 00 00 00 00 00  04 02 00 00 00 00 00 00  |................|
00000010  04 00 00 00 00 00 00 00  04 01 00 00 00 00 00 00  |................|
00000020  04 00 00 00 00 00 00 00  04 08 00 00 00 00 00 00  |................|
00000030  04 00 00 00 00 00 00 00  04 04 00 00 00 00 00 00  |................|
00000040  04 00 00 00 00 00 00 00  04 40 00 00 00 00 00 00  |.........@......|
00000050  04 00 00 00 00 00 00 00  04 10 00 00 00 00 00 00  |................|
00000060  04 00 00 00 00 00 00 00  04 20 00 00 00 00 00 00  |......... ......|

Note that similar issues were reported and fixed with a custom driver for an Azio Keyboard [3]. That keyboard has the same vendor id ( 0x0C45 ) but a different product id ( 0x7603 ) - this keyboard has 0x760B . The driver did not work for me with a mechanical find/replace of the product id.


[1]: http://redragonusa.com/product/asura/index.html
[2]: https://unix.stackexchange.com/a/370653/2235
[3]: https://bitbucket.org/Swoogan/aziokbd
Comment 1 Robert Munteanu 2017-06-13 08:59:08 UTC
Created attachment 256975 [details]
rdesc output for first HID device
Comment 2 Robert Munteanu 2017-06-13 09:01:33 UTC
Created attachment 256977 [details]
rdesc output for second HID device
Comment 3 Ethan Plant 2017-07-11 18:37:51 UTC
Using the same keyboard model on Arch Linux (Kernal version 4.10.9-1) and this problem also occurs.
Comment 4 Robert Munteanu 2017-07-11 18:49:39 UTC
(In reply to Ethan Plant from comment #3)
> Using the same keyboard model on Arch Linux (Kernal version 4.10.9-1) and
> this problem also occurs.

I posted a RFC patch at [1] which works for me, with minor limitations. Is there any chance you could try it on your system?

[1]: http://www.spinics.net/lists/linux-input/msg51896.html
Comment 5 Ethan Plant 2017-07-11 19:32:25 UTC
(In reply to Robert Munteanu from comment #4)
> (In reply to Ethan Plant from comment #3)
> > Using the same keyboard model on Arch Linux (Kernal version 4.10.9-1) and
> > this problem also occurs.
> 
> I posted a RFC patch at [1] which works for me, with minor limitations. Is
> there any chance you could try it on your system?
> 
> [1]: http://www.spinics.net/lists/linux-input/msg51896.html

I'd be glad to but just one really noob question first.

How would I go about installing the RFC patch on my system? Sorry about the stupid question I've just never worked with RFC patches before.
Comment 6 Robert Munteanu 2017-07-11 19:42:21 UTC
(In reply to Ethan Plant from comment #5)
> (In reply to Robert Munteanu from comment #4)
> > (In reply to Ethan Plant from comment #3)
> > > Using the same keyboard model on Arch Linux (Kernal version 4.10.9-1) and
> > > this problem also occurs.
> > 
> > I posted a RFC patch at [1] which works for me, with minor limitations. Is
> > there any chance you could try it on your system?
> > 
> > [1]: http://www.spinics.net/lists/linux-input/msg51896.html
> 
> I'd be glad to but just one really noob question first.
> 
> How would I go about installing the RFC patch on my system? Sorry about the
> stupid question I've just never worked with RFC patches before.

RFC means request for comments. Since this patch changes the kernel you would need to

- get the sources for your kernel
- apply the patch
- rebuild the kernel
- install it

I am not an Arch user, but the instructions seem to be at [1]

[1]: https://wiki.archlinux.org/index.php/Kernels#Patches_and_Patchsets
Comment 7 Robert Munteanu 2019-04-09 08:59:55 UTC
The fix was merged for 4.18, see https://github.com/torvalds/linux/commit/85455dd906d568d5a42d9365938fbf82e932e2b8

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