Jump to content
13 posts in this topic

Recommended Posts

two weeks ago I had a successful installation on my new machine but {censored}. My device still has the same battery error as the previous device. (please help me from idiot battery). My device only receives half of its original battery capacity. 1535mAh/5000mAh (I checked the exact capacity on Asus support. My battery is not damaged because I use dual window. The window side is fine. I spent a week trying to find a way to patch my battery but failed. I don't know where I'm wrong
- I changed the 32bit values to x4 8bit but somehow it still doesn't work
- I have enough renames.

- If someone understands ACPI well, please help me. Thank you very much..

 

- Below is also my code, DSDT, SSDT-STUPID ( battery acpi )


The following is my code :

Spoiler
/*
 * Intel ACPI Component Architecture
 * AML/ASL+ Disassembler version 20210930 (32-bit version)
 * Copyright (c) 2000 - 2021 Intel Corporation
 * 
 * Disassembling to symbolic ASL+ operators
 *
 * Disassembly of C:/Users/hoaug/Desktop/Patch Battery/SSDT-STUPID.aml, Tue Oct 10 02:08:53 2023
 *
 * Original Table Header:
 *     Signature        "SSDT"
 *     Length           0x00000BC9 (3017)
 *     Revision         0x02
 *     Checksum         0x09
 *     OEM ID           "ACDT"
 *     OEM Table ID     "BATT"
 *     OEM Revision     0x00000000 (0)
 *     Compiler ID      "INTL"
 *     Compiler Version 0x20210930 (539035952)
 */
DefinitionBlock ("", "SSDT", 2, "ACDT", "BATT", 0x00000000)
{
    External (_SB_.PCI0.LPCB.EC0_, DeviceObj)
    External (_SB_.PCI0.LPCB.EC0_.ACAP, MethodObj)    // 0 Arguments
    External (_SB_.PCI0.LPCB.EC0_.BAT0, DeviceObj)
    External (_SB_.PCI0.LPCB.EC0_.BAT0._BIF, MethodObj)    // 0 Arguments
    External (_SB_.PCI0.LPCB.EC0_.BAT0.BIXT, PkgObj)
    External (_SB_.PCI0.LPCB.EC0_.BAT0.NBIX, PkgObj)
    External (_SB_.PCI0.LPCB.EC0_.BAT0.PBIF, PkgObj)
    External (_SB_.PCI0.LPCB.EC0_.BAT0.XBIX, MethodObj)    // 0 Arguments
    External (_SB_.PCI0.LPCB.EC0_.BATP, MethodObj)    // 1 Arguments
    External (_SB_.PCI0.LPCB.EC0_.BLLO, IntObj)
    External (_SB_.PCI0.LPCB.EC0_.BRAD, FieldUnitObj)
    External (_SB_.PCI0.LPCB.EC0_.BRAH, FieldUnitObj)
    External (_SB_.PCI0.LPCB.EC0_.BRAI, FieldUnitObj)
    External (_SB_.PCI0.LPCB.EC0_.BSLF, IntObj)
    External (_SB_.PCI0.LPCB.EC0_.CHGS, MethodObj)    // 1 Arguments
    External (_SB_.PCI0.LPCB.EC0_.CMUT, MutexObj)
    External (_SB_.PCI0.LPCB.EC0_.ECAV, MethodObj)    // 0 Arguments
    External (_SB_.PCI0.LPCB.EC0_.GBTT, MethodObj)    // 1 Arguments
    External (_SB_.PCI0.LPCB.EC0_.LFCC, IntObj)
    External (_SB_.PCI0.LPCB.EC0_.MBLF, IntObj)
    External (_SB_.PCI0.LPCB.EC0_.PBST, IntObj)
    External (_SB_.PCI0.LPCB.EC0_.PUNT, IntObj)
    External (_SB_.PCI0.LPCB.EC0_.STC4, MethodObj)    // 1 Arguments
    External (BIXT, IntObj)
    External (BLLO, IntObj)
    External (BSLF, IntObj)
    External (LFCC, IntObj)
    External (PUNT, IntObj)
External (_SB_.PCI0.LPCB.EC0.BAIX, FieldUnitObj)
External (_SB_.PCI0.LPCB.EC0.BADX, FieldUnitObj)
 
    Method (B1B2, 2, NotSerialized)
    {
        Return ((Arg0 | (Arg1 << 0x08)))
    }
 
    Method (B1B4, 4, NotSerialized)
    {
        Local0 = (Arg2 | (Arg3 << 0x08))
        Local0 = (Arg1 | (Local0 << 0x08))
        Local0 = (Arg0 | (Local0 << 0x08))
        Return (Local0)
    }
 
    Method (W16B, 3, NotSerialized)
    {
        Arg0 = Arg2
        Arg1 = (Arg2 >> 0x08)
    }
 
    Scope (_SB.PCI0.LPCB.EC0)
    {
        OperationRegion (BRIX, SystemIO, 0x0381, One)
        Field (BRIX, ByteAcc, Lock, Preserve)
        {
            BRAH,   8
        }
 
        OperationRegion (BRAX, SystemIO, 0x0382, 0x02)
        Field (BRAX, ByteAcc, Lock, Preserve)
        {
            BRAI,   8, 
            BRAD,   8
        }
 
        IndexField (BAIX, BADX, ByteAcc, NoLock, Preserve)
        {
            Offset (0x04), 
            Offset (0x40), 
            Offset (0x6E), 
            Offset (0x8E), 
            Offset (0x90), 
            EB0S,   8, 
            Offset (0x98), 
            Offset (0x9C), 
            BVL0,   8, 
            BVL1,   8, 
            BVL2,   8, 
            BVL3,   8, 
            BRC0,   8, 
            BRC1,   8, 
            BRC2,   8, 
            BRC3,   8, 
            BFC0,   8, 
            BFC1,   8, 
            BFC2,   8, 
            BFC3,   8, 
            BMD0,   8, 
            BMD1,   8, 
            BMD2,   8, 
            BMD3,   8, 
            BST0,   8, 
            BST1,   8, 
            BST2,   8, 
            BST3,   8, 
            BCC0,   8, 
            BCC1,   8, 
            BCC2,   8, 
            BCC3,   8, 
            BDC0,   8, 
            BDC1,   8, 
            BDC2,   8, 
            BDC3,   8, 
            BDV0,   8, 
            BDV1,   8, 
            BDV2,   8, 
            BDV3,   8
        }
 
        Method (BVOT, 0, NotSerialized)
        {
            Acquire (CMUT, 0xFFFF)
            If (BSLF)
            {
                BRAH = 0xC9
                Local0 = B1B4 (BVL0, BVL1, BVL2, BVL3)
            }
 
            Release (CMUT)
            Return (Local0)
        }
 
        Method (BRCP, 0, NotSerialized)
        {
            Acquire (CMUT, 0xFFFF)
            If (BSLF)
            {
                BRAH = 0xC9
                Local0 = B1B4 (BRC0, BRC1, BRC2, BRC3)
            }
 
            Release (CMUT)
            If ((Local0 == 0xFFFF))
            {
                Local0 = Ones
            }
 
            Return (Local0)
        }
 
        Method (BIF2, 0, NotSerialized)
        {
            If (ECAV ())
            {
                Acquire (CMUT, 0xFFFF)
                If (BSLF)
                {
                    BRAH = 0xC9
                    Local0 = B1B4 (BFC0, BFC1, BFC2, BFC3)
                }
 
                Release (CMUT)
                Local0 &= 0xFFFF
            }
            Else
            {
                Local0 = Ones
            }
 
            Return (Local0)
        }
 
        Method (BIF3, 0, NotSerialized)
        {
            If (ECAV ())
            {
                Acquire (CMUT, 0xFFFF)
                If (BSLF)
                {
                    BRAH = 0xC9
                    Local0 = B1B4 (BMD0, BMD1, BMD2, BMD3)
                }
 
                Release (CMUT)
                If ((Local0 != 0xFFFF))
                {
                    Local0 >>= 0x09
                    Local0 &= One
                    Local0 ^= One
                }
            }
            Else
            {
                Local0 = Ones
            }
 
            Return (Local0)
        }
 
        Method (BIF0, 0, NotSerialized)
        {
            If (ECAV ())
            {
                Acquire (CMUT, 0xFFFF)
                If (BSLF)
                {
                    BRAH = 0xC9
                    Local0 = B1B4 (BMD0, BMD1, BMD2, BMD3)
                }
 
                Release (CMUT)
                If ((Local0 != 0xFFFF))
                {
                    Local1 = (Local0 >> 0x0F)
                    Local1 &= One
                    Local0 = (Local1 ^ One)
                }
            }
            Else
            {
                Local0 = Ones
            }
 
            Return (Local0)
        }
 
        Method (BSTS, 0, NotSerialized)
        {
            Acquire (CMUT, 0xFFFF)
            If (BSLF)
            {
                BRAH = 0xC9
                Local0 = B1B4 (BST0, BST1, BST2, BST3)
            }
 
            Release (CMUT)
            Return (Local0)
        }
 
        Method (BCRT, 0, NotSerialized)
        {
            Acquire (CMUT, 0xFFFF)
            If (BSLF)
            {
                BRAH = 0xC9
                Local0 = B1B4 (BCC0, BCC1, BCC2, BCC3)
            }
 
            Release (CMUT)
            Return (Local0)
        }
 
        Method (BIF1, 0, NotSerialized)
        {
            If (ECAV ())
            {
                Acquire (CMUT, 0xFFFF)
                If (BSLF)
                {
                    BRAH = 0xC9
                    Local0 = B1B4 (BDC0, BDC1, BDC2, BDC3)
                }
 
                Release (CMUT)
                Local0 &= 0xFFFF
            }
            Else
            {
                Local0 = Ones
            }
 
            Return (Local0)
        }
 
        Method (BIF4, 0, NotSerialized)
        {
            If (ECAV ())
            {
                Acquire (CMUT, 0xFFFF)
                If (BSLF)
                {
                    BRAH = 0xC9
                    Local0 = B1B4 (BDV0, BDV1, BDV2, BDV3)
                }
 
                Release (CMUT)
            }
            Else
            {
                Local0 = Ones
            }
 
            Return (Local0)
        }
 
        Method (FBST, 4, NotSerialized)
        {
            Local1 = (Arg1 & 0xFFFF)
            Local0 = Zero
            If (ACAP ())
            {
                Local0 = One
            }
 
            If (Local0)
            {
                If (CHGS (Zero))
                {
                    Local0 = 0x02
                }
                Else
                {
                    Local0 = One
                }
            }
            Else
            {
                Local0 = One
            }
 
            If (BLLO)
            {
                Local2 = 0x04
                Local0 |= Local2
            }
 
            BRAH = 0xC9
            If ((EB0S & 0x08))
            {
                Local2 = 0x04
                Local0 |= Local2
            }
 
            If ((Local1 >= 0x8000))
            {
                Local1 = (0xFFFF - Local1)
            }
 
            Local2 = Arg2
            If ((PUNT == Zero))
            {
                Acquire (CMUT, 0xFFFF)
                BRAH = 0xC9
                Local1 *= B1B4 (BDV0, BDV1, BDV2, BDV3)
                Release (CMUT)
                Local2 *= 0x0A
            }
 
            Local3 = (Local0 & 0x02)
            If (!Local3)
            {
                Local3 = (LFCC - Local2)
                Divide (LFCC, 0xC8, Local4, Local5)
                If ((Local3 < Local5))
                {
                    Local2 = LFCC /* External reference */
                }
            }
            Else
            {
                Divide (LFCC, 0xC8, Local4, Local5)
                Local4 = (LFCC - Local5)
                If ((Local2 > Local4))
                {
                    Local2 = Local4
                }
            }
 
            If (!ACAP ())
            {
                Divide (Local2, MBLF, Local3, Local4)
                If ((Local1 < Local4))
                {
                    Local1 = Local4
                }
            }
 
            PBST [Zero] = Local0
            PBST [One] = Local1
            PBST [0x02] = Local2
            PBST [0x03] = Arg3
        }
 
        Method (CBST, 0, NotSerialized)
        {
            If (PUNT)
            {
                Acquire (CMUT, 0xFFFF)
                BRAH = 0xC9
                PBST [0x03] = B1B4 (BDV0, BDV1, BDV2, BDV3)
                Release (CMUT)
                Local0 = DerefOf (PBST [0x03])
                PBST [One] = (DerefOf (PBST [One]) * Local0)
                PBST [One] = (DerefOf (PBST [One]) / 0x03E8)
                PBST [0x02] = (DerefOf (PBST [0x02]) * Local0)
                PBST [0x02] = (DerefOf (PBST [0x02]) / 0x03E8)
            }
        }
 
        Method (RE1B, 1, NotSerialized)
        {
            OperationRegion (ERM2, EmbeddedControl, Arg0, One)
            Field (ERM2, ByteAcc, NoLock, Preserve)
            {
                BYTE,   8
            }
 
            Return (BYTE) /* \_SB_.PCI0.LPCB.EC0_.RE1B.BYTE */
        }
 
        Method (RECB, 2, Serialized)
        {
            Arg1 = ((Arg1 + 0x07) >> 0x03)
            Name (TEMP, Buffer (Arg1){})
            Arg1 += Arg0
            Local0 = Zero
            While ((Arg0 < Arg1))
            {
                TEMP [Local0] = RE1B (Arg0)
                Arg0++
                Local0++
            }
 
            Return (TEMP) /* \_SB_.PCI0.LPCB.EC0_.RECB.TEMP */
        }
 
        Method (WE1B, 2, NotSerialized)
        {
            OperationRegion (ERM2, EmbeddedControl, Arg0, One)
            Field (ERM2, ByteAcc, NoLock, Preserve)
            {
                BYTE,   8
            }
 
            BYTE = Arg1
        }
 
        Method (WECB, 3, Serialized)
        {
            Arg1 = ((Arg1 + 0x07) >> 0x03)
            Name (TEMP, Buffer (Arg1){})
            TEMP = Arg2
            Arg1 += Arg0
            Local0 = Zero
            While ((Arg0 < Arg1))
            {
                WE1B (Arg0, DerefOf (TEMP [Local0]))
                Arg0++
                Local0++
            }
        }
    }
 
    Scope (_SB.PCI0.LPCB.EC0.BAT0)
    {
        Method (_BIX, 0, NotSerialized)  // _BIX: Battery Information Extended
        {
            If (_OSI ("Darwin"))
            {
                If (!BATP (Zero))
                {
                    Return (\_SB.PCI0.LPCB.EC0.BAT0.XBIX ())
                }
 
                If ((GBTT (Zero) == 0xFF))
                {
                    Return (\_SB.PCI0.LPCB.EC0.BAT0.XBIX ())
                }
 
                _BIF ()
                BIXT [One] = DerefOf (PBIF [Zero])
                BIXT [0x02] = DerefOf (PBIF [One])
                BIXT [0x03] = DerefOf (PBIF [0x02])
                BIXT [0x04] = DerefOf (PBIF [0x03])
                BIXT [0x05] = DerefOf (PBIF [0x04])
                BIXT [0x06] = DerefOf (PBIF [0x05])
                BIXT [0x07] = DerefOf (PBIF [0x06])
                BIXT [0x0E] = DerefOf (PBIF [0x07])
                BIXT [0x0F] = DerefOf (PBIF [0x08])
                BIXT [0x10] = DerefOf (PBIF [0x09])
                BIXT [0x11] = DerefOf (PBIF [0x0A])
                BIXT [0x12] = DerefOf (PBIF [0x0B])
                BIXT [0x13] = DerefOf (PBIF [0x0C])
                If ((DerefOf (BIXT [One]) == One))
                {
                    BIXT [One] = Zero
                    Local0 = DerefOf (BIXT [0x05])
                    BIXT [0x02] = (DerefOf (BIXT [0x02]) * Local0)
                    BIXT [0x03] = (DerefOf (BIXT [0x03]) * Local0)
                    BIXT [0x06] = (DerefOf (BIXT [0x06]) * Local0)
                    BIXT [0x07] = (DerefOf (BIXT [0x07]) * Local0)
                    BIXT [0x0E] = (DerefOf (BIXT [0x0E]) * Local0)
                    BIXT [0x0F] = (DerefOf (BIXT [0x0F]) * Local0)
                    Divide (DerefOf (BIXT [0x02]), 0x03E8, Local0, BIXT [0x02])
                    Divide (DerefOf (BIXT [0x03]), 0x03E8, Local0, BIXT [0x03])
                    Divide (DerefOf (BIXT [0x06]), 0x03E8, Local0, BIXT [0x06])
                    Divide (DerefOf (BIXT [0x07]), 0x03E8, Local0, BIXT [0x07])
                    Divide (DerefOf (BIXT [0x0E]), 0x03E8, Local0, BIXT [0x0E])
                    Divide (DerefOf (BIXT [0x0F]), 0x03E8, Local0, BIXT [0x0F])
                }
 
                Local0 = (STC4 (0x2F) << 0x08)
                Local0 += STC4 (0x2E)
                BIXT [0x08] = Local0
                BIXT [0x09] = 0x0001869F
                Return (BIXT) /* External reference */
            }
            Else
            {
                Return (\_SB.PCI0.LPCB.EC0.BAT0.XBIX ())
            }
        }
    }
}

SSDT-STUPID.aml DSDT Asus.dsl

Edited by kinhhoang161
  • 2 weeks later...
  • 2 months later...

@hoping @SavageAUS Thank you for helping me. But I'm really sorry I gave up. After a few months of trying but to no avail, I decided to sell the device. I will mark the topic as not solved.

@kinhhoang161 Try usse this SSDT and extract yours SSDTS with SSDTTime and not use DSDT with it, need choose exactly pacth and not have one on RehabMan repo with MAciASL

 

Check this repo on GitHub 

 

https://github.com/jsassu20/OpenCore-HotPatching-Guide/tree/master/08-Battery Patch/08-2-Other brands

 

 

You need use SMCBatteryManager and ECEnabler kexts too, and DellSensors.kext too.

 

 

If you use wrong SSDTs could  draining  your Battery

 

 

 

SSDT-BAT0-DELL-ASUS.zip

Edited by Max.1974

@Slice it is not working. But I don't use it anymore. How can I close this Topic or can you help me close it. Thank you very much

@Max.1974 Thank you very much, but I have already sold the device. Hope your help can help people facing the same problem as me

  • Like 1
13 hours ago, kinhhoang161 said:

@Slice it is not working. But I don't use it anymore. How can I close this Topic or can you help me close it. Thank you very much

@Max.1974 Thank you very much, but I have already sold the device. Hope your help can help people facing the same problem as me

 

Thanks my friend, you are welcome!! 

 

Best regards! 

two weeks ago I had a successful installation on my new machine but {censored}. My device still has the same battery error as the previous device. (please help me from idiot battery). My device only receives half of its original battery capacity. 1535mAh/5000mAh (I checked the exact capacity on Asus support. My battery is not damaged because I use dual window. The window side is fine. I spent a week trying to find a way to patch my battery but failed. I don't know where I'm wron Thanks Regards: Pubg Name Generator

Edited by Alicja Brook
1 hour ago, Alicja Brook said:

two weeks ago I had a successful installation on my new machine but {censored}. My device still has the same battery error as the previous device. (please help me from idiot battery). My device only receives half of its original battery capacity. 1535mAh/5000mAh (I checked the exact capacity on Asus support. My battery is not damaged because I use dual window. The window side is fine. I spent a week trying to find a way to patch my battery but failed. I don't know where I'm wron Thanks

You should consider different kexts: ACPIBatteryManager or VoodooBatterySMC or else. They lead to different results depending on your hardware.

 

And please make a signature

[Video] How to add a signature.

 

  • 5 months later...

BIOS F22i, i5-6400, RX570, HD530, ALC1150 Win10, 10.14.6(18G9323), Sequoia 15.0b (24A5279h) ,  Clover 515. ASUS X200CA, Pentium 2117U, 4GB, HD2500 (Software OpenGL), Mojave 10.14.6 (18G9323), Clover515Huananzhi X79M PRO, Xeon E5-2650v2, RX570, ALC887,  macOS 12.6 (21G115), 10.14.6 (18G9323), Win10, multiboot by Clover 5150.GA 965P-S1, E6300 Conroe, Rad Freefire Stylish Name 

Edited by freefirenickname1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...