Contribute
Register

[Guide] Patching LAPTOP DSDT/SSDTs

Joined
Nov 3, 2013
Messages
137
Motherboard
Asus N53SV
CPU
Intel i7-2670QM
Graphics
Intel HD 3000
Mac
Classic Mac
Mobile Phone
  1. iOS
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!
 
Joined
Jan 31, 2016
Messages
34
Motherboard
Spectre x360 13-ac023dx
CPU
i7-7500U
Graphics
intel HD Graphics 620, 1920x1080
that i should probably do next time, sorry.
 
Joined
Oct 7, 2013
Messages
32
Motherboard
CQ42-263TU
CPU
i5 450m
Graphics
Intel HD 1st Generation
Mac
Classic Mac
Mobile Phone
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: 38
Joined
Jan 4, 2016
Messages
29
Motherboard
Dell Vostro 3350 - Clover Legacy)
CPU
i5-2410M
Graphics
HD 3000 (1366x768)
Mobile Phone
  1. Android
  2. iOS
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?
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,867
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
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;
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,867
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
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.
 
Joined
Oct 7, 2013
Messages
32
Motherboard
CQ42-263TU
CPU
i5 450m
Graphics
Intel HD 1st Generation
Mac
Classic Mac
Mobile Phone
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]
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
188,867
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
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.
 
Joined
Oct 7, 2013
Messages
32
Motherboard
CQ42-263TU
CPU
i5 450m
Graphics
Intel HD 1st Generation
Mac
Classic Mac
Mobile Phone
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.

I attached the files. I disassemble using the same command as you said 'iasl -da -dl *.aml'. Have no idea where I did wrong.
 

Attachments

  • DSDT-P755.zip
    84.1 KB · Views: 35
Top