Skip to content
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

Random sticky/unresponsive #91

Open
postelrich opened this issue Mar 7, 2018 · 11 comments
Open

Random sticky/unresponsive #91

postelrich opened this issue Mar 7, 2018 · 11 comments

Comments

@postelrich
Copy link

A few times a day the keyboard becomes unresponsive or a key gets stuck. Unplugging and plugging back in the usb usually fixes it. Working off my configuration here: https://github.com/postelrich/ergodox-firmware/tree/master/src/keyboard/dactyl

@postelrich
Copy link
Author

Had to stop using my dactyl it got so bad, changed jobs and now using a windows pc, happens like 30 times a day.

@benblazak
Copy link
Owner

didn't see a way to view a diff of all your changes at once... but it kind of sounds like a hardware issue to me. though there is a chance that the code is getting stuck somewhere... like in the i2c stuff, or in one of your layout changes. there's very little data that comes back to the keyboard from the OS -- i think it's just the states of the 3 LEDs -- and the USB stack should work (the person who wrote it knows much more than i do about these things lol), so i wouldn't think it was anything there. i don't really have time to help (sorry) but you could try putting in flashing LED sequences at various points in the code, to see where it's getting stuck (unless you have any of those awesome hardware debugging tools). or you could try adapting a different firmware, like they one used by Input Club.

@postelrich
Copy link
Author

postelrich commented Mar 14, 2018

@benblazak heres a link to better see the diff benblazak:fc8099e...postelrich:master

Found this thread which suggests not getting enough power at the USB. That could very well be the issue since its now plugged into some janky usb desk hub. https://geekhack.org/index.php?topic=81079.msg2127257#msg2127257

@jave
Copy link

jave commented Mar 14, 2018 via email

@postelrich
Copy link
Author

Tried plugging directly into the thin client. No dice.

@jave I have a dactyl which is all hand wired, so likely a short or something.

@benblazak
Copy link
Owner

looking at your layout, since that's most of the diff. do all the keys having to do with layers work correctly? also, why is there an empty , , at the end of line 227?

that's all i can think of. then again, it's really easy to miss something in this layout format. then again again, if it really was a layout issue, i suspect you would have noticed a pattern by now.

@postelrich
Copy link
Author

I was only using the function layer so could remove all the others. That layer was working fine. The empty space is a typo. I did notice that on windows holding down a key doesn't repeat the letter while it would repeat on mac. Don't know if that means anything. Thanks for taking a look.

gonna try cleaning that up and merging your latest master.

@benblazak
Copy link
Owner

My master branch hasn't changed for a really long time. I'll be surprised if it fixes your problem, but good luck!

@pnickolay
Copy link

I'm having similar issues, and it usually seems to be triggered by the wiggle of the i2c connector cable (it also gets fixed by unpluging it and replugging again, which seems to trigger a reboot). Could it be a connection issue? Is it possible to make the firmware to be more resilient on the connection losses and restores?

@benblazak
Copy link
Owner

that sounds a lot like a hardware issue

it's been a long time, so i forget exactly what the tradeoffs were. if i'm remembering correctly, i couldn't find a way in software to detect if the connection had been lost and reset it. i believe initialization took too long to do every cycle. and my guess is that unplugging and replugging the trrs jack causes a short, which causes the usb hub to reset the device.

the only software solution i can think of to try is changing your firmware to initialize the i2c connection every polling cycle, and see if that brings the polling rate down too low. otherwise, checking your solder joints and trying different cables might be the way to go :)

i suppose alternately you could map a key to re-init the i2c interface, or reboot the keyboard -- and at least that would save you disconnecting->reconnecting a physical connector. in fact, if you're using my default qwerty layout, i believe there's already a key mapped to rebooting the keyboard (i did that a lot, for flashing new versions of the firmware) -- but again, it's been a long time.

good luck!

@pnickolay
Copy link

I see, thank you! Assigning the key would not work since the keyboard is not responding at the time when it gets stuck. Will try to use a different cable fist, and then resolder the connections.

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

4 participants