Automatically change the powerplan according to CPU load, idle time, processes or manual override
The original source is from ComputerBase.
Just adjust the parameters (explained below) and you are good to go.
power-manager.ps1
is the main script, which you can setup in the Taskplaner. The window will be hidden, if "run even if user is not logged in" is active.
CPU Load, which needs to fall bellow this value to set energy saving or go higher to set gaming plan.
Enable or disable to check for user idle time.
Float, seconds. Amount of time the user should be idling to set powersaving plan.
Enable or disable showing status on the Logitech keyboard display. Requires Python if enabled.
Use powercfg /L
to get the IDs of the power plans.
This powerplan is set if CPU load is higher than $CPUUsageLimit
, mouse and keyboard inputs are not older than $UserIdleLimit
, at least one process from gameprocess.txt
is running or "True" is written in keepplan.txt
(read below).
This powerplan is set, if none of the above apply.
run keep-plan.ps1 true
or keep-plan.ps1 false
.
true
Will keep the gaming-plan until you run the script again withfalse
false
Will disable the fixed powerplan and make it CPU load and idle time dependant again
You can set hotkey for the script with true
and false
for easy switching.
(Shortcut on Desktop, or G-Keys on Logitech keyboards)
Enter the processes in gamingprocess.txt
(without .exe). If one of these processes are running, gaming-plan will be kept.
Run check-plan.ps1
to see the current state of powerplan and NVIDIA performance state on the display of your keyboard.