seerge / g-helper

Lightweight Armoury Crate alternative for Asus laptops and ROG Ally. Control tool for ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, TUF, Strix, Scar and other models
https://g-helper.com
GNU General Public License v3.0
7.67k stars 266 forks source link

Battery charge not limited when sleeping #149

Closed ArnavVarshney closed 1 year ago

ArnavVarshney commented 1 year ago

Describe the bug The pre-set battery charging limit is no longer applied when the device enters sleep. I've set it to 60% but the moment the laptop went to sleep (when the keyboard backlight started strobing), the charge light became orange. I thought it might just be light, but the device was at 75% after a few minutes.

To Reproduce Steps to reproduce the behavior:

  1. Set charging limit
  2. Let the device go to sleep on idle
seerge commented 1 year ago

I can not reproduce what you explain here. Do you have myasus or any other asus services running ?

ArnavVarshney commented 1 year ago

No. I've uninstalled MyASUS, and AC and executed your debloat script.

Device: GA503QR

seerge commented 1 year ago

Then something else is still setting wrong battery limit. Can you try to drag slider back & forward set a new limit and check again ? Does it always persists with sleep ?

ArnavVarshney commented 1 year ago

Then something else is still setting wrong battery limit. Can you try to drag slider back & forward set a new limit and check again ? Does it always persists with sleep ?

I realized what went wrong. I quit GHelper to replace the .exe from the latest build, and I believe the limit didn't reapply till I dragged the slider (bug? or feature?). Maybe this behaviour could be changed?

seerge commented 1 year ago

App applies limit every time slider is changed + re-applies every time it's started / wakes up / or plugged/unplugged. Imho it's already enough. I can add re-apply to the case when laptop goes to sleep (but most probably effect will be same)

ArnavVarshney commented 1 year ago

every time it's started

Hmm seems it didn't apply on startup in my case then. I can't reproduce the original error as such. The only difference then was that I "Quit", replaced the exe and started GHelper, after which the laptop went to sleep and started charging.

seerge commented 1 year ago

It always does :) I have added re-apply method for case when laptop goes to sleep. There is nothing else that can be done here.

Build : GHelper.zip

seerge commented 1 year ago

You can also test battery limiter by hand by running following command in powershell with admin rights

(Get-WmiObject -Namespace Root/WMI -Class AsusAtkWmi_WMNB).DEVS(0x00120057, LIMIT)