Skip to content

feat(power) Add additional idle options#2398

Closed
nmunnich wants to merge 4 commits intozmkfirmware:mainfrom
nmunnich:idle-ext-power-off
Closed

feat(power) Add additional idle options#2398
nmunnich wants to merge 4 commits intozmkfirmware:mainfrom
nmunnich:idle-ext-power-off

Conversation

@nmunnich
Copy link
Copy Markdown
Contributor

@nmunnich nmunnich commented Aug 2, 2024

Added two Kconfig flags:

  • ZMK_EXT_POWER_IDLE_OFF (disabled by default) to turn off external power when the keyboard goes into idle, and enable it again when it exits idle. Seems like it would be particularly useful for trackpoint users.
  • ZMK_IDLE_USB (enabled by default) which enables/disables idling while connected to USB power. I'd be expecting RGB lovers to request this.

First flag is tested and confirmed working. Unable to test second flag, implementation is trivial though. Unable to test whether the display re-init bug mentioned in #1300 is still present, would expect this to interact poorly if so.

@nmunnich nmunnich requested a review from a team as a code owner August 2, 2024 08:59
@caksoylar
Copy link
Copy Markdown
Contributor

I think the combination of the two settings is overlapping with CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE. I think it could be nice to make the handling more structured by directly tying the behavior to power states, then configure the state's general behavior as with proposed settings. However it does reduce flexibility when you have multiple peripherals and want different behavior.

@nmunnich
Copy link
Copy Markdown
Contributor Author

nmunnich commented Aug 2, 2024

There is some ideological overlap, but currently no functional overlap: CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE merely turns brightness down to 0. There is use case for both currently - for example if the peripheral of a split is powered from the central and doesn't have its own battery, with a bit of underglow added on.

How this would look in the future when we have proper PM support I'm less certain about.

I'm not sure I follow the rest of your statement.

@nmunnich nmunnich added enhancement New feature or request core Core functionality/behavior of ZMK labels Aug 2, 2024
@nmunnich
Copy link
Copy Markdown
Contributor Author

Going to close this for the time being - on further thinking, I think I'd rather revisit this once #1775 is merged and see if it's still a good thing to have then.

@nmunnich nmunnich closed this Aug 17, 2024
@nmunnich nmunnich deleted the idle-ext-power-off branch September 7, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core functionality/behavior of ZMK enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants