Contribute
Register

[Guide] Patching LAPTOP DSDT/SSDTs

Disassembling ACPI files

Although the extracted native files can be opened directly in MaciASL, it is not recommended. Opening an AML file directly in MaciASL will cause MaciASL to disassemble the file (with iasl) standalone, and if the AML has complex references to other AMLs, it will not disassemble it correctly. You'll be left with many hard to fix errors.

As a result, it is better to disassemble all files as a group using iasl in Terminal. To prepare, place all DSDT and SSDT files in a single directory (DO NOT copy ACPI files that don't begin with DSDT or SSDT), and change the names such that they have an .aml extension. You will need a recent build of iasl to disassemble them properly. There is an appropriate version available here: https://bitbucket.org/RehabMan/acpica/downloads. It is a good idea to copy the iasl binary to your path (eg. /usr/bin), so it is easily accessed from Terminal.

In OS X Terminal:
Code:
cd "to directory where you placed all SSDT/DSDT"
iasl -da -dl *.aml

Note: Do NOT attempt to disassemble other ACPI files with the -da option. It will not work.

From this point onward, you will work exclusively with the resulting *.dsl files using MaciASL. Of course, to use them you must save as "ACPI Machine Language Binary" with an extension .aml and place them where they will be loaded by the bootloader. But keep your patched .dsl files in case you need to apply more patches in the future.

Let me state it quite simply (because this comes up a lot): If you are opening an AML file directly in MaciASL and clicking Compile, you are doing it WRONG. Let that soak into the gray matter between your ears for a minute.


When inputting iasl -da -dl *.aml into terminal, I get a responce of -bash: iasl: command not found. How else should I disassemble the files? Or should I follow the Fast Lane instructions from [guide] Asus Zenbook UX305FA Using Clover UEFI? This is not the first post install issue I've had, since I'm trying to progress without a working bootloader (mentioned in thread on PTIDSensors), and will then have to fix the battery display, wifi, backlight control, and audio. I have the links bookmarked for them, but I cant get to them until I deal with the dissasembly and bootloader issues.
 
When inputting iasl -da -dl *.aml into terminal, I get a responce of -bash: iasl: command not found. How else should I disassemble the files? Or should I follow the Fast Lane instructions from [guide] Asus Zenbook UX305FA Using Clover UEFI? This is not the first post install issue I've had, since I'm trying to progress without a working bootloader (mentioned in thread on PTIDSensors), and will then have to fix the battery display, wifi, backlight control, and audio. I have the links bookmarked for them, but I cant get to them until I deal with the dissasembly and bootloader issues.

You need to download iasl and copy it to /usr/bin.
 
Hey RehabMan!
I have been trying to patch the DSDT/SSDT files...
I followed your guide in post #1, I have successfully disassembled all the .dsl files: DSDT.dsl, SSDT-0.dsl to SSDT-10.dsl. Some of them are with "x" at the end of the filename: SSDT-3x.dsl, SSDT-4x.dsl, SSDT-5x.dsl
I opened all of them one by one to compile and fix errors using your version of MaciASL. I got all of them fixed except SSDT-6.dsl, which is giving me a headache.

I tried complie it but there are errors, of course.
Code:
1537, 6105, Invalid object type for reserved name (_PSS: found Integer at index 0, Package required)
1552, 6105, Invalid object type for reserved name (_TSS: found Integer at index 0, Package required)
1655, 6105, Invalid object type for reserved name (_TSD: found Integer at index 0, Package required)
1988, 3115, Not all control paths return a value (STDP)
2247, 6105, Invalid object type for reserved name (_PSS: found Integer at index 0, Package required)
2262, 6105, Invalid object type for reserved name (_TSS: found Integer at index 0, Package required)
2287, 6106, Invalid package length for reserved name (_PTC: length 1, required minimum is 2)
2304, 6105, Invalid object type for reserved name (_TSD: found Integer at index 0, Package required)

I tried apply "Remove _PSS placeholders", complied it and got an different error.
Code:
6126, syntax error, unexpected ')', expecting ','

I have also tried apply other patches like "_PLD Buffer/Package Error" and delete the "Zero"(highlighted when clicked on the error), but still no luck

I have no idea how to deal with this, so please help!! Thanks!
 

Attachments

  • SSDT-6.dsl
    80.9 KB · Views: 214
Hey RehabMan!
I have been trying to patch the DSDT/SSDT files...
I followed your guide in post #1, I have successfully disassembled all the .dsl files: DSDT.dsl, SSDT-0.dsl to SSDT-10.dsl. Some of them are with "x" at the end of the filename: SSDT-3x.dsl, SSDT-4x.dsl, SSDT-5x.dsl
I opened all of them one by one to compile and fix errors using your version of MaciASL. I got all of them fixed except SSDT-6.dsl, which is giving me a headache.

I tried complie it but there are errors, of course.
Code:
1537, 6105, Invalid object type for reserved name (_PSS: found Integer at index 0, Package required)
1552, 6105, Invalid object type for reserved name (_TSS: found Integer at index 0, Package required)
1655, 6105, Invalid object type for reserved name (_TSD: found Integer at index 0, Package required)
1988, 3115, Not all control paths return a value (STDP)
2247, 6105, Invalid object type for reserved name (_PSS: found Integer at index 0, Package required)
2262, 6105, Invalid object type for reserved name (_TSS: found Integer at index 0, Package required)
2287, 6106, Invalid package length for reserved name (_PTC: length 1, required minimum is 2)
2304, 6105, Invalid object type for reserved name (_TSD: found Integer at index 0, Package required)

I tried apply "Remove _PSS placeholders", complied it and got an different error.
Code:
6126, syntax error, unexpected ')', expecting ','

I have also tried apply other patches like "_PLD Buffer/Package Error" and delete the "Zero"(highlighted when clicked on the error), but still no luck

I have no idea how to deal with this, so please help!! Thanks!

In SSDT-6.dsl, just remove the 'Else' block causing the error.

eg.

From:
Code:
        Method (_PSS, 0, NotSerialized)  // _PSS: Performance Supported States
        {
            If (CondRefOf (\_PR.CPU0._PSS))
            {
                Return (\_PR.CPU0._PSS)
            }
            Else
            {
                Return (Package (0x01)
                {
                    Zero
                })
            }
        }

To:
Code:
        Method (_PSS, 0, NotSerialized)  // _PSS: Performance Supported States
        {
            If (CondRefOf (\_PR.CPU0._PSS))
            {
                Return (\_PR.CPU0._PSS)
            }
        }

If you do the same for all the other locations with similar errors, you'll have a file with zero errors.
 
In SSDT-6.dsl, just remove the 'Else' block causing the error.

eg.

From:
Code:
        Method (_PSS, 0, NotSerialized)  // _PSS: Performance Supported States
        {
            If (CondRefOf (\_PR.CPU0._PSS))
            {
                Return (\_PR.CPU0._PSS)
            }
            Else
            {
                Return (Package (0x01)
                {
                    Zero
                })
            }
        }

To:
Code:
        Method (_PSS, 0, NotSerialized)  // _PSS: Performance Supported States
        {
            If (CondRefOf (\_PR.CPU0._PSS))
            {
                Return (\_PR.CPU0._PSS)
            }
        }

If you do the same for all the other locations with similar errors, you'll have a file with zero errors.
Thanks for the quick reply :)
I followed your steps and fixed the errors in SSDT-6.dsl. There are some warnings left but I'm sure they does not matter.
But now with SSDT-0 to SSDT-10 all fixed, I went back to DSDT.dsl and tried to compile it. Some errors are still showing up:
Code:
11863, 6126, syntax error, unexpected '}'
23780, 6126, syntax error, unexpected $end and premature End-Of-File

Please help!

and one more thing: after I got the errors fixed in DSDT.dsl, what do I need to do next? Which file should I apply the patches to (DSDT? SSDT-1 to SSDT-10?)? Can I apply them to DSDT.aml by putting the code in and compiling it from DSDT.dsl, or I need to apply specific patch to specific file? I need to patch to get the battery status and audio[ALC233] working.

Many Thanks.:)
 

Attachments

  • DSDT.dsl.zip
    58.7 KB · Views: 38
Last edited:
Thanks for the quick reply :)
I followed your steps and fixed the errors in SSDT-6.dsl. There are some warnings left but I'm sure they does not matter.
But now with SSDT-0 to SSDT-10 all fixed, I went back to DSDT.dsl and tried to compile it. Some errors are still showing up:
Code:
11863, 6126, syntax error, unexpected '}'
23780, 6126, syntax error, unexpected $end and premature End-Of-File

Please help!

and one more thing: after I got the errors fixed in DSDT.dsl, what do I need to do next? Which file should I apply the patches to (DSDT? SSDT-1 to SSDT-10?)? Can I apply them to DSDT.aml by putting the code in and compiling it from DSDT.dsl, or I need to apply specific patch to specific file? I need to patch to get the battery status and audio[ALC233] working.

Many Thanks.:)

Zero errors on DSDT.dsl if you apply "Fix ADBG Error".

Most patches are applied to DSDT, although some to SSDTs. It depends on where the code resides that needs changing.

As for battery status and audio, it is well covered in post #1.
 
Zero errors on DSDT.dsl if you apply "Fix ADBG Error".

Most patches are applied to DSDT, although some to SSDTs. It depends on where the code resides that needs changing.

As for battery status and audio, it is well covered in post #1.

Thanks again :D

Now then I got all my DSDT and SSDTs fixed, do I need to place all the modified files to /EFI/Clover/ACPI/patched, or just specific ones? Also, is there any way that I can test the modified files first (like a boot flag?) before placing them into Clover and boot with them?
 
Thanks again :D

Now then I got all my DSDT and SSDTs fixed, do I need to place all the modified files to /EFI/Clover/ACPI/patched, or just specific ones? Also, is there any way that I can test the modified files first (like a boot flag?) before placing them into Clover and boot with them?

Post #1 has details on ACPI/patched. Read it carefully.

You should have a USB that works to boot your system before testing.
 
Back
Top