idle-power-manager: restore profile active before idle, not a fixed one#13
Merged
Merged
Conversation
Capture the active tuned profile right before each switch to the idle profile and restore exactly that on wake, instead of locking in a single profile auto-detected once at startup. This restores whatever mode the user was on (e.g. balanced) and survives mid-session profile changes. PERFORMANCE_PROFILE now forces a fixed profile on wake rather than being the storage slot; unset (default) it remembers and restores. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make
idle-power-manager.shremember the tuned profile that was active right before switching to the idle/powersave profile, and restore exactly that on wake.Why
Previously the restore target was auto-detected once at startup into
PERFORMANCE_PROFILE. That meant:throughput-performance) could restore the wrong profile when the system happened to be in powersave at launch.Now whatever mode you were on (e.g.
balanced) comes back on wake.Changes
PERFORMANCE_PROFILEis now an explicit override (force a fixed profile on wake) rather than the storage slot; unset (default) = remember & restore.throughput-performanceonly as a fallback for the cold-start edge case.--helpheader block, README description, and config table.Testing
bash -npasses. shellcheck not installed in the environment, so not run.🤖 Generated with Claude Code