Want to get some extra battery life out of your laptop?
It turns out Windows power plans will change performance settings a lot to conserve power. When used together with the Battery Saver mode on Windows 10 you can save a lot of battery.
But Windows does not offer a way to automatically switch power plans. To solve this problem, I have written a C program that does just that.
And the best part? It uses virtually no system resources. 0% CPU and 0.3MB RAM. So unlike other (albeit more complicated) power managers, this one will do nothing but benefit your battery life.
It’s also 32 bit and should work on most versions of windows.
It’s free and open source! The GitHub repository is linked below. I compiled the .exe using the Visual Studio C compiler (
> cl powerman.c)
Screenshot of it in action!
There isn’t really much to see here. This window just tells you that the program is running and doing its job. It also tells you if it is using the config file or its hard-coded defaults.
How to install (read carefully!):
I don’t provide an installer, mainly because I don’t know to make one, so here are the manual instructions.
Also, antivirus will most definitely give a false positive, so white-list the program. I don’t know why this happens, but even Windows Defender messes with it.
- Download the zip folder, linked below.
- Extract the zip and move the
C:\Program Files (x86). It will not work correctly if you don’t do this.
- Don’t take anything out of the
powermanfolder. If you want a desktop shortcut for this, copy the shortcut (but don’t move it) to the desktop
- To run the program, double click the shortcut (not the .exe). The shortcut sets up the app icon and window sizes and other niceties, and starts the program minimized.
- Add the program to your startup list, so that it runs automatically when the computer starts [optional, but recommended]
- Open the start menu, and type
run. Select the Run application.
- In the box that pops up, type
- Copy the powerman shortcut (but don’t move it) to the File Explorer window that just opened
- Open the start menu, and type
How to configure:
Powerman comes with a configuration file named
powerman_config.txt. In this file are the settings for the program. The screenshot below describes its structure:
- Line 1: the battery level at which the power plan is set to Lower Power Mode. If the charge is above this value, Powerman will set the power plan to Balanced.
- Line 2: the battery level at which the power plan is set to Balanced. If the battery level goes above this value, Powerman will set the power plan to High Performance.
- Line 3: the refresh rate of the program, in milliseconds. This regulates how often the program checks the battery level. For 1 second, put 1000. For 3 minutes, put 180000.
- Lower numbers mean higher refresh rates. I do not recommend anything lower than 1 minute (60000).
- Lines 4-6: the GUIDs of the power plans. You don’t need to modify these, unless you have a custom power plan you want to use instead.
- To get the GUID for your custom power plan,
- Right-click the battery icon and press Windows Mobility Center
- For each power plan in the power list that you want to use:
- Enable the power plan
- In a command prompt window, type
- Copy everything up to the
- Paste in the
powerman_config.txtreplacing an existing GUID (don’t add any new lines to the file!)
DO NOT remove lines or add bugs data into this file! Powerman will not start if this file is invalid! If the config file is missing, Powerman has hard-coded defaults it will use instead.
Also don’t put commas in the numbers. To Powerman, 1000 is a number, but 1,000 is a string it can’t use. It will behave erratically if it doesn’t get proper data.