Contribute
Register

[Guide] Patching LAPTOP DSDT/SSDTs

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:
 
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.
 
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:
 
@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

  • DSDT.dsl
    1.1 MB · Views: 183
I do not get correct battery percentage and it doesn't get charged under macOS. Please help me @RehabMan.
 
@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

  • SSDT-4-sensrhub.dsl
    5.1 KB · Views: 129
Last edited:
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

  • DSDT.dsl
    944.5 KB · Views: 167
  • Screen Shot 2019-04-27 at 11.33.27 AM.png
    Screen Shot 2019-04-27 at 11.33.27 AM.png
    243.2 KB · Views: 124
  • DSDT.aml
    134.4 KB · Views: 146
  • debug_7058.zip
    3.9 MB · Views: 109
Last edited:
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.
 

Attachments

  • debug_7058.zip
    3.9 MB · Views: 123
Back
Top