olarila.com

Mac OS X x86 - Hackintosh
It is currently 20 May 2013, 03:14

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: DSDT patching 101
PostPosted: 01 Nov 2011, 22:00 
User avatar
iGenius

Joined: 26 Aug 2011, 23:53
Posts: 3757
How to apply a patch using DSDT Editor



If you will apply several patches you can compile only once, after all patches are applied.

When applying a patch, check the before/after tabs and try to understand what is being changed and why.

Important: always start from an original DSDT. Don't use "extract DSDT" if you booted using a patched dsdt.aml from other PC. If you can't boot without a patched DSDT, use Windows or Linux to extract the original DSDT from BIOS.

If you update BIOS, most likely you will have to patch DSDT again, so it's a good idea to create a full patch, with all needed patches (separated by ";"), like the many examples here.


Usual patches

Download


Power management:

If AppleIntelCPUPowerManagement doesn't work (need to use NullCPUPowerManagement) even if you enable GenerateCStates and GeneratePStates in Chameleon, check if AppleLPC is loaded (run "kextstat" command in terminal), if it's not, apply one of the LPC patches according to your chipset (desktop/laptop ICH7, ICH8, ICH9, ICH10, Nehalem, Sandy Bridge).

If you get "No HPET(s) available" kernel panic you may need the HPET patch. The example is used on Gigabyte mobos, but it may also be needed in other mobos and laptops (adapt _CRS to return the ResourceTemplate right above).

For many Sandy Bridge systems it's also necessary to patch AppleIntelCPUPowerManagement.

About power management viewtopic.php?f=18&t=1703


USB problems:

There are many USB patches, EHCI, UHCI, ICH9 USB sleep, EHCI sleep/ownership, some are generic, some are organized by chipset. If you have problems with USB ports, if you see errors or warnings in kernel log about EHCI or UHCI, you can try these patches.


Sleep problems:

Problems with sleep are usually related to power management and USB.

If the system goes to sleep and wakes immediately, look for "Wake reason" in kernel log and edit method _PSW or remove _PRW from that device in DSDT.


CMOS reset:

Apply the RTC patch.

If you have CMOS reset after sleep/wake/reboot in Lion, you need to patch AppleRTC.


Audio:

You can use HDEF (or AZAL to HDEF if you already have device AZAL) and a codec patch (ALC*) if you will use a patched AppleHDA, or if you just want to have audio information in System Profiler.

Make sure layout-id in DSDT (hex) coincides with LayoutID in AppleHDA (decimal)

Example:
LayoutID (dec)layout-id (hex)
120x0C, 0x00, 0x00, 0x00 = 0xC
8890x79, 0x03, 0x00, 0x00 = 0x379



DTGP is required by many patches, so you will probably need it.


IRQs is a "generic" patch, it's always used. In some cases more IRQs are added to device HPET, compare patches for various chipsets.


SBUS (SMBUS) is used to get SMBus kexts loaded.


Shutdown patches are BIOS specific, apply if the PC doesn't turn off properly.


There are other hardware specific and some "cosmetic" patches (only fix warning and remark messages in compilation, but aren't really necessary).


References (must read if you want to understand what the patches do)

DSDT fixes for Gigabyte boards
P5K PRO
DSDT: trick retail drivers by changing "device-id" (e.g USB), Fix sleep issues of ICH9/-R faking ICH10-R
Slow Sata Issue Fix, How to fix HPET IRQ conflict that cause that
ALC889A, Gigabyte (Intel)
[HOW TO] Patch AppleHDA - Knowledge Base, Guide for how to fix/use original AppleHDA
DSDT - Vanilla Speedstep - Generic Scope (_PR)
Shutdown Fix
Atheros Ar9285, Working starting with 10.6.5
GA-EX58 and GA-X58A DSDT native power management modifications
Final solution (FIX) for GMA950 Desktop edition
SpeedStepper, AICPUPM patcher for ASUS P8P67 (and others)
CMOS Resets on Restarts after Sleep and Wake in 10.7 (Lion)

_________________
ASUS N53Jq • CPU: Intel Core i7-740QM 1.73GHz • RAM: 6,0GB • HD: 500GB • GPU: GeForce GT 425M 1GB 1920x1080 • OS: OS X 10.8.3 • Linux Mint 14 • Windows 8


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: droplets, Google [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group