Skip to content

Keep Power saver on after Windows checks its threshold again - #158

Open
lukas0711 wants to merge 3 commits into
SumirSeth:mainfrom
lukas0711:fix/power-saver-threshold
Open

lukas0711 wants to merge 3 commits into
SumirSeth:mainfrom
lukas0711:fix/power-saver-threshold

Conversation

@lukas0711

Copy link
Copy Markdown

Changes

  • When Power saver is on, Wisp keeps the battery threshold at 100%. Reason: Windows checks the threshold again after approximately one second. The old fix stopped Power saver again at that time.
  • Wisp keeps the user's threshold in the data folder. Wisp sets it again when the user stops Power saver or connects the charger. Reason: the user's setting does not change.

Checks

  • cargo fmt, the two clippy -D warnings runs and cargo test pass.
  • Not done: a test on Windows 10.

Windows re-checks the battery threshold about a second after it changes,
so restoring it right away turned saver off again. Hold the threshold at
100% while saver is on, keep the user's value in the data folder, and
restore it when saver is turned off or the PC is plugged in.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant