macsmc-input: skip spurious BTN_TOUCHID events on s2idle entry - #509
Open
areofyl wants to merge 3692 commits into
Open
macsmc-input: skip spurious BTN_TOUCHID events on s2idle entry#509areofyl wants to merge 3692 commits into
areofyl wants to merge 3692 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SMC fires a spurious BTN_TOUCHID press+release within ~1ms of entering s2idle, which triggers
pm_wakeup_dev_eventand immediately wakes the system back up.This patch skips the first 2 button events after
pm_prepare. The counter resets onpm_completeso normal button handling is restored after resume.Kernel log showing the spurious events (stock fairydust, no patch):
01 06 01/01 06 00= BTN_TOUCHID press/release. This pattern repeats on every suspend attempt.Tested on M1 MacBook Air (J313), fairydust 6.18.10.