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

kbscan: Work around IT8587E hang #493

Merged
merged 1 commit into from
Jul 29, 2024
Merged

kbscan: Work around IT8587E hang #493

merged 1 commit into from
Jul 29, 2024

Conversation

crawfxrd
Copy link
Member

@crawfxrd crawfxrd commented Jul 24, 2024

IT8587E is hanging when reading the keyboard matrix.

  • Increasing the delay does not fix it
  • Placing delays between KSO* writes does not fix it
  • Code generated by SDCC looks valid to me

Rewriting it like this does fix it, although I don't know why.

Tested on darp5 with WDT enabled:

  • WDT is no longer triggered
  • Normal EC functionality like fans and powering off works again
  • Keyboard input still works

Resolves: #472

IT8587E is hanging when reading the keyboard matrix.

- Increasing the delay does not fix it
- Placing delays between KSO* writes does not fix it
- Code generated by SDCC looks valid to me

Rewriting it like this does fix it, although I don't know why.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
@crawfxrd crawfxrd requested review from a team July 24, 2024 20:31
@leviport leviport self-assigned this Jul 24, 2024
Copy link
Member

@leviport leviport left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working great on my darp5!

@Thulinma
Copy link

Thulinma commented Jul 29, 2024

Just installed/tested this, and I can confirm that on my laptop as well, this seems to resolve the crashes with no (noticeable) negative effects whatsoever. I tried running various commands that caused crashes on the previous build and booting into kernels that caused crashes before, and none of them now result in a crash anymore. 👍
(Some commands do fail, e.g. ec_tool security and ec_tool fan, but none of them cause a crash anymore when before they did. Maybe I'm just using them wrong; the help built into the tool is fairly sparse on usage instructions.)

@mmstick mmstick merged commit 716efd4 into master Jul 29, 2024
47 checks passed
@crawfxrd crawfxrd deleted the it8587e-kbscan branch July 29, 2024 15:18
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

Successfully merging this pull request may close these issues.

IT8587E locks up when keyboard is enabled
4 participants