Skip to main content

Power Management Configuration

See Configuration Overview for instructions on how to change these settings.

Low Power States​

Configuration for entering low power states when the keyboard is idle.

Kconfig​

Definition file: zmk/app/Kconfig

ConfigTypeDescriptionDefault
CONFIG_ZMK_IDLE_TIMEOUTintMilliseconds of inactivity before entering idle state30000
CONFIG_ZMK_SLEEPboolEnable deep sleep supportn
CONFIG_ZMK_IDLE_SLEEP_TIMEOUTintMilliseconds of inactivity before entering deep sleep900000
CONFIG_ZMK_PM_SOFT_OFFboolEnable soft off functionality from the keymap or dedicated hardwaren

External Power Control​

Driver for enabling or disabling power to peripherals such as displays and lighting. This driver must be configured to use power management behaviors.

Kconfig​

Definition file: zmk/app/Kconfig

ConfigTypeDescriptionDefault
CONFIG_ZMK_EXT_POWERboolEnable support to control external power outputy

Devicetree​

Applies to: compatible = "zmk,ext-power-generic"

PropertyTypeDescription
control-gpiosGPIO arrayList of GPIOs which should be active to enable external power
init-delay-msintnumber of milliseconds to delay after initializing the driver

GPIO Key Wakeup Trigger​

A device similar to a kscan which will be enabled only when the keyboard is entering soft off state. This is used to configure a GPIO key to wake the keyboard from soft off once it is pressed.

Devicetree​

Applies to: compatible = "zmk,gpio-key-wakeup-trigger"

Definition file: zmk/app/dts/bindings/zmk,gpio-key-wakeup-trigger.yaml

PropertyTypeDescription
triggerphandlePhandle to a GPIO key to be used to wake from soft off
wakeup-sourceboolMark this device as able to wake the keyboard
extra-gpiosGPIO arraylist of GPIO pins (including the appropriate flags) to set active before going into power off

The wakeup-source property should always be present for this node to be useful. The extra-gpios property should be used to ensure the GPIO pin will trigger properly to wake the keyboard. For example, for a col2row matrix kscan, these are the column pins relevant for soft off.

Soft Off Wakeup Sources​

Selects a list of devices to enable during soft off, allowing those with wakeup-source as a property to wake the keyboard.

Devicetree​

Applies to: compatible = "zmk,soft-off-wakeup-sources"

PropertyTypeDescription
wakeup-sourcesphandle arrayList of devices to enable during the shutdown process to be sure they can later wake the keyboard