Contribute
Register

[QUESTION] Battery threshold for ASUS laptop

Joined
Nov 7, 2015
Messages
11
Motherboard
ASUS S530UN-Clover+OpenCore
CPU
i5-8250U
Graphics
UHD620+MX150, 1920x1080
Mac
MacBook Air
Mobile Phone
Android
In Windows, I see the option in my ASUS app which stops charging when battery percentage reaches 80%. I want to know how to get this feauture in Hackintosh. Is it possible if I patch DSDT?
 
Joined
Jun 4, 2017
Messages
169
Motherboard
ASUS GL504GW - OpenCore
CPU
i7-8750H
Graphics
UHD 630 + RTX2070, 1920x1080
Mobile Phone
iOS
Same here - I've poked around in ACPI, and it looks like the bottom part of EC0's regions contain battery related registers.
CHGS(arg0) returns BCHG(arg0), which can either return EB1S (arg0) or EB0S (null).

Some EC methods Notify (BAT0, 0xXX) - it's possible one of them have something to do with it.

Method NBAT notifies BAT0 with arg0, if BATP is zero. BATP reads DCP2 or DCPF if arg0==null. DCP2 is unused. DCPF is written by EC method _QA1. _QA1 writes DCPS(Zero) to DCPF, then sleep(0x7d0)=2000ms, and then notifies BAT0 0x80 and 0x81. I don't know what these notifications do.
DCPS is right above BCHG - so they're definitely related. My guess is DC Power Source/Switch? It takes one argument, and gets GPWS which returns EPWS. Ultimately if arg0 is null or not it returns a 0 or a 1, which could indicate charging.

What we need is to find which method (and thus register) controls actual charging, and not status.

If anyone is willing to add ACPIDebug and EC queries (and a bunch more to battery/EC power), that'd be great.

EDIT: I recall seeing someone post about this with results a while back, but can't seem to find it. If I recall correctly, there IS a function (and associated register) which can be called via hooking an FN key, or manually patching out an ATKD call.

EDIT 2: So someone with a lenovo device managed to do it - they called a method, and notified the battery/EC. https://www.tonymacx86.com/threads/...old-hotkeys-battery-conservation-mode.273562/ Now, what is the method for ASUS laptops?

EDIT 3: another option is to decompile the ASUS battery software, for me it's MyASUS - if someone else is using the dedicated Asus Battery+ app, it'd be easier.
 
Last edited:
Top