Contribute
Register

[Guide] How to patch DSDT for working battery status

Use debug ACPIBatteryManager.kext to get detailed kernel logs related to battery methods.
Then diagnose/debug from there.
Excuse me, is it possible to regenerate the IOREG report using the debug version of ACPIBatteryManager?
 
Excuse me, is it possible to regenerate the IOREG report using the debug version of ACPIBatteryManager?

There will be no material differences in ioreg with debug ACPIBatteryManager.kext. The difference is in kernel logs.
 
There will be no material differences in ioreg with debug ACPIBatteryManager.kext. The difference is in kernel logs.
this is kernel logs from debug ACPIBatteryManager.kext ,Please teach me what to do next.
 

Attachments

  • debug_15873.zip
    956.8 KB · Views: 65
You can see that MaxCapacity/CurrentCapacity are nonsense.
Something is wrong with your _BIF/_BST methods or your patching.
Use debug ACPIBatteryManager.kext to further diagnose/debug.
Thanks for your comment, just wondering if windows uses these same methods to determine battery status? And will MaxCapacity/DesignedCapacity be the exact the same or both are just approximate but not need to be exactly the same value?
 
this is kernel logs from debug ACPIBatteryManager.kext ,Please teach me what to do next.

It does not appear your kernel logs have any battery updates (eg. _BST never called).
Keep in mind that _BST is only called at 30 second intervals.
 
Thanks for your comment, just wondering if windows uses these same methods to determine battery status?

Yes.

And will MaxCapacity/DesignedCapacity be the exact the same or both are just approximate but not need to be exactly the same value?

MaxCapacity can be less than DesignCapacity (batteries lose capacity over time).
 
It does not appear your kernel logs have any battery updates (eg. _BST never called).
Keep in mind that _BST is only called at 30 second intervals.
Hello, this is my new installation system, access to the latest logs, and I found my computer recently under Linux to solve the battery status display source code, if you have time, you can refer to, hope to be helpful, thank you for your patience reply.linux-surface
 

Attachments

  • debug_11904.zip
    1.7 MB · Views: 86
Yes.



MaxCapacity can be less than DesignCapacity (batteries lose capacity over time).
OKay, thanks for your time. I checked battery info under windows, and copied DesignedCapcity and FullChargedCapacity to DSDT's BIF0 and BIX0 structure. According to acpi spec, the first member of BIX structure should be "Revision", but mine seems is "Power Unit", so i added one member at the beginning of the structure, and incremented all index to this structure by one. Now the battery seems working, but i am not sure if this is correct. Can you take a look at my debug file again?

Thanks vou very much!
 

Attachments

  • debug_8928.zip
    1.8 MB · Views: 78
Hello, this is my new installation system, access to the latest logs, and I found my computer recently under Linux to solve the battery status display source code, if you have time, you can refer to, hope to be helpful, thank you for your patience reply.linux-surface

No idea what you're asking.
 
OKay, thanks for your time. I checked battery info under windows, and copied DesignedCapcity and FullChargedCapacity to DSDT's BIF0 and BIX0 structure. According to acpi spec, the first member of BIX structure should be "Revision", but mine seems is "Power Unit", so i added one member at the beginning of the structure, and incremented all index to this structure by one. Now the battery seems working, but i am not sure if this is correct. Can you take a look at my debug file again?

Thanks vou very much!

Best to simply remove _BIX if you discover it is not implemented correctly.
ACPIBatteryManager.kext will use _BIF if _BIX is not present.
 
Back
Top