Skip to content

macsmc-input: skip spurious BTN_TOUCHID events on s2idle entry - #509

Open
areofyl wants to merge 3692 commits into
AsahiLinux:fairydustfrom
areofyl:fix/macsmc-lid-polling
Open

macsmc-input: skip spurious BTN_TOUCHID events on s2idle entry#509
areofyl wants to merge 3692 commits into
AsahiLinux:fairydustfrom
areofyl:fix/macsmc-lid-polling

Conversation

@areofyl

@areofyl areofyl commented May 31, 2026

Copy link
Copy Markdown

The SMC fires a spurious BTN_TOUCHID press+release within ~1ms of entering s2idle, which triggers pm_wakeup_dev_event and immediately wakes the system back up.

This patch skips the first 2 button events after pm_prepare. The counter resets on pm_complete so normal button handling is restored after resume.

Kernel log showing the spurious events (stock fairydust, no patch):

Jul 03 17:07:51 nimbus kernel: PM: suspend entry (s2idle)
Jul 03 17:07:52 nimbus kernel: macsmc 23e400000.smc: RTKit: syslog message: apComms.cpp:354: SMC HID Event: 01 06 01
Jul 03 17:07:52 nimbus kernel: macsmc 23e400000.smc: RTKit: syslog message: apComms.cpp:354: SMC HID Event: 01 06 00
Jul 03 17:07:52 nimbus kernel: PM: suspend exit

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.

Loading
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.