Contribute
Register

[Guide] How to patch DSDT for working battery status

Rehabman is there a guide anywhere spicific to ACPIBatteryManager debugging? I did a quick dump from console with patch above included. Does anything stand out from the log?

You can read the ACPI spec such that you understand how _BIF and _BST are supposed to function.
 
hello guys I need some help to implement Battery in my laptop.
I tried some patches but they don't cover some fields In my DSDT.aml:
Here is archive with 2 dsdt.aml one original, one is patched but not completely
Thank you for help
 

Attachments

  • Archive.zip
    37 KB · Views: 72
Hi Rehabman, my laptop (HP ENVY 13-ab024tu) battery information is the same as HP-envy-17t (I have find the DSDT patch that you provided), but when I patch it with my laptop DSDT file, there is many errors from Maciasl, so would you teach me what's wrong about it?
 

Attachments

  • DSDT.aml.zip
    31.5 KB · Views: 67
  • Sreenshot.png
    Sreenshot.png
    294.2 KB · Views: 78
hello guys I need some help to implement Battery in my laptop.
I tried some patches but they don't cover some fields In my DSDT.aml:
Here is archive with 2 dsdt.aml one original, one is patched but not completely
Thank you for help

Read post #1.
You will likely find an existing patch that matches your DSDT.
 
Hi Rehabman, my laptop (HP ENVY 13-ab024tu) battery information is the same as HP-envy-17t (I have find the DSDT patch that you provided), but when I patch it with my laptop DSDT file, there is many errors from Maciasl, so would you teach me what's wrong about it?

This construct is confusing MaciASL's parser/patcher:
Code:
    Scope (_SB.PCI0.LPCB)
    {
        Device (H_EC)
        {
...
            Scope (^^LPCB)
            {
                OperationRegion (H2RM, SystemMemory, 0xFE700600, 0x0100)
                Field (H2RM, AnyAcc, NoLock, Preserve)
                {
                    MBVR,   8,
                    Offset (0x10),
                    BDN0,   56,
...
                }
            }
...

We can move (eg. cut/paste) the code for H2RM such that it is directly under Scope(_SB.PCI0.LPCB) and the problem goes away:
Code:
    Scope (_SB.PCI0.LPCB)
    {
//            Scope (^^LPCB)
//            {
                OperationRegion (H2RM, SystemMemory, 0xFE700600, 0x0100)
                Field (H2RM, AnyAcc, NoLock, Preserve)
                {
                    MBVR,   8,
                    Offset (0x10),
                    BDN0,   56,
...
                        ,   2,
                        ,   1,
                        ,   2,
                    Offset (0xFA)
                }
//            }

        Device (H_EC)
        {
            Name (_HID, EisaId ("PNP0C09"))  // _HID: Hardware ID
...
 
This construct is confusing MaciASL's parser/patcher:
Code:
    Scope (_SB.PCI0.LPCB)
    {
        Device (H_EC)
        {
...
            Scope (^^LPCB)
            {
                OperationRegion (H2RM, SystemMemory, 0xFE700600, 0x0100)
                Field (H2RM, AnyAcc, NoLock, Preserve)
                {
                    MBVR,   8,
                    Offset (0x10),
                    BDN0,   56,
...
                }
            }
...

We can move (eg. cut/paste) the code for H2RM such that it is directly under Scope(_SB.PCI0.LPCB) and the problem goes away:
Code:
    Scope (_SB.PCI0.LPCB)
    {
//            Scope (^^LPCB)
//            {
                OperationRegion (H2RM, SystemMemory, 0xFE700600, 0x0100)
                Field (H2RM, AnyAcc, NoLock, Preserve)
                {
                    MBVR,   8,
                    Offset (0x10),
                    BDN0,   56,
...
                        ,   2,
                        ,   1,
                        ,   2,
                    Offset (0xFA)
                }
//            }

        Device (H_EC)
        {
            Name (_HID, EisaId ("PNP0C09"))  // _HID: Hardware ID
...

Thanks, RehabMan, but there is still has 12 errors according your method, please see the screenshot and help me to check it again, also I have attached my DSDT.dsl with errors.
 

Attachments

  • Screen Shot 2018-02-22 at 3.30.38 PM.png
    Screen Shot 2018-02-22 at 3.30.38 PM.png
    326.9 KB · Views: 94
  • DSDT.dsl
    987.4 KB · Views: 112
Last edited:
Thanks, RehabMan, but there is still has 12 errors according your method, please see the screenshot and help me to check it again, also I have attached my DSDT.dsl with errors.

You did not implement the edit as per post #4501.
Attached is a file fixed as per my instructions (plus obvious fix for PPL1).
 

Attachments

  • DSDT.dsl.zip
    61.2 KB · Views: 83
You did not implement the edit as per post #4501.
Attached is a file fixed as per my instructions (plus obvious fix for PPL1).
Thanks so much, Rehabman, now my laptop can display the battery status normally.
 
can you check please my DSDT
in Frist patch that I made, I touch fields that don't need to touch.
but in this on I don't have any error but battery still not appearing
Thank you
 

Attachments

  • Archive.zip
    19.4 KB · Views: 72
can you check please my DSDT
in Frist patch that I made, I touch fields that don't need to touch.
but in this on I don't have any error but battery still not appearing
Thank you

"Problem Reporting" files are incomplete.
Read FAQ, "Problem Reporting" again. Carefully. Attach all requested files/output.
https://www.tonymacx86.com/threads/faq-read-first-laptop-frequent-questions.164990/
Use the gen_debug.sh tool mentioned in the FAQ, that way it is less likely you'll omit something.
 
Back
Top