FrameworkComputer / EmbeddedController

Embedded Controller firmware for the Framework Laptop
BSD 3-Clause "New" or "Revised" License
958 stars 64 forks source link

AMD laptops disrupt sleep on lid close and charger plugin #38

Open septatrix opened 11 months ago

septatrix commented 11 months ago

See the relevant forum thread. It seem like multiple wakeup events are sent, from the lid switch and the keyboard (at least for the lid closing, unsure about the charging thing). This seems to cause operating systems to cancel sleep, i.e. closing the lid of a sleeping laptop wakes it up and so does plugging in the charger. Someone from the Framwork team already has a theory about the code which might case this issue:

https://github.com/FrameworkComputer/EmbeddedController/blob/833fc2f25b82e0786a1a59e8b46ec327a53e4cec/zephyr/program/lotus/azalea/src/power_sequence.c#L313

brlin-tw commented 7 months ago

Here's the Linux kernel workaround patch that disables the keyboard wakeup source completely on firmware version 3.03 that is included in >=6.7-rc7