Sie sind auf Seite 1von 1

Beginner’s guide to patch DSDT in

Hackintosh
Last Updated: Tue Feb 05 2019

After installing macOS the first thing you need to do is patching


dsdt because patching dsdt eliminates so many errors. But
patching dsdt is not an easy task and the guides available on the
internet are so difficult to understand even I was unable to
understand after 4-5 times. So I decided to write a noob friendly
guide which will help the beginners which are unable to
understand the tutorials and confused about what to do. This
guide is not for specific problem solving but after reading this
you will have a clear idea about dsdt patching and will be able to
patch them according to your needs. So let gets started!

1. Extracting the ACPI files.


There are 3 methods of extracting ACPI files of your pc but here I
have only used 1 method because it is very easy and has less
chance of corruption

Extracting ACPI files through this method is very simple, all you
have to do is press F4 while in clover after startup. The ACPI files
will be available in EFI/clover/ origin/.

“Diskutil list” in terminal to see the EFI drive


After you log in to your Hackintosh open the terminal and type
‘diskutil mount diskXsXX’ then head over to the EFI partition you
just mounted. (Note: replace all the X in diskXsXX with your EFI
disk number, as you can see in the above image mine is disk0s4).

Or you can mount the EFI partition in just one click using clover
configurator.

2. Preparing tools.
The ACPI files that you have extracted through clover cannot be
patched directly so we have to first disassemble it and then patch
it. So to patch them you will IASL which can be downloaded from
here.

After downloading IASL, copy and paste these command in


terminal:-

cd ~/Downloads unzip iasl.zip


sudo cp iasl /usr/bin

3. Disassembling the ACPI files.


Now the time has come to disassemble the files. We will
disassemble the ACPI using refs.txt, it can be also done without
using refs.txt but it removes some error from the disassembled
ACPI files. Now open TextEdit and copy paste the following:-

External(MDBG, MethodObj, 1)
External(_GPE.MMTB, MethodObj,0)
External(_SB.PCI0.LPCB.H_EC.ECWT, MethodObj, 2)
External(_SB.PCI0.LPCB.H_EC.ECRD, MethodObj, 1)
External(_SB.PCI0.LPCB.H_EC.ECMD, MethodObj, 1)
External(_SB.PCI0.PEG0.PEGP.SGPO, MethodObj, 2)
External(_SB.PCI0.GFX0.DD02._BCM, MethodObj, 1)
External(_SB.PCI0.SAT0.SDSM, MethodObj, 4)
External(_GPE.VHOV, MethodObj, 3)
External(_SB.PCI0.XHC.RHUB.TPLD, MethodObj, 2)

And save it as refs.txt then move the file to origins folder Or just
copy the above code and execute the following code in terminal:-

Cd desktop
pbpaste>refs.txt

a refs.txt file will be created on your desktop.

Now run the command in terminal:-

iasl -da -dl -fe refs.txt DSDT.aml SSDT*.aml

Disassembled ACPI files


The DSDT and all the SSDT files will be disassembled

Also read: How to upgrade Hackintosh to macOS Mojave

Head over to the folder containing ACPI files and delete those
SSDT files in which there is x in the end, example- SSDT-5x.dsl.
These are dynamic files and we don’t need them.

4. Error fixing.
After the extracted ACPI files have been dissembled the files are
not error-free. DSDT and some SSDTs contain some error which
will cause instability and even may prevent the OS from loading,
So fixing those errors is very important and very easy.

Download patchmatic from here and open downloads folder then


launch terminal and type:

cp patchmatic /usr/local/bin/patchmatic

After done download the latest version of maciASL from here and
open it then head over to preferences of maciASL and add this :

http://raw.github.com/RehabMan/Laptop-DSDT-Patch/master

adding patches to maciASL


to sources and name it patches. Then open your DSDT.dsl and
press compile, it will give you some error see the line of error and
click patch then find the suitable patch for the error. If you are
unable to identify the error then comment below here.

5. Applying some common patch.


There are some patch that you should apply to your DSDT, these
patches are not compulsory to apply but can be applied for
better stability. However, if any unusual patches are applied
without needing, it may cause problems or kernel panic. The
patches are:

"Fix _WAK Arg0 v2"


"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"OS Check Fix"
"Fix Mutex with non-zero SyncLevel".

(Note: The above patches will not resolve any specific problem of
your Hackintosh)

After the patching is done don’t forget to place the patched dsdt
into EFI/clover/patched/ otherwise it will not load.

Your basic DSDT patching is now done if you face any problem
comment down below.

This guide is just a simplified version of this guide for better


understanding.
Credits: Rehabman@Tonymacx86.com

Comments Reply to post

Dennis · Thu Nov 15 2018 · Reply


Easy to read and excellent guide for us noobs. Questions
Can we extract the files after we have already installed
osx? Irq is for audio, right? Thanks!

manash · Thu Nov 15 2018 · Reply


Yeah you can extract those from clover by
pressing f4. If IRQ came along with dsdt/ssdt
files can simply delete it

JM · Tue Nov 20 2018 · Reply


Hi there, thank for this post! I am half way through this.
First, I think there is a mistake in the address for the
patches. Should be :
http://raw.github.com/RehabMan/Laptop-DSDT-
Patch/master Then I got 7 error, and none of them are
recognize (after press ion patch the before and after are
empty). Any advice? This is the report:
iASLRtXxxg.dsl(48) : error 6126 - syntax error,
unexpected PARSEOP_EXP_MULTIPLY iASLRtXxxg.dsl(66)
: error 6126 - Invalid character (.), expecting ASL
keyword or name iASLRtXxxg.dsl(66) : error 6126 -
syntax error, unexpected PARSEOP_EXP_MULTIPLY,
expecting PARSEOP_CLOSE_PAREN iASLRtXxxg.dsl(6948)
: error 6126 - syntax error, unexpected PARSEOP_SCOPE
iASLRtXxxg.dsl(6953) : error 6126 - syntax error,
unexpected PARSEOP_CLOSE_PAREN
iASLRtXxxg.dsl(6956) : error 6126 - syntax error,
unexpected PARSEOP_CLOSE_PAREN
iASLRtXxxg.dsl(6967) : error 6126 - syntax error,
unexpected PARSEOP_OPERATIONREGION, expecting
$end and premature End-Of-File

manash · Tue Nov 20 2018 · Reply


hey JM, thanks for notifying me about the
mistake. what patches you have applied?

JM · Wed Nov 21 2018


You are welcome. I did apply some in
that address and some others from:
http://maciasl.sourceforge.net I could
not fix any of the errors. Not sure
where to start or which ones to
apply... any advice? Thanks JM

Sam · Wed Mar 20 2019 · Reply


Is this still good to follow? I am getting this error. "Illegal
forward reference (AC02)." Are warnings ok to
disregard?

manash · Wed Mar 20 2019 · Reply


Yes you can ignore the warnings

Victor Hugo guardado · Wed Apr 03 2019 · Reply


i get this messege Could not open input file: DSDT.aml
Could not get ACPI tables from DSDT.aml,
AE_NOT_EXIST

manash · Wed Apr 03 2019 · Reply


Please try extracting them again and also try
different versions of maciAsl

Jefrey Junos · Wed Apr 10 2019 · Reply


Parsing is completed But there are so many errors that
said Warning - Emitting ASL code "External
(_SB_.PCI0.PEG0.PEGP.SGPO)*another code also*" This is
a conflicting declaration with some other declaration
within the ASL code. This external declaration may need
to be deleted in order to recompile the dsl file. This is
my full command

alan · Fri Apr 19 2019 · Reply


which file do i put back? DSDT.dsl or DSDT.aml? i guess
the formoer? since that is the one we modified? but all
the file in clover are aml ....i am so confused.

manash · Sat Apr 20 2019 · Reply


you have to save the modified DSDT.dsl as
DSDT.aml

Eric · Sat Jul 06 2019 · Reply


Thank you for the great guide. Nice and clear. I have a
question. What does the 0 error mean. Also, should I
worry about the warnings?

Manash · Sat Jul 06 2019 · Reply


Glad to hear that the guide helped you! 0
errors mean that there is no error while
compiling and as far the warnings are
concerned those can be ignored safely

Eric · Sat Jul 06 2019 · Reply


Thank you very much

Georgi · Wed Jul 10 2019 · Reply


Hi and thanks for the nice guide! Unfortunately I am
stuck at the disassemble step - I got this error: External
object resolution file SSDT-8-UsbCTabl.aml Input file
SSDT-8-UsbCTabl.aml, Length 0xFA2 (4002) bytes ACPI:
SSDT 0x0000000000000000 000FA2 (v02 LENOVO
UsbCTabl 00001000 INTL 20160527) Pass 1 parse of
[SSDT] Pass 2 parse of [SSDT] External object resolution
file SSDT-8-TbtTypeC.aml Input file SSDT-8-
TbtTypeC.aml, Length 0x15B7 (5559) bytes ACPI: SSDT
0x0000000000000000 0015B7 (v02 LENOVO TbtTypeC
00000000 INTL 20160527) Pass 1 parse of [SSDT]
Firmware Error (ACPI): Failure creating
[\_SB.PCI0.RP01.PXSX.TURP], AE_ALREADY_EXISTS
(20180427/dswload-498) ACPI Error:
AE_ALREADY_EXISTS, During name lookup/catalog
(20180427/psobject-371) Could not parse external ACPI
tables, AE_ALREADY_EXISTS Any hints? Thanks!

Georgi · Wed Jul 10 2019 · Reply


Actually I figured out that there were duplicate files in
the /origin folder. After removing these, all worked fine.
I was also getting error by using the cmd line as noted
above: iasl -da -dl -fe refs.txt DSDT.aml SSDT*.aml To
solve it I was running each file separately and this
worked without issue. Also, according to
https://www.tonymacx86.com/threads/guide-patching-
laptop-dsdt-ssdts.152573/ - you can run the
disassembly without using the refs.txt - by simply using:
iasl -dl DSDT.aml SSDT*.aml

Manash · Wed Jul 10 2019 · Reply


Yeah you can disassemble without refs.txt but
it is better to use refs.txt because it eliminates
some errors.

interorient · Tue Dec 17 2019 · Reply


I can not disassemble my ACPI files. I saved "refs.txt "
and I try his command "iasl -da -dl -fe refs.txt DSDT.aml
SSDT*.aml" I have the message :"zsh: command not
found: iasl" I have not any idea what happen, and haw
to disassemble my ACPI file. see from trerminal ----------
- chiefengineer@Chiefs-MacBook-Pro ~ % cd
~/Desktop/DSDT pbpaste>refs.txt cd: string not in pwd:
/Users/chiefengineer/Desktop/DSDT
chiefengineer@Chiefs-MacBook-Pro ~ % cd
~/Desktop/DSDT chiefengineer@Chiefs-MacBook-Pro
DSDT % pbpaste>refs.txt chiefengineer@Chiefs-
MacBook-Pro DSDT % iasl -da -dl -fe refs.txt DSDT.aml
SSDT*.aml zsh: command not found: iasl
chiefengineer@Chiefs-MacBook-Pro DSDT % ------------
---

Copyright © 2020 HackintoshPro - Contact Us About Us Privacy Policy

Das könnte Ihnen auch gefallen