Contribute
Register

[Guide] How to patch DSDT for working battery status

Can please patch somebody the file for me? I dont understand how this works :(. I make a donation to the person who makes this work
 
my files:
 

Attachments

  • System DSDT.aml
    77.4 KB · Views: 49
Read post #1.

Please provide complete details in your profile/signature
(Profile/Settings link in upper right corner of this site)

Thank you!

I have updated my profile/signature. Not sure that it's enough.

Mobo: HP Pavillion DV7 1250en (Clover Legacy / from EFI partition)
CPU: 2,0 GHz Intel(R) Core(TM)2 Duo CPU T6400 @ 2.00GHz x 2
Graphics: NVIDIA GeForce 9600M GT 512MB (1400x900)
OS: macOS Sierra

I have read the #1 post. I have the method B1B2 inserted into DSDT:

Method (B1B2, 2, NotSerialized) { Return (Or (Arg0, ShiftLeft (Arg1, 8))) }

But I'm not sure what I have to patch now to get battery status to work. I read the post #1 but couldnt figure out what exactly to do.

I have 2 EmbeddedControl regions.

Code:
                    OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
                    Field (ERAM, ByteAcc, Lock, Preserve)
                    {
                        Offset (0x02), 
                        MCER,   8, 
                        Offset (0x10), 
                        BMFN,   72, 
                        Offset (0x20), 
                            ,   4, 
                        BMF1,   3, 
                        BTY1,   1, 
                        BST1,   8, 
                        BRC1,   16, 
                        BTM1,   16, 
                        BPV1,   16, 
                        BDV1,   16, 
                        BDC1,   16, 
                        BSME,   16, 
                        GAU1,   8, 
                        Offset (0x60), 
                        SMPR,   8, 
                        SMST,   8, 
                        SMAD,   8, 
                        SMCM,   8, 
                        SMD0,   256, 
                        BCNT,   8, 
                        SMAA,   8, 
                        Offset (0x90), 
                        REC1,   8, 
                        REC2,   8, 
                        WEC1,   8, 
                        WEC2,   8, 
                        CHGC,   16, 
                        CHGV,   8, 
                        SHKM,   8, 
                        GHID,   8, 
                        Offset (0x9A), 
                        BAL0,   1, 
                        BAL1,   1, 
                        BAL2,   1, 
                        BAL3,   1, 
                        Offset (0x9C), 
                        BEEP,   1, 
                        FAN1,   1, 
                        FAN2,   1, 
                        CRT,    1, 
                        EXFD,   1, 
                        PHDD,   1, 
                        SHDD,   1, 
                        FDD,    1, 
                        SBTN,   1, 
                        VIDO,   1, 
                        VOLD,   1, 
                        VOLU,   1, 
                        MUTE,   1, 
                        CONT,   1, 
                        BRGT,   1, 
                        HBTN,   1, 
                        S4S,    1, 
                        SKEY,   1, 
                        BKEY,   1, 
                            ,   1, 
                        LIDA,   1, 
                        Offset (0x9F), 
                            ,   1, 
                        ELID,   1, 
                        Offset (0xA1), 
                            ,   2, 
                        VIST,   1, 
                        RFLG,   1, 
                            ,   3, 
                        DCKS,   1, 
                        DTSD,   8, 
                        S0LD,   1, 
                        S3LD,   1, 
                        VGAQ,   1, 
                        PCMQ,   1, 
                        PCMR,   1, 
                        ADP,    1, 
                        HDHL,   1, 
                        SYS7,   1, 
                        PWAK,   1, 
                        MWAK,   1, 
                        LWAK,   1, 
                        Offset (0xB0), 
                        CTMP,   8, 
                        Offset (0xB2), 
                        SKTA,   8, 
                        SKTB,   8, 
                        SKTC,   8, 
                        DTMP,   8, 
                        NTMP,   8, 
                        SADP,   8, 
                            ,   4, 
                        SC20,   1, 
                        FNFG,   1, 
                        DUTE,   1, 
                        Offset (0xB9), 
                        BRTS,   8, 
                        Offset (0xBB), 
                        WLAT,   1, 
                        BTAT,   1, 
                        WLEX,   1, 
                        BTEX,   1, 
                        KLSW,   1, 
                        Offset (0xBD), 
                        CPUN,   8, 
                        FNSP,   8, 
                        Offset (0xC0), 
                            ,   7, 
                        BTY0,   1, 
                        BST0,   8, 
                        BRC0,   16, 
                        BSN0,   16, 
                        BPV0,   16, 
                        BDV0,   16, 
                        BDC0,   16, 
                        BFC0,   16, 
                        GAU0,   8, 
                        BSCY,   8, 
                        BSCU,   16, 
                        BAC0,   16, 
                        BPTC,   8, 
                        Offset (0xD7), 
                        BSTM,   16, 
                        Offset (0xDE), 
                        BSTS,   16, 
                        Offset (0xE3), 
                        BSC1,   16, 
                        BSC2,   16, 
                        BSC3,   16, 
                        BSC4,   16, 
                        Offset (0xF4), 
                        BMD0,   16
                    }

Code:
                    OperationRegion (ECRM, EmbeddedControl, Zero, 0xFF)
                    Field (ECRM, ByteAcc, Lock, Preserve)
                    {
                        Offset (0x94), 
                        ERIB,   16, 
                        ERBD,   8, 
                        Offset (0xAC), 
                        SDTM,   8, 
                        FSSN,   4, 
                        FANU,   4, 
                        PTVL,   3, 
                            ,   4, 
                        TTHR,   1, 
                        Offset (0xBC), 
                        PJID,   8, 
                        Offset (0xBE), 
                        Offset (0xF9), 
                        RFRD,   16
                    }
 

Attachments

  • DevBook.ioreg
    2.4 MB · Views: 62
  • DSDT.aml
    41.6 KB · Views: 86
Last edited:
my files:

Hi Jasper, I only used patches from Rehab Repository for ASUS notebooks. There was 2 version of these avialble, so I made 2 different versions of your DSDT. You just have to try which one of these might work foryou. No any other patched made, only battery patches. You probably have to use other fixes too if needed.
 

Attachments

  • jasper321.zip
    63.8 KB · Views: 82
i gonna try it, thanks for commenting, hopefully it works, if it works, u get a donation :D
 
u are my hero, i love you so much, how can i thank you?
 
Thank you!

I have updated my profile/signature. Not sure that it's enough.

Mobo: HP Pavillion DV7 1250en (Clover Legacy / from EFI partition)
CPU: 2,0 GHz Intel(R) Core(TM)2 Duo CPU T6400 @ 2.00GHz x 2
Graphics: NVIDIA GeForce 9600M GT 512MB (1400x900)
OS: macOS Sierra

I have read the #1 post. I have the method B1B2 inserted into DSDT:

Method (B1B2, 2, NotSerialized) { Return (Or (Arg0, ShiftLeft (Arg1, 8))) }

But I'm not sure what I have to patch now to get battery status to work. I read the post #1 but couldnt figure out what exactly to do.

I have 2 EmbeddedControl regions.

Code:
                    OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
                    Field (ERAM, ByteAcc, Lock, Preserve)
                    {
                        Offset (0x02),
                        MCER,   8,
                        Offset (0x10),
                        BMFN,   72,
                        Offset (0x20),
                            ,   4,
                        BMF1,   3,
                        BTY1,   1,
                        BST1,   8,
                        BRC1,   16,
                        BTM1,   16,
                        BPV1,   16,
                        BDV1,   16,
                        BDC1,   16,
                        BSME,   16,
                        GAU1,   8,
                        Offset (0x60),
                        SMPR,   8,
                        SMST,   8,
                        SMAD,   8,
                        SMCM,   8,
                        SMD0,   256,
                        BCNT,   8,
                        SMAA,   8,
                        Offset (0x90),
                        REC1,   8,
                        REC2,   8,
                        WEC1,   8,
                        WEC2,   8,
                        CHGC,   16,
                        CHGV,   8,
                        SHKM,   8,
                        GHID,   8,
                        Offset (0x9A),
                        BAL0,   1,
                        BAL1,   1,
                        BAL2,   1,
                        BAL3,   1,
                        Offset (0x9C),
                        BEEP,   1,
                        FAN1,   1,
                        FAN2,   1,
                        CRT,    1,
                        EXFD,   1,
                        PHDD,   1,
                        SHDD,   1,
                        FDD,    1,
                        SBTN,   1,
                        VIDO,   1,
                        VOLD,   1,
                        VOLU,   1,
                        MUTE,   1,
                        CONT,   1,
                        BRGT,   1,
                        HBTN,   1,
                        S4S,    1,
                        SKEY,   1,
                        BKEY,   1,
                            ,   1,
                        LIDA,   1,
                        Offset (0x9F),
                            ,   1,
                        ELID,   1,
                        Offset (0xA1),
                            ,   2,
                        VIST,   1,
                        RFLG,   1,
                            ,   3,
                        DCKS,   1,
                        DTSD,   8,
                        S0LD,   1,
                        S3LD,   1,
                        VGAQ,   1,
                        PCMQ,   1,
                        PCMR,   1,
                        ADP,    1,
                        HDHL,   1,
                        SYS7,   1,
                        PWAK,   1,
                        MWAK,   1,
                        LWAK,   1,
                        Offset (0xB0),
                        CTMP,   8,
                        Offset (0xB2),
                        SKTA,   8,
                        SKTB,   8,
                        SKTC,   8,
                        DTMP,   8,
                        NTMP,   8,
                        SADP,   8,
                            ,   4,
                        SC20,   1,
                        FNFG,   1,
                        DUTE,   1,
                        Offset (0xB9),
                        BRTS,   8,
                        Offset (0xBB),
                        WLAT,   1,
                        BTAT,   1,
                        WLEX,   1,
                        BTEX,   1,
                        KLSW,   1,
                        Offset (0xBD),
                        CPUN,   8,
                        FNSP,   8,
                        Offset (0xC0),
                            ,   7,
                        BTY0,   1,
                        BST0,   8,
                        BRC0,   16,
                        BSN0,   16,
                        BPV0,   16,
                        BDV0,   16,
                        BDC0,   16,
                        BFC0,   16,
                        GAU0,   8,
                        BSCY,   8,
                        BSCU,   16,
                        BAC0,   16,
                        BPTC,   8,
                        Offset (0xD7),
                        BSTM,   16,
                        Offset (0xDE),
                        BSTS,   16,
                        Offset (0xE3),
                        BSC1,   16,
                        BSC2,   16,
                        BSC3,   16,
                        BSC4,   16,
                        Offset (0xF4),
                        BMD0,   16
                    }

Code:
                    OperationRegion (ECRM, EmbeddedControl, Zero, 0xFF)
                    Field (ECRM, ByteAcc, Lock, Preserve)
                    {
                        Offset (0x94),
                        ERIB,   16,
                        ERBD,   8,
                        Offset (0xAC),
                        SDTM,   8,
                        FSSN,   4,
                        FANU,   4,
                        PTVL,   3,
                            ,   4,
                        TTHR,   1,
                        Offset (0xBC),
                        PJID,   8,
                        Offset (0xBE),
                        Offset (0xF9),
                        RFRD,   16
                    }

Read post #1. Make sure you go through the example DSDT before attempting your own.

You have quite a few fields to patch and there is no existing patch that matches (although there are some patches you can borrow).
 
Back
Top