Skip to content

Deep Sleep/Powersave modes for Keyboard/Motherboard LPC Tandem

minute requested to merge wip-lpc-powersave into master

The keyboard MCU and the motherboard's LPC processor were previously always on, even if MNT Reform was completely turned off otherwise. This lead to a much faster battery drain in "off" state then expected.

The MR includes the following improvements:

  • LPC enters deep sleep in "SoM power off" mode if it doesn't get commands for ~15 minutes (adjustable in firmware).
  • Keyboard enters deep sleep when receiving a "Power Off" command, i.e. a hard shutdown via the menu or via the shutdown hook of the MNT Reform Debian Linux system.
  • LPC now includes SoM power state (on/off) in cell status command ('c'). This is visible in the "Battery Status" OLED menu page.
  • In undervoltage condition, LPC turns off the SoM autonomously. The keyboard will detect this via its cell status polling. The keyboard will enter deep sleep if it detects that LPC turned off the SoM without the keyboard's command.
  • Keyboard wakes up from deep sleep by holding the circle key for 1 second.
  • Also, LPC "missing cell" state and other state handling was cleaned up.

Keyboard deep sleep mode contributed by Chartreuse.

Merge request reports