Contribute
Register

[Guide] Patching LAPTOP DSDT/SSDTs

Joined
Jul 25, 2013
Messages
17
Motherboard
ASUS Z170-P
CPU
i7-6700
Graphics
GTX 960 Ti
Mobile Phone
iOS
Decompile your DSDT and SSDTs with iasl -da -dl DSDT.aml SSDT-*.aml


View attachment 390951
That is the fix for the first two errors:

Before:
Code:
                If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
                    Store (Zero, ECRW (If (PM0H)
                            {
                                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                                Store (Zero, F0LN)
                            }))
                }
After:
Code:
                If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
                    Store (Zero, ECRW) If (PM0H)
                            {
                                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                                Store (Zero, F0LN)
                            }
                }
Then you have to fix the last error:

View attachment 390952
From:
Code:
    Method (ADBG, 1, Serialized)
    {
        If (CondRefOf (MDBG))
        {
            Return (MDBG)
            Arg0
        }

        Return (Zero)
    }
To:
Code:
    Method (ADBG, 1, Serialized)
    {
        If (CondRefOf (MDBG))
        {
            Store (Arg0, MDBG)
            Return
        }

        Return (Zero)
    }
Result:
View attachment 390954
As you can see your errors are described in post #1.
Please read carefully.
Yea , i have fixed the first two errors but I can’t able to fix the last one, now am clear and will try once i get home, thank you so much for your help !!!
 
Joined
Jul 25, 2013
Messages
17
Motherboard
ASUS Z170-P
CPU
i7-6700
Graphics
GTX 960 Ti
Mobile Phone
iOS
Decompile your DSDT and SSDTs with iasl -da -dl DSDT.aml SSDT-*.aml


View attachment 390951
That is the fix for the first two errors:

Before:
Code:
                If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
                    Store (Zero, ECRW (If (PM0H)
                            {
                                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                                Store (Zero, F0LN)
                            }))
                }
After:
Code:
                If (LEqual (PM6H, One))
                {
                    CreateBitField (BUF0, \_SB.PCI0._Y0C._RW, ECRW)  // _RW_: Read-Write Status
                    Store (Zero, ECRW) If (PM0H)
                            {
                                CreateDWordField (BUF0, \_SB.PCI0._Y0D._LEN, F0LN)  // _LEN: Length
                                Store (Zero, F0LN)
                            }
                }
Then you have to fix the last error:

View attachment 390952
From:
Code:
    Method (ADBG, 1, Serialized)
    {
        If (CondRefOf (MDBG))
        {
            Return (MDBG)
            Arg0
        }

        Return (Zero)
    }
To:
Code:
    Method (ADBG, 1, Serialized)
    {
        If (CondRefOf (MDBG))
        {
            Store (Arg0, MDBG)
            Return
        }

        Return (Zero)
    }
Result:
View attachment 390954
As you can see your errors are described in post #1.
Please read carefully.
Whoooo !!! Yeahhh !!! it worked, Thank you so much. Appreciated :headbang:
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
191,731
Motherboard
Intel DH67BL
CPU
Core i7-2600K
Graphics
Intel HD 3000
Mac
MacBook Air
Mobile Phone
iOS
Fixed as u said already using ACPI 6.1 but I cannot fix the $end of premature file error, Please help me fix it . Please look at the .dsl attached in the post 3,095
Post #3095 .dsl has incorrect/failed patches applied.
Check for error free compilation after each edit.
 
Joined
Jul 25, 2013
Messages
17
Motherboard
ASUS Z170-P
CPU
i7-6700
Graphics
GTX 960 Ti
Mobile Phone
iOS
Post #3095 .dsl has incorrect/failed patches applied.
Check for error free compilation after each edit.
Yeah, Looked into it !! Made the Right Correction and now it's fine :headbang:

Thank you so much for your help :thumbup:
 
Joined
Dec 20, 2018
Messages
94
Motherboard
Gigabyte Z370 AORUS Gaming 7
CPU
i7-8700K OC 5GHz
Graphics
GTX 1080 Ti & UHD 630
Mac
iMac, MacBook Pro
Mobile Phone
iOS
@RehabMan I am trying to compile DSDT for battery audio and touchscreen for Dell Inspiron 15 7573 2 in 1 i7 8550u 16gb 512 uhd 620 and Nvidia m130x. I've followed all the steps to output dsdt.dsl file. when I open the file, and just try to compile (without any patches) I get scope error in (_GPE). I can fix the zero error but cannot fix the $end file error. please help. if you have somewhere I can contribute, ill do so immediately.thanks
 

Attachments

Joined
Mar 30, 2019
Messages
2
Motherboard
HP Pavilion 15T-BC200
CPU
i7-7700HQ
Graphics
GTX 1050
Mac
MacBook Pro
Mobile Phone
Android
I do not get correct battery percentage and it doesn't get charged under macOS. Please help me @RehabMan.
 
Joined
Dec 20, 2018
Messages
94
Motherboard
Gigabyte Z370 AORUS Gaming 7
CPU
i7-8700K OC 5GHz
Graphics
GTX 1080 Ti & UHD 630
Mac
iMac, MacBook Pro
Mobile Phone
iOS
@Feartech bro I'm having a problem with my sensorshub.dsl. I have dell 15 7000 i7 8550u touchscreen. at first I couldn't compile the dsdt. fixed that. after patching dsdt, touchscreen and battery still does not work. so I was going through the .dsl files seeing if any of them present an error when trying to compile. bro can you please help me? if you have somewhere I can send a contribution, ill do so immediately


this is what the error field looks like :
}

If (LEqual (\_SB.GGOV (0x02010016), One))
{
Sleep (0x96)
If (LEqual (\_SB.GGOV (0x02010014), One)){}
Else
{
Notify (\_SB.PCI0.I2C0.DFUD, One)
}
}

Return (Zero)
}
Case (0x02)
{
Store (DerefOf (Index (Arg3, Zero)), DFUE)
Store (DerefOf (Index (Arg3, One)), DFUD)
Store (\_SB.GGOV (0x02010014), OLDV)
\_SB.GGOV (0x02010014)
DFUE
If (LGreater (DFUD, Zero))
{
Sleep (DFUD)
\_SB.GGOV (0x02010014)
OLDV
}
 

Attachments

Last edited:
Joined
Apr 24, 2019
Messages
13
Motherboard
Lenovo E580 (20KS003AXS)
CPU
i5-8250U
Graphics
UHD620, RX 550
Hello,
@RehabMan I'm trying to apply battery patch for my Lenovo E580. I've taken aml files from Clover origin folder and de-compile it (tried with/withhout '-da').
This de-compiled DSDT file cannot be compiled again even though I did not make any change in it. MaciASL returns an error - 'syntax error, unexpected PARSEOP_NAME'.
How this error can be fixed? Please help.
 

Attachments

Last edited:
Joined
Jan 15, 2016
Messages
58
Motherboard
Acer Aspire 7 A717-72G
CPU
i7-8750H
Graphics
UHD 630/GTX1060
Mac
MacBook Pro
Mobile Phone
iOS
Hello,
@RehabMan I'm trying to apply battery patch for my Lenovo E580. I've taken aml files from Clover origin folder and de-compile it (tried with/withhout '-da').
This de-compiled DSDT file cannot be compiled again even though I did not make any change in it. MaciASL returns an error - 'syntax error, unexpected PARSEOP_NAME'.
How this error can be fixed? Please help.

Your problem reporting files are incomplete. Please fix it.
 
Top