Testing again, thanks for being patient :)
(To note, i didn't unplug the keyboard before testing the latest revision, was running commit b37a519 at the time)
This time i checked out the latest revision (63ab888), compiled the code, copied the daemon as root to /usr/local/bin. Ran the daemon as root, keyboard connected with no issues.
ckb Corsair Keyboard RGB driver v0.0.6
Setting FPS to 60
Setting default layout: us
Root controller ready at /dev/input/ckb0
Connecting Corsair K95 RGB Gaming Keyboard (S/N: 0701B03EAE3618E3530D5E92F5001946)
Device ready at /dev/input/ckb1
^C
Caught signal 2
Disconnecting Corsair K95 RGB Gaming Keyboard (S/N: 0701B03EAE3618E3530D5E92F5001946)
Removed device path /dev/input/ckb1
Removed device path /dev/input/ckb0
I then killed the daemon as you can see above, and unplugged the keyboard.
Gave the keyboard about 30 seconds of being unplugged before re-connecting it.
Ran the daemon again, and this time it failed to connect.
Logs:
ckb Corsair Keyboard RGB driver v0.0.6
Setting FPS to 60
Setting default layout: us
Root controller ready at /dev/input/ckb0
Connecting Corsair K95 RGB Gaming Keyboard (S/N: 0701B03EAE3618E3530D5E92F5001946)
Error: usbdequeue (firmware.c:24): Operation not permitted
Error: usbdequeue (usb.c:71): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
^C
Caught signal 2
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (main.c:25): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (main.c:31): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (usb.c:80): Operation not permitted
Error: usbdequeue (main.c:41): Operation not permitted
Disconnecting Corsair K95 RGB Gaming Keyboard (S/N: 0701B03EAE3618E3530D5E92F5001946)
Error: usbdequeue (usb.c:80): Operation not permitted
Removed device path /dev/input/ckb1
Removed device path /dev/input/ckb0
Nov 26 16:23:31: [79798.615213] usb 8-1: USB disconnect, device number 8
Nov 26 16:23:32: [79798.890762] usb 8-1: new full-speed USB device number 9 using uhci_hcd
Nov 26 16:23:32: [79799.563990] usb 8-1: New USB device found, idVendor=1b1c, idProduct=1b11
Nov 26 16:23:32: [79799.563995] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 26 16:23:32: [79799.563999] usb 8-1: Product: Corsair K95 RGB Gaming Keyboard
Nov 26 16:23:32: [79799.564001] usb 8-1: Manufacturer: Corsair
Nov 26 16:23:32: [79799.564004] usb 8-1: SerialNumber: 0701B03EAE3618E3530D5E92F5001946
Nov 26 16:23:32: [79799.773081] input: Corsair Corsair K95 RGB Gaming Keyboard as /devices/pci0000:00/0000:00:1d.2/usb8/8-1/8-1:1.0/0003:1B1C:1B11.000E/input/input40
Nov 26 16:23:32: [79799.773385] hid-generic 0003:1B1C:1B11.000E: input,hidraw4: USB HID v1.11 Keyboard [Corsair Corsair K95 RGB Gaming Keyboard] on usb-0000:00:1d.2-1/input0
Nov 26 16:24:07: [79834.735410] usbhid 8-1:1.1: can't add hid device: -110
Nov 26 16:24:07: [79834.735433] usbhid: probe of 8-1:1.1 failed with error -110
Nov 26 16:24:42: [79869.700022] usbhid 8-1:1.2: can't add hid device: -110
Nov 26 16:24:42: [79869.700045] usbhid: probe of 8-1:1.2 failed with error -110
Nov 26 16:25:17: [79904.664643] usbhid 8-1:1.3: can't add hid device: -110
Nov 26 16:25:17: [79904.664665] usbhid: probe of 8-1:1.3 failed with error -110
Nov 26 16:25:17: [79904.743760] usb 8-1: Process 24781 (ckb-daemon) called USBDEVFS_CLEAR_HALT for active endpoint 0x81
Nov 26 16:25:32: [79919.729800] input: ckb1 as /devices/virtual/input/input41
Nov 26 16:25:33: [79920.228872] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 1 ret -110
Nov 26 16:25:33: [79920.379770] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:33: [79920.531604] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:33: [79920.683444] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79920.743369] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79920.803368] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79920.863221] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79920.923160] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79920.983159] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79920.803368] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79920.863221] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79920.923160] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79920.983159] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.043036] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.103059] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.162969] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.222910] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.282868] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.342774] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.406673] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.466690] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.526590] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.586537] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.646505] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:34: [79921.706387] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79921.766406] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79921.826350] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79921.886242] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79921.946200] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.010149] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.070008] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.130014] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.189874] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.249904] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.309814] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.369786] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.429767] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.489642] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.549589] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.609527] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.669460] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:35: [79922.729403] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79922.789335] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79922.849367] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79922.909209] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79922.969134] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79923.029034] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79923.089047] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79923.148963] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79923.208898] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79923.268837] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79923.328820] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79923.388731] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79923.448660] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:25:36: [79923.508573] usb 8-1: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Checked out 9c28b21, did the same thing. Tried running the daemon without unplugging the keyboard first, still didn't work.
Unplugged the keyboard and tested again, still no luck, same above logs.
Edit: Noticed the latest commit whilst typing / testing all this, checked out cbd0981 and i think we have a winner! :)
Didnt unplug the keyboard after the testing on 9c28b21. Ran the new daemon and instantly the keyboard came back up. Logs incase you're interested..
ckb Corsair Keyboard RGB driver v0.0.6
Setting FPS to 60
Setting default layout: us
Root controller ready at /dev/input/ckb0
Connecting Corsair K95 RGB Gaming Keyboard (S/N: 0701B03EAE3618E3530D5E92F5001946)
Error: usbdequeue (firmware.c:23): Operation not permitted
Error: usbdequeue (usb.c:71): Operation not permitted
Error: usbdequeue (usb.c:79): Operation not permitted
Error: usbdequeue (profile.c:249): Operation not permitted
Failed to set up device, trying to reset...
Reset success
Device ready at /dev/input/ckb1
Nov 26 16:57:17: [81821.862265] usbhid 8-2:1.1: can't add hid device: -110
Nov 26 16:57:17: [81821.862282] usbhid: probe of 8-2:1.1 failed with error -110
Nov 26 16:57:17: [81821.862368] usb 8-2: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:59:20: [81944.736254] usb 8-2: Process 25301 (ckb-daemon) called USBDEVFS_CLEAR_HALT for active endpoint 0x81
Nov 26 16:59:25: [81949.732865] usb 8-2: Process 25301 (ckb-daemon) called USBDEVFS_CLEAR_HALT for active endpoint 0x82
Nov 26 16:59:30: [81954.727797] usb 8-2: Process 25301 (ckb-daemon) called USBDEVFS_CLEAR_HALT for active endpoint 0x83
Nov 26 16:59:35: [81959.723128] input: ckb1 as /devices/virtual/input/input47
Nov 26 16:59:35: [81960.222299] usb 8-2: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 1 ret -110
Nov 26 16:59:35: [81960.273167] usb 8-2: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:59:35: [81960.425147] usb 8-2: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:59:35: [81960.481008] usb 8-2: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:59:35: [81960.636858] usb 8-2: usbfs: USBDEVFS_CONTROL failed cmd ckb-daemon rqt 33 rq 9 len 64 ret -110
Nov 26 16:59:36: [81960.951975] usb 8-2: reset full-speed USB device number 11 using uhci_hcd
I unplugged the keyboard to try the driver from scratch again and everything worked fine!
So i suspect the issue is resolved for now, just needed some brute force love :P
Many thanks :)