Skip to content

idle-power-manager: restore profile active before idle, not a fixed one#13

Merged
mlutonsky merged 1 commit into
mainfrom
idle-power-manager-remember-profile
May 27, 2026
Merged

idle-power-manager: restore profile active before idle, not a fixed one#13
mlutonsky merged 1 commit into
mainfrom
idle-power-manager-remember-profile

Conversation

@mlutonsky
Copy link
Copy Markdown
Owner

What

Make idle-power-manager.sh remember 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:

  • mid-session profile changes were ignored, and
  • the startup fallback (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

  • Capture the active profile right before each switch to the idle profile; restore it on activity.
  • PERFORMANCE_PROFILE is now an explicit override (force a fixed profile on wake) rather than the storage slot; unset (default) = remember & restore.
  • Keep throughput-performance only as a fallback for the cold-start edge case.
  • Updated the --help header block, README description, and config table.

Testing

bash -n passes. shellcheck not installed in the environment, so not run.

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings May 27, 2026 10:46
@mlutonsky mlutonsky merged commit 439d53c into main May 27, 2026
1 check passed
@mlutonsky mlutonsky deleted the idle-power-manager-remember-profile branch May 27, 2026 10:46
@mlutonsky mlutonsky review requested due to automatic review settings May 27, 2026 11:08
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