Announcement

Collapse
No announcement yet.

Limit battery charging percentage through EC registers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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
    https://gist.github.com/Jacotsu/0d5f...6a84fb11819566

    #2
    Re: Limit battery charging percentage through EC registers

    i hope you dont kill the battery,
    modern packs have a microcontroller in them that has a charge-counter among other things.

    Comment


      #3
      Re: Limit battery charging percentage through EC registers

      Originally posted by stj View Post
      i hope you dont kill the battery,
      modern packs have a microcontroller in them that has a charge-counter among other things.
      I know, but i'm not messing with the battery charge chip. i'm messing with the EC which communicates with the battery chip through SMBus. The register i'm using seems to be the one that controls the charge rate, i don't think that any problem will arise if i set it to 0

      Comment

      Working...
      X