ccMSC / ckb

RGB Driver for Linux and OS X
http://forum.corsair.com/v3/showthread.php?t=133929
GNU General Public License v2.0
1.34k stars 170 forks source link

ckb-daemon crashes consistently upon service restart, based on BIOS timing setting #610

Open MadMartian opened 7 years ago

MadMartian commented 7 years ago

I was troubleshooting the well-known unresponsive / undetected Corsair keyboard issue when suddenly it started working. It looks like the operating system eventually detected the keyboard (typing on it right now, the K70), but the animations aren't working because CKB daemon isn't working. I tried sudo service ckb-daemon restart and it consistently segfaults. So the keyboard is working, CKB daemon is not. The CKB front-end GUI loads-up but does not detect anything (naturally).

K70 firmware: v2.04 (I think) K70 BIOS timing setting: 8 OS: Kubuntu 16.04 Kernel: 4.10.0-33-generic GRUB_CMDLINE_LINUX_DEFAULT: "quiet splash usbhid.quirks=0x1B1C:0x1B13:0x20000408"

dmesg:

[ 152.377626] usb 3-10: new full-speed USB device number 10 using xhci_hcd [ 157.533946] usb 3-10: unable to read config index 0 descriptor/all [ 157.533949] usb 3-10: can't read configurations, error -110
[ 157.653867] usb 3-10: new full-speed USB device number 11 using xhci_hcd [ 162.910241] usb 3-10: unable to read config index 0 descriptor/all [ 162.910244] usb 3-10: can't read configurations, error -110
[ 163.030180] usb 3-10: new full-speed USB device number 12 using xhci_hcd [ 168.286553] usb 3-10: unable to read config index 0 descriptor/all [ 168.286556] usb 3-10: can't read configurations, error -110
[ 168.406486] usb 3-10: new full-speed USB device number 13 using xhci_hcd [ 173.663248] usb 3-10: unable to read config index 0 descriptor/all [ 173.663251] usb 3-10: can't read configurations, error -110
[ 173.663264] usb usb3-port10: unable to enumerate USB device
[ 191.433553] usb 3-10: new full-speed USB device number 14 using xhci_hcd [ 196.706225] usb 3-10: unable to read config index 0 descriptor/all [ 196.706227] usb 3-10: can't read configurations, error -110
[ 196.826165] usb 3-10: new full-speed USB device number 15 using xhci_hcd ^T[ 202.082777] usb 3-10: unable to read config index 0 descriptor/all [ 202.082779] usb 3-10: can't read configurations, error -110
[ 202.202727] usb 3-10: new full-speed USB device number 16 using xhci_hcd ^T[ 212.579815] usb 3-10: string descriptor 0 read error: -110
[ 212.579820] usb 3-10: New USB device found, idVendor=1b1c, idProduct=1b13 [ 212.579821] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 217.704545] usb 3-10: can't set config #1, error -110 [ 228.937049] usb 3-10: USB disconnect, device number 16 [ 229.233265] usb 3-10: new full-speed USB device number 17 using xhci_hcd [ 234.597798] usb 3-10: unable to read config index 0 descriptor/all [ 234.597801] usb 3-10: can't read configurations, error -110
[ 234.717736] usb 3-10: new full-speed USB device number 18 using xhci_hcd [ 239.974241] usb 3-10: unable to read config index 0 descriptor/all [ 239.974243] usb 3-10: can't read configurations, error -110
[ 240.094168] usb 3-10: new full-speed USB device number 19 using xhci_hcd [ 250.471061] usb 3-10: unable to read config index 0 descriptor/start: -110 [ 250.471063] usb 3-10: can't read configurations, error -110
[ 250.595035] usb 3-10: new full-speed USB device number 20 using xhci_hcd [ 255.847507] usb 3-10: unable to read config index 0 descriptor/all [ 255.847510] usb 3-10: can't read configurations, error -110
[ 255.847524] usb usb3-port10: unable to enumerate USB device
[ 267.056344] usb 3-10: new full-speed USB device number 21 using xhci_hcd [ 277.353174] usb 3-10: unable to read config index 0 descriptor/start: -110 [ 277.353176] usb 3-10: can't read configurations, error -110
[ 277.473126] usb 3-10: new full-speed USB device number 22 using xhci_hcd [ 282.729573] usb 3-10: unable to read config index 0 descriptor/all [ 282.729576] usb 3-10: can't read configurations, error -110
[ 282.853538] usb 3-10: new full-speed USB device number 23 using xhci_hcd [ 288.105989] usb 3-10: unable to read config index 0 descriptor/all [ 288.105991] usb 3-10: can't read configurations, error -110
[ 288.225957] usb 3-10: new full-speed USB device number 24 using xhci_hcd [ 288.247501] usb 3-10: New USB device found, idVendor=1b1c, idProduct=1b13 [ 288.247502] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 288.247503] usb 3-10: Product: Corsair K70 RGB Gaming Keyboard [ 288.247504] usb 3-10: Manufacturer: Corsair [ 288.247504] usb 3-10: SerialNumber: 0E01901BAE3E148853B3C74FF5001943 [ 288.248832] input: Corsair Corsair K70 RGB Gaming Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.0/0003:1B1C:1B13.0006/input/input21 [ 288.249023] hid-generic 0003:1B1C:1B13.0006: input,hidraw5: USB HID v1.11 Keyboard [Corsair Corsair K70 RGB Gaming Keyboard ] on usb-0000:00:14.0-10/input0 [ 288.430219] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input22 [ 288.430910] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input23 [ 288.431091] ckb-daemon[4799]: segfault at 7f230000009d ip 00000000004093eb sp 00007f238fffee80 error 6 in ckb-daemon[400000+19000]
[ 401.411208] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input24 [ 401.411545] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input25 [ 401.411633] ckb-daemon[5028]: segfault at 7fa60000009d ip 00000000004093eb sp 00007fa6477ebe80 error 6 in ckb-daemon[400000+19000]
[ 414.775577] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input26 [ 414.775947] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input27 [ 414.776178] ckb-daemon[5109]: segfault at 7fc80000009d ip 00000000004093eb sp 00007fc8af3f5e80 error 6 in ckb-daemon[400000+19000]
[ 415.750404] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input28 [ 415.750685] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input29 [ 415.750782] ckb-daemon[5178]: segfault at 7fa00000009d ip 00000000004093eb sp 00007fa01c835e80 error 6 in ckb-daemon[400000+19000]
[ 416.304387] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input30 [ 416.304727] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input31 [ 416.304929] ckb-daemon[5247]: segfault at 7f670000009d ip 00000000004093eb sp 00007f67cbffee80 error 6 in ckb-daemon[400000+19000] [ 431.634345] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input32 [ 431.634688] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input33 [ 431.634844] ckb-daemon[5341]: segfault at 7f040000009d ip 00000000004093eb sp 00007f0463e0fe80 error 6 in ckb-daemon[400000+19000] [ 837.891483] usb 3-10: USB disconnect, device number 24 [ 1128.621992] usb 3-10: new full-speed USB device number 25 using xhci_hcd [ 1134.014691] usb 3-10: unable to read config index 0 descriptor/all [ 1134.014693] usb 3-10: can't read configurations, error -110 [ 1134.134624] usb 3-10: new full-speed USB device number 26 using xhci_hcd [ 1134.276026] usb 3-10: New USB device found, idVendor=1b1c, idProduct=1b13 [ 1134.276027] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1134.276028] usb 3-10: Product: Corsair K70 RGB Gaming Keyboard [ 1134.276029] usb 3-10: Manufacturer: Corsair [ 1134.276029] usb 3-10: SerialNumber: 0E01901BAE3E148853B3C74FF5001943 [ 1134.277356] input: Corsair Corsair K70 RGB Gaming Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.0/0003:1B1C:1B13.0007/input/input34 [ 1134.277660] hid-generic 0003:1B1C:1B13.0007: input,hidraw5: USB HID v1.11 Keyboard [Corsair Corsair K70 RGB Gaming Keyboard ] on usb-0000:00:14.0-10/input0 [ 1147.016650] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input35 [ 1147.017021] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input36 [ 1147.017333] ckb-daemon[6867]: segfault at 7f0d0000009d ip 00000000004093eb sp 00007f0d8cecee80 error 6 in ckb-daemon[400000+19000] [ 1183.492611] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input37 [ 1183.493032] input: ckb1: Corsair K70 RGB Gaming Keyboard as /devices/virtual/input/input38 [ 1183.493170] ckb-daemon[6997]: segfault at 7f3f0000009d ip 00000000004093eb sp 00007f3f00ce4e80 error 6 in ckb-daemon[400000+19000] [ 1235.609698] usb 3-10: USB disconnect, device number 26 [ 1238.302173] usb 3-10: new full-speed USB device number 27 using xhci_hcd [ 1238.443594] usb 3-10: New USB device found, idVendor=1b1c, idProduct=1b13 [ 1238.443595] usb 3-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1238.443596] usb 3-10: Product: Corsair K70 RGB Gaming Keyboard [ 1238.443597] usb 3-10: Manufacturer: Corsair [ 1238.443597] usb 3-10: SerialNumber: 0E01901BAE3E148853B3C74FF5001943 [ 1238.444848] input: Corsair Corsair K70 RGB Gaming Keyboard as /devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.0/0003:1B1C:1B13.0008/input/input39 [ 1238.444978] hid-generic 0003:1B1C:1B13.0008: input,hidraw5: USB HID v1.11 Keyboard [Corsair Corsair K70 RGB Gaming Keyboard ] on usb-0000:00:14.0-10/input0 [ 1252.780657] usb 3-2: USB disconnect, device number 2 [ 1252.780658] usb 3-2.4: USB disconnect, device number 4

There may be some confusion here because this report is interleaved with log entries related to my Logitech wireless headset device.

I decided to troubleshoot further and changed the BIOS timing setting from 8 to 1, unplugged and then plugged in the keyboard, and ckb-daemon restarted this time without issues. So now the keyboard and the animations are working perfectly. Would be nice to improve the error logging for this scenario if this is definitively caused by the BIOS timing setting (seems to be the case).

Ravenslofty commented 6 years ago

Please try this with ckb-next, and file an issue there if the problem persists.