Skip to content

New device ID for K70 Lux 0x1b36 #529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hevanaa opened this issue Nov 26, 2016 · 12 comments
Open

New device ID for K70 Lux 0x1b36 #529

hevanaa opened this issue Nov 26, 2016 · 12 comments

Comments

@hevanaa
Copy link

hevanaa commented Nov 26, 2016

A new K70 LUX blue (not RGB) has device id 0x1b36. By default, ckb (compiled from the newdev branch) wasn't able to detect the keyboard. When changing (or adding) the ID to 0x1b36 in the correct places, ckb-daemon was able to identify the device and when manually starting the daemon, also the ckb GUI utility worked. Also the multimedia keys work at this point. The big issue is however that when booting, at the point where ckb-daemon is loading, the keyboard always stops working. The only way to get the daemon to work is to (including resetting the keyboard and booting from a powered off PC) boot in BIOS mode, login and then manually start the daemon. Correction! I have to unplug it, switch to scan mode, then plug it. If I leave it in BIOS mode, it will be recognized by the daemon, but it won't work.

Some info:

Operating system:
Fedora 24
Kernel 4.8.8

lsusb|grep Corsair
Bus 003 Device 005: ID 1b1c:1b36 Corsair

relevant info from dmesg:
[ 1.493216] usb 3-6: new full-speed USB device number 3 using xhci_hcd
[ 7.149040] usb 3-6: unable to read config index 0 descriptor/all
[ 7.149100] usb 3-6: can't read configurations, error -110
[ 7.304934] usb 3-6: new full-speed USB device number 5 using xhci_hcd
[ 7.474800] usb 3-6: New USB device found, idVendor=1b1c, idProduct=1b36
[ 7.474805] usb 3-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7.474807] usb 3-6: Product: Corsair Gaming K70 LUX Keyboard
[ 7.474810] usb 3-6: Manufacturer: Corsair
[ 7.474812] usb 3-6: SerialNumber: 16030015AEB89C4755BB595DF5001940
[ 7.476806] input: Corsair Corsair Gaming K70 LUX Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-6/3-6:1.0/0003:1B1C:1B36.0001/input/input6
[ 7.477138] hid-generic 0003:1B1C:1B36.0001: input,hidraw0: USB HID v1.11 Keyboard [Corsair Corsair Gaming K70 LUX Keyboard ] on usb-0000:00:14.0-6/input0

Adding usbhid.quirks=0x1B1C:0x1B36:0x20000408 doesn't help, keyboard only seems to stop working after the kernel loads, can't even use it in single mode.

For now the keyboard can be used in BIOS mode only. Of course multimedia keys don't work.

Could it be a problem with the USB protocol, or could this be easily patched somehow? I'll still try to debug the bootup problem.

@hevanaa
Copy link
Author

hevanaa commented Nov 26, 2016

OK, well then, I see when searching a little more that indeed 0x1b36 has been discussed. I'll try the workaround.

@hevanaa
Copy link
Author

hevanaa commented Nov 26, 2016

Doing the following change in usb.h didn't help:

#define P_K70_RFIRE 0x1b36
#define P_K70_RFIRE_STR "1b36"

It was basically the same thing I had tried already.

@hevanaa
Copy link
Author

hevanaa commented Nov 26, 2016

Another note. The Windows key doesn't work at all.

@hevanaa
Copy link
Author

hevanaa commented Nov 26, 2016

Of course, usbhid.quirks doesn't work with this device ID, because there is no support for it in the kernel. I tried adding to the kernel source and rebuilt the kernel:

drivers/hid/hid-ids.h:
#define USB_VENDOR_ID_CORSAIR 0x1b1c
#define USB_DEVICE_ID_CORSAIR_K70R 0x1b09
#define USB_DEVICE_ID_CORSAIR_K70LUX 0x1b36
#define USB_DEVICE_ID_CORSAIR_K95RGB 0x1b11

drivers/hid/usbhid/hid-quirks.c:
{ USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K70R, HID_QUIRK_NO_INIT_REPORTS },
{ USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K70LUX, HID_QUIRK_NO_INIT_REPORTS },
{ USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_M65RGB, HID_QUIRK_NO_INIT_REPORTS },
{ USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K95RGB, HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },

But I didn't notice any difference with:
usbhid.quirks=0x1B1C:0x1B36:0x20000408

Edit. I made some mistake here. Have to try to compile modules again.

Edit 2. Compiled a new kernel with these changes, but it seems that these changes are not enough. There are some other weird issues with this keyboard.

@hevanaa
Copy link
Author

hevanaa commented Nov 26, 2016

Added initial support for this keyboard #530

@hevanaa
Copy link
Author

hevanaa commented Nov 29, 2016

Updated keyboard firmware to 2.0.4 when I finally got a Windows PC connected to it. Now most things seem to work and the driver also works mostly (with my patched newdev branch). Scan mode can now be used. The right Windows key still doesn't work at all and its toggle button doesn't do anything. The ckb settings program freezes when clicking on certain things, e.g. key colors. I guess the keyboard is identified as an RGB keyboard, even though it is single color.

@Spencer-H
Copy link

Does your patch function with or without the kernel patch you posted here?

@hevanaa
Copy link
Author

hevanaa commented Dec 1, 2016

Works fine without the kernel patch. That was just me messing around when the keyboard didn't work. Most of the problems were due to the 1.x firmware. The 2.0.4 firmware is really required.

@tatokis
Copy link
Contributor

tatokis commented Dec 1, 2016 via email

@Spencer-H
Copy link

Spencer-H commented Dec 1, 2016 via email

@hevanaa
Copy link
Author

hevanaa commented Dec 2, 2016

Not exactly relevant for this issue, but I've created rpm packages of ckb for Fedora and Epel at https://copr.fedorainfracloud.org/coprs/johanh/ckb/

@Spencer-H
Copy link

Spencer-H commented Dec 2, 2016 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants