Comments (5)
Sorry for taking so long to respond. Since the conservation mode is a firmware feature, changing the percentage it kicks in is not possible. You CAN change the max percentage in Lenovo Vantage, but this feature is only available on ThinkPads, not our puny IdeaPads.
As for the automatic switch, there's no way my program can tell when the battery reaches past a certain charge level. All I can do is to check the current percentage every few minutes. That would theoretically work without much of a performance impact and would be easy to implement.
The issue is, it would keep switching the charging on and off constantly, and I'm not sure that's good for the battery. But it's doable. Would this be an acceptable implementation @webdevs-pro?
from ideapadtoolkit.
I think it would be enough to just switch it on at 80%. Because when I charge mine and turn protection on at 80% it keeps the current charge and is not discharging the battery, insted using the connected external power.
from ideapadtoolkit.
@webdevs-pro
you could make a simple script to notify your self about the battery level limit (the bash code snippet).
if it reached the top threshold battery level, then manually you switch mode to the conservative one.
`#!/bin/bash
TOP_THRESHOLD=84
BOTTOM_THRESHOLD=36
STABILITY_DURATION=3 # Number of consecutive checks to consider battery level as stable (adjust as needed)
NOTIFIED=false
while true; do
charger_status=$(WMIC Path Win32_Battery Get BatteryStatus | grep -oE '[0-9]+')
# 1 means discharging, 2 means charging, 3 means fully charged, 4 means low
if [ "$charger_status" -eq 1 ] || [ "$charger_status" -eq 2 ]; then
battery_level=$(WMIC Path Win32_Battery Get EstimatedChargeRemaining | grep -oE '[0-9]+')
if [ "$battery_level" -ge "$TOP_THRESHOLD" ] && [ "$charger_status" -eq 2 ]; then
if [ "$NOTIFIED" = false ]; then
NOTIFIED=true
initial_level=$battery_level
stability_counter=0
powershell.exe -ExecutionPolicy Bypass -File "./notify.ps1" -Title "Battery Level" -Message "Battery level has reached at the top threshold and please enable the conservative mode via Lenovo Vantage >> Device: Power menu." -AppLogoPath "C:\Users\LENOVO\OneDrive\Pictures\is-it-legal.png"
fi
`
from ideapadtoolkit.
Hey @idwowrack, thanks!
I made similar thing but using AutoHotKey script and PowerBattery.dll. If charge reached 75% then script will switch mode to conservation and if battery level is below 70% it will switch to normal.
SetTimer, Tick, 10000
return
Tick() {
batteryLevel := GetBatteryLevel()
mode := GetMode()
if (batteryLevel > 75 && mode != "Conservation") {
RunWait, powershell.exe -Command "Set-Location -Path '%A_ScriptDir%'; Set-LenovoChargingMode Conservation",, Hide
ShowBatteryStatus()
} else if (batteryLevel <= 70 && mode != "Normal" && mode != "Rapid" ) {
RunWait, powershell.exe -Command "Set-Location -Path '%A_ScriptDir%'; Set-LenovoChargingMode Normal",, Hide
ShowBatteryStatus()
}
}
This is part of my script
from ideapadtoolkit.
Looks like more promising using AHK for auto mode switching, @webdevs-pro
Could you gist the step by step for using the autoscript ?
from ideapadtoolkit.
Related Issues (19)
- Powerbattery.dll HOT 3
- works on IdeaPad 5 Pro 16ARH7
- Test on IdeaPad 5 15ALC05 HOT 1
- Works on Z50-70
- Works as *intended* • IdeaPad S145-14IIL (81W6) HOT 2
- [Readme] msixbundle PowerBattery.dll location changed
- Wrong systray icon after reboot.
- Works on IdeaPad S540-14IML 81NF
- Partly works on ideapad S145-14IWL
- Fix dllimport HOT 1
- Works on IdeaPad Pro 5 14APH8
- Works on XiaoXin 14 Pro 2024 (Chinese Ideapad 5 Pro 14AHP9)
- Works on Lenovo V14 G4 AMN
- Works on Lenovo Ideapad S340-15API Touch HOT 2
- App launch crash HOT 5
- Power Profiles not switching HOT 3
- Charge Mode Icon HOT 1
- Option to change charging behaviour from tray icon instead of performance plan HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ideapadtoolkit.