View Single Post
Old 11-28-2021, 08:26 AM   #1
New Member
Join Date: Feb 2018
City & State: Milan
My Country: Italy
I'm a: Hardcore Geek
Posts: 3
Post Limit battery charging percentage through EC registers

Hello everyone,
this is my first thread so i don't know if this is the appropriate section so excuse me if i'm wrong.

Recently i've bought an hp 15s-eq2004nl which has been a good laptop overall but it lacks a few important features like:
- HP Battery care (Limits the maximum charging percentage)
- S3 suspend (Which i've fixed by patching the DSDT).

While monitoring the embedded controller registers i've discovered that by writing 0x00 into the register 0x40 the charging stops. but there are the following issues:
- The embedded controller firmware resets the register periodically and tries to charge the battery, so i have to rewrite the register every 2s
- There is still a slight amount of charging going on while the script is running (around 1 W).
- The limiter only works while the laptop is in S0 mode, so if i leave it plugged while in standby or powered off, the battery will fully charge
- If i increase the register writing frequency, there is a significant performance drop (probably due to ACPI detecting a frequent AC/BAT power supply change)

Since the computer is brand new, invasive modding or opening it is out of discussion.
Bios modding is also not really possible both due to HP Sure start and warranty issues.

Did anyone else try to do this? Maybe someone who has an hp laptop with Battery Care available in the bios.

Here's a link to my current "working" script, this is made for void linux but you can easily make your windows equivalent
Jacotsu is offline   Reply With Quote