-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Description
After upgrading to Zephyr 4.1 (commit c06fa48c), the central half of a split keyboard does not wake from deep sleep (CONFIG_ZMK_SLEEP=y) when CONFIG_ZMK_STUDIO=y is enabled. The peripheral side wakes normally.
Disabling ZMK Studio resolves the issue - the central wakes from sleep as expected.
Environment
- ZMK Version: main branch (post-Zephyr 4.1 upgrade)
- Board: nice_nano (nRF52840)
- Shield: Corne with nice_view display
- Relevant Config:
CONFIG_ZMK_SLEEP=y CONFIG_ZMK_DISPLAY=y CONFIG_ZMK_STUDIO=y
Steps to Reproduce
- Build firmware for a split keyboard central with
CONFIG_ZMK_SLEEP=yandCONFIG_ZMK_STUDIO=y - Flash to the central half (e.g., left side)
- Wait for the keyboard to enter deep sleep (default 15 min idle timeout)
- Press a key on the central side
- Expected: Keyboard wakes up
- Actual: Keyboard does not wake; requires reset or power cycle
Workaround
Disable ZMK Studio:
# CONFIG_ZMK_STUDIO=y
Analysis
The issue appeared with the Zephyr 4.1 upgrade. Key changes in that commit:
-
PM API change in
app/src/pm.c- Removedpm_device_state_is_locked()check (function was removed in Zephyr 3.7):// Before: if (!device_is_ready(dev) || pm_device_is_busy(dev) || pm_device_state_is_locked(dev) || pm_device_wakeup_is_enabled(dev) || pm_device_runtime_is_enabled(dev)) { // After: if (!device_is_ready(dev) || pm_device_is_busy(dev) || pm_device_wakeup_is_enabled(dev) || pm_device_runtime_is_enabled(dev)) {
-
Conditional compilation change -
#if !defined(CONFIG_PM_DEVICE_RUNTIME_EXCLUSIVE)changed to#if defined(CONFIG_PM_DEVICE_SYSTEM_MANAGED)
ZMK Studio enables USB CDC ACM, UART RPC transport, and additional threads. One of these components may be:
- Not properly suspending before
sys_poweroff() - Holding GPIO pins in a state that blocks SENSE-based wake detection
- Missing wakeup-source configuration
The peripheral (without Studio features) wakes correctly, confirming the issue is specific to Studio-enabled central builds.