This is a Windows Service for Lenovo laptops battery management enhancement.
This service will provide two main functionalities:
- When you connect/disconnect your laptop from power supply it can automatically switch your energy profile to the one you select
- You can set a different target energy level instead of the 60% Lenovo's hardcoded.
You can install it from binary zip file here.
- Download it here
- Extract it anywhere (this should be the final "installation" path, you cannot remove it later)
- Open
cmd
as administrator - Now install it as a service using
sc create "Lenovo Battery Management" binPath=<C:\Path\To\LenovoBatteryManagement.exe> start=auto
- Run the service with
net start "Lenovo Battery Management"
To compile from source you must install .NET SDK. Then just run:
dotnet publish -c Release
Then just proceed as instructed before from step 3.
For configuring the service the appsettings.json has four relevant options:
- TargetBatteryLevel (integer): the target battery level (default 70)
- BatteryLevelThreshold (integer): the amount below which the default charging method will trigger again. For exemple, if you set TargetBatteryLevel to 80% and BatteryLevelThreshold to 5%, then whenether the battery level is below 75% charging will be enabled, when it reaches 80% charging mode will be set to Conservation mode (default 5).
- ChargingMode: the charging mode to be set when battery drops below the set threshold (Normal|Rapid, default Normal).
- PowerPlanPower: the power plan to be set when the laptop is working on power (EfficiencyMode | IntelligentCooling | ExtremePerformance, default IntelligentCooling).
- PowerPlanBattery: the power plan to be set when the laptop is working on battery (EfficiencyMode | IntelligentCooling | ExtremePerformance, default: EfficiencyMode).
- CheckIntervalSeconds (integer): this service works by checking the battery level, you can set the amount of seconds to adjust the frequency of checking (default 60).
The configuration is read again each time the service loop runs, so you don't need to restart or do anything else other than saving the text file for the updated settings to take place.
- As this is a windows service and not an integrated hardware solution it won't work while Windows is asleep or computer is shutdown.