From 9203ae217bab6f1edcbf13f010054afc4191d14c Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 20 Feb 2022 15:08:40 -0500 Subject: [PATCH] fix(activity): Use proper PM state for sleep. --- app/src/activity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/activity.c b/app/src/activity.c index 1fa75eb5..469ccdf7 100644 --- a/app/src/activity.c +++ b/app/src/activity.c @@ -69,8 +69,8 @@ void activity_work_handler(struct k_work *work) { #if IS_ENABLED(CONFIG_ZMK_SLEEP) if (inactive_time > MAX_SLEEP_MS && !is_usb_power_present()) { // Put devices in low power mode before sleeping - pm_power_state_force((struct pm_state_info){PM_STATE_STANDBY, 0, 0}); set_state(ZMK_ACTIVITY_SLEEP); + pm_power_state_set((struct pm_state_info){PM_STATE_SOFT_OFF, 0, 0}); } else #endif /* IS_ENABLED(CONFIG_ZMK_SLEEP) */ if (inactive_time > MAX_IDLE_MS) {