kiibohd / controller

Kiibohd Controller
GNU General Public License v3.0
807 stars 270 forks source link

K-Type keys not working randomly on OSX #302

Closed manno closed 5 years ago

manno commented 5 years ago
cd Keyboards
pipenv run ./k-type.bash
dfu-util -D darwin18.K-Type.gcc.make/kiibohd.dfu.bin

Keyboard works with Linux, typing problems occur only with OSX:

dmesg show several lines like:

039287.539794 IOUSBHostHIDDevice: IOUSBHostHIDDevice::interruptReadComplete: IO error 0xe00002ed, 8 retries remaining
haata commented 5 years ago

Interesting.

@manno which version of macOS are you running? And is this a MacBook? (if so which model?)

It's a bit unlikely, but it may also be the USB cable.

Will test this when I get home (I have a K-Type on my desk and a 13" 2017 MacBook Pro that I can test this on).

manno commented 5 years ago

It's a 2016 MacBook Pro with 10.14.2. I tried three different cables. Thanks!

haata commented 5 years ago

I've confirmed this is an issue on my 2017 MacBook Pro (13"), macOS 10.14.1.

In addition to K-Type, this also affects WhiteFox, Ergodox and IC60. Working on a fix now.

haata commented 5 years ago

I'm not entirely certain the cause of the issue yet (likely some USB endpoint and interface mappings between the Kinetis and SAM4S MCUs) but this commit fixed the issue.

https://github.com/kiibohd/controller/commit/e7b5587a220a11afd946dbab9dd89bc48bbd78d6

Thanks so much for reporting this, took me most of the day to isolate the issue due to how odd the failure mode was. The keyboard wouldn't crash, the OS wouldn't initialize the keyboard so it would try to reset the keyboard and try again. It would be possible to type a few characters during this time so you could get some letters in, but then the port would be reset again. And so on.

When I do re-enable RawIO (currently unused), I'll get to the bottom of the mappings.

manno commented 5 years ago

Thanks! 🎉