Playnite Forums
  • Playnite Web
  • Rules
  • Members
  • Team
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Playnite Forums Extension Database Generic Extensions Change Power Plan | Script/Tutorial to change Power Plan at run/closed game

Change Power Plan | Script/Tutorial to change Power Plan at run/closed game
darklinkpower
Offline

Super Moderator
#1
03-10-2020, 04:16 AM (This post was last modified: 04-30-2020, 12:40 AM by darklinkpower.)
Description:
                                                                                                                                                                             
This tutorial will show you how to make a simple script to change the active Power Plan when running a game. This can be useful for laptops since you can switch between a low consumption mode to high performance when running a games and switch back when closing the game.

Tutorial:
                                                                                                                                                                             
1. Finding the Power plan GUID:
First you need to know the Power Plan GUIDs, to do that you can open a CMD window and write
powercfg -l
or alternatively you can download the zip file I attached to this post, which includes a bat file you can simply click. Either way, you should see this:
[Image: UAHBdAF.png]

2. Writing the Script:
After finding the GUIDs, you'll need to copy your Power Plan GUIDs into this script.
powercfg -s 00000000-0000-0000-0000-000000000000

3. Using the Script:
Write the script in the order you want in the settings window for the script to apply globally in all games or individually to just run it in one game and select "Batch (.bat script)" in Script runtime
[Image: xFiRt5y.png]
bettafo
Offline

#2
10-19-2021, 12:22 AM (This post was last modified: 10-19-2021, 12:23 AM by bettafo.)
Hi there. I've been a happy and grateful (many thanks to you!) user of this extension (still use it on my Win7+Playnite 8 setup in dual boot).
I am currently giving a try to Playnite 9, and among various things that I am missing is your extension.
So I'd love to see a version for Playnite 9 if that's not too much work Smile
Cheers!
Giodude
Offline

#3
11-01-2021, 05:14 PM
Hi! My gf isn't the savviest tech wise, but she's definitely somebody who could benefit from lower power consumption. Is there a way this could be made into a plugin so she doesn't have to manually add it on a per game basis?
darklinkpower
Offline

Super Moderator
#4
11-01-2021, 09:30 PM
(11-01-2021, 05:14 PM)Giodude Wrote: Hi! My gf isn't the savviest tech wise, but she's definitely somebody who could benefit from lower power consumption. Is there a way this could be made into a plugin so she doesn't have to manually add it on a per game basis?
Add it as a global script in Settings -> Scripts
slymeasy
Offline

#5
11-10-2021, 10:53 AM
It doesn't look like there is a way to do this when Playnite starts. I had my PC plan on power saving and noticed a lot of stuttering when in fullscreen mode.
Gildum
Offline

#6
11-10-2021, 03:05 PM (This post was last modified: 11-10-2021, 03:07 PM by Gildum.)
I'm also using a similar method for specific games, but rather than changing power plans, I'm always on the "balanced" mode and instead set a cpu clock limit depending on the game.

For example, this will limit the cpu clock to 80% (for my cpu this means 2100 Mhz limit):

powercfg -setacvalueindex SCHEME_BALANCED SUB_PROCESSOR PROCTHROTTLEMAX 80
powercfg.exe -setactive SCHEME_CURRENT


You can change the the cpu clock limit to various values ranging from 1% to 100%. Simply change the number behind PROCTHROTTLEMAX.

I'm using a 99% cpu limit quite often, as this will slightly increase game performance in gpu limited games on my intel cpu with integrated graphics. 99% basically means my cpu runs with base frequency and turbo mode is turned off.
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode