Contribute
Register

[Guide] Patching LAPTOP DSDT/SSDTs

rehabman,

this command is listed in the OP:
Code:
[COLOR=#000000]sudo cp /usr/bin/iasl /Applications/MaciASL.app/Contents/MacOS/iasl61[/COLOR]

It is correct.

After you build iasl from source and use 'sudo make install' to install it to /usr/bin, the idea is to copy it to MaciASL.app for use in MaciASL as well.

Always read carefully.
 
It is because iasl is crashing.

Note: Fix already provided by Intel. It is checked into the github project. See post #1 for building from source.

Note 2: pre-built MaciASL and iasl updated at bitbucket.

That fixed it, thanks!
 
that i should probably do next time, sorry.
 
I've been trying to patch my friend's laptop (Toshiba 755). I used Clover (F4) to extract DSDT and SSDTs and disassemble using iasl. However, I got these errors when I want compile the DSDT.dsl

Code:
10603, 6126, syntax error, unexpected '}'
10627, 6126, syntax error, unexpected '}'

on these following lines:

Code:
            Method (_Q11, 0, NotSerialized)  // _Qxx: EC Query            {
                If ((OSYS >= 0x07D6))
                {
                    If (IGDS)
                    {
                        BRTN (0x87)
                    }
                    Else
                    {
                        Notify (^^^PEG0.PEGP.LCD, 0x87)
                    }
                }
                ElseIf (IGDS)
                {
                    Local0 = ^^^GFX0.DD02._BQC ()
                    ^^^GFX0.DD02._BCM (Local0)
                }
                Else
                {
                    [B]Store (^^^PEG0.PEGP.LCD._BQC (Local0, ^^^PEG0.PEGP.LCD._BCM (Local0))[/B]
                }
            }


            Method (_Q12, 0, NotSerialized)  // _Qxx: EC Query
            {
                If ((OSYS >= 0x07D6))
                {
                    If (IGDS)
                    {
                        BRTN (0x86)
                    }
                    Else
                    {
                        Notify (^^^PEG0.PEGP.LCD, 0x86)
                    }
                }
                ElseIf (IGDS)
                {
                    Local0 = ^^^GFX0.DD02._BQC ()
                    ^^^GFX0.DD02._BCM (Local0)
                }
                Else
                {
                    [B]Store (^^^PEG0.PEGP.LCD._BQC (Local0, ^^^PEG0.PEGP.LCD._BCM (Local0))[/B]
                }
            }

Any idea what's wrong?
 

Attachments

  • origin.zip
    32.8 KB · Views: 76
Overview

Extracting with Clover F4 (recommended):

Extracting with Clover F4 is recommended, due to ease of extraction, and due to ease of comparison between ACPI/origin and ACPI/patched (for troubleshooting).

At the main Clover bootloader screen, you can press F4 and Clover will dump the native ACPI files to EFI/Clover/ACPI/origin. You can then access them after you boot OS X to disassemble them and patch. Note that some BIOS implementations reverse the function of Fn+F4 with F4, so when in doubt, press both Fn+F4 and F4. There is no feedback during or after the dump, just a slight delay as the files are written. The delay is more noticeable if they are being written to USB, as would be the case when booting from a Clover USB.

Sometimes, Clover F4 will write duplicate SSDTs. These duplicates will cause problems during disassembly. If you run into issues (duplicate definitions) during disassembly, you will need to analyse all SSDTs to eliminate the files which are duplicate. It is easy to see which are duplicates by looking at the file sizes. Files with equal size are likely duplicates.

You can see file sizes in bytes of all SSDTs in Terminal:
Code:
ls -l SSDT*.aml

my original installer usb and also HDD's clove boot loader did not respond to F4 or fn+F4 keys. wanted to download linux bootable. but i decided to try something else.

so i decided to used a FAT formatted usb and just installed clover on it. then pressed F4 and it responded to F4.(usb led blinked :thumbup:)

I went to the origin directory and were were many files in it.
now i am going to use them to patch ssdt and also disable my second gpu.

is my solution acceptable?
 
I've been trying to patch my friend's laptop (Toshiba 755). I used Clover (F4) to extract DSDT and SSDTs and disassemble using iasl. However, I got these errors when I want compile the DSDT.dsl

Code:
10603, 6126, syntax error, unexpected '}'
10627, 6126, syntax error, unexpected '}'

on these following lines:

Code:
            Method (_Q11, 0, NotSerialized)  // _Qxx: EC Query            {
                If ((OSYS >= 0x07D6))
                {
                    If (IGDS)
                    {
                        BRTN (0x87)
                    }
                    Else
                    {
                        Notify (^^^PEG0.PEGP.LCD, 0x87)
                    }
                }
                ElseIf (IGDS)
                {
                    Local0 = ^^^GFX0.DD02._BQC ()
                    ^^^GFX0.DD02._BCM (Local0)
                }
                Else
                {
                    [B]Store (^^^PEG0.PEGP.LCD._BQC (Local0, ^^^PEG0.PEGP.LCD._BCM (Local0))[/B]
                }
            }


            Method (_Q12, 0, NotSerialized)  // _Qxx: EC Query
            {
                If ((OSYS >= 0x07D6))
                {
                    If (IGDS)
                    {
                        BRTN (0x86)
                    }
                    Else
                    {
                        Notify (^^^PEG0.PEGP.LCD, 0x86)
                    }
                }
                ElseIf (IGDS)
                {
                    Local0 = ^^^GFX0.DD02._BQC ()
                    ^^^GFX0.DD02._BCM (Local0)
                }
                Else
                {
                    [B]Store (^^^PEG0.PEGP.LCD._BQC (Local0, ^^^PEG0.PEGP.LCD._BCM (Local0))[/B]
                }
            }

Any idea what's wrong?

You disassembled the file incorrectly. Read post #1...

But the disassembled file (when done correctly) will still produce a problem, which I have reported to Intel: https://bugs.acpica.org/show_bug.cgi?id=1266

You can work around:
- first, correct disassembly: iasl -da -dl DSDT.aml SSDT*.aml (without SSDT-2x.aml; it is duplicate)
- line 15414 will need correcting, change 'ABCDEFGH' to 'ABC0000'
- apply patch:
Code:
# remove problematic methods not likely to be used by OS X
into method label SPFC remove_entry;
into method label VAFC remove_entry;
 
my original installer usb and also HDD's clove boot loader did not respond to F4 or fn+F4 keys. wanted to download linux bootable. but i decided to try something else.

so i decided to used a FAT formatted usb and just installed clover on it. then pressed F4 and it responded to F4.(usb led blinked :thumbup:)

I went to the origin directory and were were many files in it.
now i am going to use them to patch ssdt and also disable my second gpu.

is my solution acceptable?

Clover F4 only works with Clover installed to a FAT32 partition (EFI on GPT, or MBR).

It does not work when installed in "legacy root" mode (to HFS+J partition). My guide does not use "legacy root" mode.
 
You disassembled the file incorrectly. Read post #1...

But the disassembled file (when done correctly) will still produce a problem, which I have reported to Intel: https://bugs.acpica.org/show_bug.cgi?id=1266

You can work around:
- first, correct disassembly: iasl -da -dl DSDT.aml SSDT*.aml (without SSDT-2x.aml; it is duplicate)
- line 15414 will need correcting, change 'ABCDEFGH' to 'ABC0000'
- apply patch:
Code:
# remove problematic methods not likely to be used by OS X
into method label SPFC remove_entry;
into method label VAFC remove_entry;

I did what you said and still get these errors
Code:
[COLOR=#000000]10603, 6126, syntax error, unexpected '}'
[/COLOR][COLOR=#000000]10627, 6126, syntax error, unexpected '}'[/COLOR]
 
I did what you said and still get these errors
Code:
[COLOR=#000000]10603, 6126, syntax error, unexpected '}'
[/COLOR][COLOR=#000000]10627, 6126, syntax error, unexpected '}'[/COLOR]

It is not possible to diagnose errors with the error message by itself.

Your mistake probably originates at incorrect disassembly. The disassembled code in #1238 clearly shows you did not disassemble correctly (iasl -da -dl *.aml).

If you need help, post your files.
 
Back
Top