kiibohd / controller

Kiibohd Controller
GNU General Public License v3.0
810 stars 274 forks source link

Slow initialization and /dev/ttyACM0 no longer available after flashing with updated controller #396

Open patrickdepinguin opened 2 years ago

patrickdepinguin commented 2 years ago
  1. USB initialization is very slow. On the original firmware I could plug the keyboard and start typing within a second. With the updated firmware, it takes more than 10 seconds before I can type. In 'dmesg' output you see that some of the HID devices are very slow to come up.

With the original firmware: (dmesg -H, showing delta timestamps)

[  +0.250161] usb 1-4: new full-speed USB device number 34 using xhci_hcd
[  +0.128011] usb 1-4: New USB device found, idVendor=308f, idProduct=000f, bcdDevice= 3.91
[  +0.000009] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000004] usb 1-4: Product: Keyboard - Infinity_60_LED:alphabet PixelMap USB
[  +0.000002] usb 1-4: Manufacturer: Input Club
[  +0.000003] usb 1-4: SerialNumber: FFFFFFFFFFFF0029000E001224404E45 - mk20dx128
[  +0.004977] input: Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:308F:000F.0056/input/input126
[  +0.053157] hid-generic 0003:308F:000F.0056: input,hidraw4: USB HID v1.11 Keyboard [Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB] on usb-0000:00:14.0-4/input0
[  +0.001491] input: Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1/0003:308F:000F.0057/input/input127
[  +0.052526] hid-generic 0003:308F:000F.0057: input,hidraw5: USB HID v1.11 Keyboard [Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB] on usb-0000:00:14.0-4/input1
[  +0.001396] input: Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.2/0003:308F:000F.0058/input/input128
[  +0.051863] input: Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.2/0003:308F:000F.0058/input/input129
[  +0.000467] hid-generic 0003:308F:000F.0058: input,hidraw6: USB HID v1.11 Device [Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB] on usb-0000:00:14.0-4/input2
[  +0.001011] cdc_acm 1-4:1.3: ttyACM0: USB ACM device
[  +0.002022] hid-generic 0003:308F:000F.0059: hiddev99,hidraw7: USB HID v1.11 Device [Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB] on usb-0000:00:14.0-4/input5
[  +0.002261] input: Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.6/0003:308F:000F.005A/input/input130
[  +0.052666] hid-generic 0003:308F:000F.005A: input,hidraw8: USB HID v1.11 Mouse [Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB] on usb-0000:00:14.0-4/input6

with the updated firmware:

[  +0.249314] usb 1-4: new full-speed USB device number 32 using xhci_hcd
[  +0.129555] usb 1-4: New USB device found, idVendor=308f, idProduct=000f, bcdDevice= 4.f6
[  +0.000018] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000008] usb 1-4: Product: Keyboard - Infinity_60_LED:alphabet PixelMap USB
[  +0.000006] usb 1-4: Manufacturer: Input Club
[  +0.000005] usb 1-4: SerialNumber: FFFFFFFFFFFF0029000E001224404E45 - mk20dx128
[  +0.005642] input: Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:308F:000F.0051/input/input122
[  +0.052637] hid-generic 0003:308F:000F.0051: input,hidraw4: USB HID v1.11 Keyboard [Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB] on usb-0000:00:14.0-4/input0
[  +0.001780] input: Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.1/0003:308F:000F.0052/input/input123
[  +0.052491] hid-generic 0003:308F:000F.0052: input,hidraw5: USB HID v1.11 Keyboard [Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB] on usb-0000:00:14.0-4/input1
[  +0.001819] input: Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.2/0003:308F:000F.0053/input/input124
[  +0.052212] hid-generic 0003:308F:000F.0053: input,hidraw6: USB HID v1.11 Device [Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB] on usb-0000:00:14.0-4/input2
[  +5.166210] input: Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB as /devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.3/0003:308F:000F.0054/input/input125
[  +0.000225] hid-generic 0003:308F:000F.0054: input,hidraw7: USB HID v1.11 Mouse [Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB] on usb-0000:00:14.0-4/input3
[  +5.121160] hid-generic 0003:308F:000F.0055: hiddev99,hidraw8: USB HID v1.11 Device [Input Club Keyboard - Infinity_60_LED:alphabet PixelMap USB] on usb-0000:00:14.0-4/input4

Notice twice a 5 second delay.

  1. The second problem I encounter is that the /dev/ttyACM0 device is no longer present with the updated firmware. In the dmesg output for the original firmware, you could see: cdc_acm 1-4:1.3: ttyACM0: USB ACM device and with the new one this line is not present. I found some references to a new debug protocol HID-IO and the old mechanism removed from the repo, but it is not clear to me how to access the CLI using this new protocol. Should it still show a /dev/ttyACM0 device? Or does it work differently? I could not find references to this in the documentation or commits. I have checked the kernel config options related to HID and although I'm not sure what could be additionally required, the enabled set seems correct.

For the moment I stepped back to the original firmware, but it would be great to sort these issues out.