October 5, 2009
Modified October 10, 2012 -> The last DSDTs from 2011 worked well for Mountain Lion up to 10.8.1. As with 10.7.4, AppleACPIPlatform.kext has to be downgraded to 1.3.5 to prevent KPs on boot. Use Champlist to upgrade Chameleon to a recent version. For 10.8.2, crashes occur in VoodooHDA unless the HDEF section of the DSDT is stripped out (thanks for pointing this out LatinMcG). I've done this on the latest DSDTs posted below. I've also posted a very quick guide to installing Mountain Lion in MacGirl's thread here:
http://www.insanelym...00#entry1844454
Modified July 7, 2012 -> The M1530 and M1330 are not compatible with AppleACPIPlatform.kext that ships with 10.7.4. However it has been discovered that replacing AppleACPIPlatform.kext with the older version 1.3.5 (from Snow Leopard) makes everything appear to work fine. See the always helpful DarwinX's post here: http://www.insanelym...post&p=1820079. If you use the combo updater to do the upgrade you have an opportunity to swap the kext (and remove AppleHDA.kext) after the installer is finished and before you press restart (I didn't swap the kext out this way so if it doesn't work for you sorry!)
It has been suggested that the "darkwake=0" boot flag in org.chameleon.Boot.plist is necessary for working sleep. I can tell you that I have this flag and sleep works so long as hibernatemode is set to 0.
Also, I've successfully used Chameleon 2.1 svn r1996 (packaged by Ermac) and an SMBios.plist generated by Champlist to get iCloud working. I used MacBook 5,2 for both the serial and database parameters. I imagine a number of you already have this working but for anyone who is still using the SMBios.plist below here is a much better option.
Modified October 29 2011 -> After discussion in this topic I've decided to drop the NVidia patch altogether. It's not needed if GraphicsEnabler=Yes is in org.chameleon.Boot.plist, and the patch was the source of all the 10.7.2 issues. New M1330 and M1530 DSDTs with no video patch are now posted. If you are happy with last week's DSDT you don't really have to change it.
Modified October 23 2011 -> Changed NVidia patch to be compatible with 10.7.2. The original would cause a black screen on boot. Also in the kext section moved VoodooPS2Controller.kext from /Extra/Extensions to /System/Library/Extensions (the trackpad kext will not load automatically in /Extra/Extensions since 10.7.2).
This guide shows the steps necessary to dump, assemble, patch, and compile a DSDT.aml for your M1330, M1530, and M1730. This DSDT.aml will allow vanilla speed stepping, vanilla sleep, enable the clamshell lid, and inject NVidia graphics. The latest DSDTs are tested under Snow Leopard and Lion. The DSDT.aml will vary depending on your graphics option (NVidia or Intel).
What Should Work with this Guide and Recommended Kexts
Sleep (with hibernate mode set to zero, don't need any kexts if you use a patched DSDT)
Speed Step (P-States) (make sure Mac model is set to MacBook5,1 in smbios.plist, you do not need GeneratePStates or GenerateCStates)
NVidia Accelerated Graphics (make sure to use GraphicsEnabler in com.apple.Boot.plist)
Wireless: Out of the box with TrueMobile 1505 Draft N. Others may need patching. If you have an Intel, do yourself a favor and buy a TrueMobile 1505 on Ebay.
Ethernet: M1330 needs BCM5722D.kext. M1530 needs a hack?
Bluetooth: Out of the box.
Video Camera: Out of the box.
Keyboard/Trackpad: Needs VoodooPS2Controller.kext. Note on M1530 the Trackpad settings panel is only available in 32bit mode! Two finger scrolling should work.
Card Reader: Needs VoodooSDHC.kext. Unreliable for me.
Shutdown on M1530: No luck with M1330.
Restart: With EvoRestart.kext. Has never been reliable for me.
What Will Not Work:
C-States - Brilliant minds are still working on this one.
HDMI - Broken since 10.6.2.
Shutdown on M1330
Prerequisits
- A working Vanilla install of Leopard
You can use wingrunr's guide as a reference:
http://www.insanelym...mp;#entry847294
or Snow Leopard
You can use Superhai's guide as a reference:
http://www.projectos...p?showtopic=561
- Installed and working copy of Chamelleon RC1 or higher (RC3 required for Snow Leopard).
Posting Rules:
1. Please keep this topic specific to making custom DSDT.aml files for Dell XPS M1330/M1530. More general M1330/M1530 questions can be posted in MacGirl's topic:
http://www.insanelym...showtopic=83039
2. If you'd like to request help about issues with a DSDT.aml that is known to work and you are running a distro, please try it on a vanilla install first. There is no reason to use a distro on these machines as vanilla works great, and there's a very good chance that issues are related to something non-standard about the distro. It is very hard to offer help on distros because it's near impossible to know what has been changed from vanilla on the distro.
Contributing:
- If you successfully use this guide on a configuration different from a DSDT.aml posted here, post it! This will help others with your configuration.
- If you find a patch that works better or adds more functionality than what is shown here, share it!
Credits
Chrysaor for his DSDT.aml for M1530. This motivated me to figure out how to do it on my M1330, and I used his DSDT.aml as a reference.
Wingrunr and MacGirl for their awesome threads.
Superhai for his great kexts and snow leopard work.
Zhell for his guide on dumping the ACPI tables.
ApexDE for his work on the USB fix.
I'm not sure who came up with the NVidia and HDEF fixes, but whoever did, thanks.
The contributes in this thread.. There have been some great contributions which have been credited throughout the guide.
2009/11/17
Alternative to Step One and Step Two - Makes a CPU generic DSDT, is much easier, and No Linux BootCD Required!
It's been found that it is possible to get Vanilla SpeedStep and sleep working without SSDT tables (thanks Brett Whinnen). The DSDT table can be dumped from OS-X, so a boot CD is not required. The only disadvantage is that you will be unable to customize your speed stepping. You will still need to apply the patches listed in Section 3.
1. Download and unzip DSDT Patcher from this thread.
http://www.insanelym...howtopic=133683
2. Under the "Tools" subfolder, copy "iasl" and "getDSDT.sh" to the /sbin directory (this is the compiler/decompiler, and the DSDT dumping script respectively).
3. In the folder where you want to work, execute the command:
getDSDT.sh
A file called DSDT.dat will appear in the working folder.
4. Decompile the DSDT.dat using the following command:
iasl -d dsdt.dat
The file will be decompiled to dsdt.dsl in the same folder.
5. Open the dsdt.dsl file in TextEdit.
6. In the DefinitionBlock line near the top of the file, replace the filename with the name "DSDT.aml" with no path. Otherwise it will overwrite the original.
7. Continue on to Step 3: Patching the DSDT. When installing the finished DSDT (Step 4), do NOT use the DropSSDT=y flag.
Step One: Dumping the ACPI Tables
The DSDT is built by assembling and compiling ACPI tables dumped from the computer's bios. This is best done from Linux as the complete tables cannot be dumped from OS-X. Don't worry you don't have to install linux, you can use an Ubuntu Live-CD (allows you to boot Ubuntu from your CD drive). After this step is done, we do the remainder in OS-X (although it is possible to do most of the remaining steps in Linux if you really wanted to). Here's the steps involved.
1. Download an Ubuntu Live CD (9.04 Jaunty Jackalope is the current version, I used the 64 bit version)
http://www.ubuntu.co...ubuntu/download
and burn it to CD.
EDIT 2009/10/22 -> It's been reported that Ubuntu 9.10 beta did not work for this, but 9.04 definately does (thanks Jisare).
2. Boot from the CD, and choose the option "Try Ubuntu without any change to your computer".
3. Open a terminal window (under Accessories).
4. Enable "Universe" repositories (this allows you to install the required software to do your dump)
sudo nano /etc/apt/sources.list
Uncomment the "Universe" lines, exit and save.
5. Install the ACPIDump package.
sudo apt-get updatesudo apt-get install acpidump
6. Change to root (sudo su) and dump the tables and store them in ACPI-Tables.zip (thank you zhell)
mkdir ACPI && dmesg | perl -we '$n=0; while (<>) { if (($t,$a,$l,$o) = (/^[^a-zA-Z]*ACPI: ([-._A-Z0-9]{4,4}) +([0-9A-F]{8,8}), ([0-9A-F]{4,4})+(?:\s*\(([^)]+))?/)) { $o && $o=~s/[^-._a-zA-Z0-9]+/-/g; ($cmd="acpidump -a $a -l $l > \"ACPI/${t}".($o?"_$o":"").".aml\""); print "Running command: \"$cmd\"\n"; system($cmd); ++$n; } } die("No match") unless $n;' && zip -r ACPI-Tables.zip ACPI
7. Copy the ACPI-Tables.zip to a USB drive or network share where you can access it later from OS-X.
Step Two: Decompiling and Assembling the Tables
Look at the contents of the ACPI-Tables.zip files. The ones that are needed are the DSDT table and the SSDT PmRef tables (there are five). These six have to be assembled into a single DSDT.aml file. Each one must be decompiled, assembled together.
1. Download and unzip DSDT Patcher from this thread.
http://www.insanelym...howtopic=133683
2. Under the "Tools" subfolder, copy "iasl" to the /sbin directory (this is the compiler/decompiler)
3. Decompile each of the required .aml files using the following command:
iasl -d [file.asl]
A [file].dsl file will be created in the same folder.
4. Open the DSDT dsl file (called DSDT_r2-INT430-SYSFexxx-1001-INTL-20050624.aml on my computer) in TextEdit.
5. In the DefinitionBlock line near the top of the file, replace the long unfriendly filename with the name "DSDT.aml" (this is so when you compile the file it will have the name DSDT.aml. Otherwise it will overwrite the original)
6. Remove the last curly brace } at the bottom of the file.
7. Open the first SSDT file in another TextEdit window (SSDT_r1-PmRef-Cpu0Cst-3001-INTL-20050624.dsl on my computer, I don't believe the order is important, but I did them in alphabetical order).
8. Copy starting AFTER the first curly brace { (probably an "EXTERN" line) to the end of the file, and paste it to the end of the DSDT file.
9. Repeat steps 6 to 8 for the remaining SSDT files.
10. Save the DSDT file with the joined DSDT tables. We'll call it myDSDT.aml.
You may also want to date code and/or version it. The DSDT's are specific not only to the model but to the CPU, and the NVidia graphics are optional.
11. Attempt to compile the file with the following command. It will fail, but it will also tell us what we have to fix.
iasl myDSDT.dsl
12. All the errors at "External" lines e.g.:
DSDT.dsl 6026: External (\_PR_.CPU0, DeviceObj)
Error 4056 - Name already exists in scope ^ (\_PR_.CPU0)
are there because the same external was specified in multiple tables, but should only be specified once. Simply delete the offending lines, leaving each external defined only once. A few cannot even be defined once, because they are defined elsewhere as code in the file (therefore they are not external).
13. You will get an error like this on the M1330, and I'm pretty sure the M1530 as well:
DSDT.dsl 5706: Name (_HID, "*pnp0c14")
Error 4001 - ^ String must be entirely alphanumeric (*pnp0c14)
I'm not sure why that asterisk is there, but simply remove the asterisk and it will compile fine.
14. You will get a number of warnings that look like this:
DSDT.dsl 5016: And (Local0, 0x0F)
Warning 1105 - ^ Result is not used, operator has no effect
Replace all of these with:
And (Local0, 0x0F, Local0)
15. Try to compile again, and if it compiles, great! But it's not ready to be used yet. If it doesn't compile, you probably messed up a step (note to anyone not using an M1330 or M1530: some bioses actually ship with acpi tables with errors!)
Step Three: Patching the DSDT
Required: DTGP Method
This method is required for the USB fix and the NVidia injection to work. If you use don't use these you don't need it.
Insert this method under the _WAK method.
Method (DTGP, 5, NotSerialized) { If (LEqual (Arg0, Buffer (0x10) { /* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, /* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B })) { If (LEqual (Arg1, One)) { If (LEqual (Arg2, Zero)) { Store (Buffer (One) { 0x03 }, Arg4) Return (One) } If (LEqual (Arg2, One)) { Return (One) } } } Store (Buffer (One) { 0x00 }, Arg4) Return (One) }
Required for Snow Leopard: Fix USB Devices Randomly Not Working - Added 2009/20/14
Reportedly, some are having issues with USB randomly not working on startup, but then trying again will bring the USB back. I haven't actually experienced this. Perhaps it is Snow Leopard specific? Jkbuha and FMulder have come up with this fix (thanks!):
EDIT 2009/10/22 -> I've now updated to Snow Leopard, and sure enough this is REQUIRED for proper USB function.
Remove the following two lines from the Device (TMR) section:
IRQNoFlags () {2}
Optional: USB Drive Sleep Fix
Reportedly this fix will allow M1530s to sleep and wake up without causing USB drives to disconnect, but it does not work on my M1330
Find the EHC2 and EHCI sections and insert this method before the _PWR method in both sections:
Method (_DSM, 4, NotSerialized) { Store (Package (0x0B) { "AAPL,clock-id", Buffer (One) { 0x01 }, "device_type", Buffer (0x05) { "EHCI" }, "AAPL,current-available", 0x04B0, "AAPL,current-extra", 0x02BC, "AAPL,current-in-sleep", 0x03E8, Buffer (One) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }
Optional: NVidia Injection EDIT October 23 2011 - Patched to work with 10.7.2 (thanks zoliky, luggi)
EDIT October 29 2011 - Not required for anything if GraphicsEnabler=Yes is used in Chameleon:
Insert this code under the Device (VID) section within the Device (AGP) section (not in the independent (VID) section) under Name (_ADR, 0x00) and above the _DOS section. The "8400M GS" is the card found within the M1330. M1530 users will want to replace this with "8600M GT". If you do not use this patch and you have a NVidia card you can use an injector instead.
Name (_SUN, One) Method (_DSM, 4, NotSerialized) { Store (Package (0x18) { "@0,built-in", Buffer (One) { 0x01 }, "@0,compatible", Buffer (0x0B) { "NVDA,NVMac" }, "@0,device_type", Buffer (0x08) { "display" }, "@0,name", Buffer (0x0F) { "NVDA,Display-A" }, "@1,compatible", Buffer (0x0B) { "NVDA,NVMac" }, "@1,device_type", Buffer (0x08) { "display" }, "@0,display-cfg", Buffer (0x04) { 0x03, 0x01, 0x00, 0x00 }, "@1,display-cfg", Buffer (0x04) { 0xFF, 0xFF, 0x00, 0x01 }, "@1,name", Buffer (0x0F) { "NVDA,Display-B" }, "NVCAP", Buffer (0x18) { /* 0000 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, /* 0008 */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0010 */ 0x00, 0x00, 0x00, 0x00 }, "device_type", Buffer (0x0C) { "NVDA,Parent" }, "model", Buffer (0x18) { "NVIDIA GeForce 8400M GS" } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }
Optional: HD Audio Patching EDIT 2009/11/30: Recommended - Without it the computer may wake up instantly after sleep.
EDIT 2012/10/10 - I now recommend stripping out the HDEF section completely to prevent compatibility problems with VoodooHDA. Remove the Device(AZAL) (or Device(HDEF)) and any lines that refer to them (Thanks LatinMcG).
This patch allows the sound card to be detected as an HDEF audio card rather than an Azilla Audio card. Replace the Device (AZAL) section with this:
Device (HDEF) { Name (_ADR, 0x001B0000) Method (_DSM, 4, NotSerialized) { Store (Package (0x04) { "codec-id", Buffer (0x04) { 0x16, 0x76, 0x84, 0x83 }, "layout-id", Buffer (0x04) { 0x0C, 0x00, 0x00, 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } }
You will also have to change any references to AZAL to HDEF. With either the AZAL or HDEF section, a patched AppleHDA.kext can be used without HDAEnabler.kext (Leopard only solution at this time I believe), or alternatively VoodooHDA can be used. If you use this patch and VoodooHDA.kext, AppleHDA.kext must be removed otherwise it will conflict. It seems that you need this patch for working sleep if you do not include the SSDT tables (2009/11/17). One user has found this patch is needed even with the SSDT tables included, however it worked for me without for some reason
Optional: Adding SBUS Device (Added 2009/10/22) (Edit 2010/04/12 -> SMBI Address was Wrong)
jkbuha came up with this fix using a guide made by Master Chief (thank you). This allows the detection of the SBUS device, and it can be confirmed as detected using IORegistry Explorer by searching for SBUS. This device is required to get C-states working, however we still do not have working C-states even with this patch.
Add this under the first curly brace under Scope (\_SB):
Method (DBEN, 0, NotSerialized) { }
And this under the DTGP method we added:
OperationRegion (GPIO, SystemIO, 0x0500, 0x3C) Field (GPIO, ByteAcc, NoLock, Preserve) { GU00, 8, GU01, 8, GU02, 8, GU03, 8, GIO0, 8, GIO1, 8, GIO2, 8, GIO3, 8, Offset (0x0C), GL00, 8, GL01, 8, GL02, 8, GL03, 8, Offset (0x18), GB00, 8, GB01, 8, GB02, 8, GB03, 8, Offset (0x2C), GIV0, 8, GIV1, 7, GI15, 1, GIV2, 8, GIV3, 8, GU04, 8, GU05, 8, GU06, 8, GU07, 8, GIO4, 8, GIO5, 8, GIO6, 8, GIO7, 8, GL04, 8, GL05, 8, GL06, 8, GL07, 8 } OperationRegion (BSKU, SystemMemory, 0xFFBC0100, 0x01) Field (BSKU, ByteAcc, NoLock, Preserve) { , 1, BPHP, 3, Offset (0x01) } OperationRegion (GPE0, SystemIO, 0x042C, 0x04) Field (GPE0, ByteAcc, NoLock, Preserve) { , 1, GPEH, 1, , 7, PEEN, 1, , 1, PMEE, 1, Offset (0x03), PCIX, 1, Offset (0x04) }
And finally this above the section Device (ISAB):
Device (SBUS) { Name (_ADR, 0x001F0003) // pci8086,283e -> pci8086,3a30 Method (_DSM, 4, NotSerialized) { Store (Package (0x04) { "name", "pci8086,3a30", "device-id", Buffer (0x04) { 0x30, 0x3a, 0x00, 0x00 } /* , "subsystem-id", Buffer (0x04) { 0x70, 0x72, 0x00, 0x00 }, "subsystem-vendor-id", Buffer (0x04) { 0x86, 0x80, 0x00, 0x00 } */ }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } OperationRegion (SMBP, PCI_Config, 0x40, 0xC0) Field (SMBP, DWordAcc, NoLock, Preserve) { , 2, I2CE, 1 } OperationRegion (SMBE, PCI_Config, 0x04, 0x02) Field (SMBE, AnyAcc, NoLock, Preserve) { IOSE, 1 } OperationRegion (SMBI, SystemIO, 0x10C0, 0x10) Field (SMBI, ByteAcc, NoLock, Preserve) { HSTS, 8, Offset (0x02), HCON, 8, HCOM, 8, TXSA, 8, DAT0, 8, DAT1, 8, HBDR, 8, PECR, 8, RXSA, 8, SDAT, 16 } Name (SBOK, 0x00) Method (ENAB, 0, NotSerialized) { Store (0x01, IOSE) Store (One, SBOK) } Method (DISB, 0, NotSerialized) { Store (Zero, SBOK) } Method (SSXB, 2, Serialized) { If (STRT ()) { Return (0x00) } Store (0x00, I2CE) Store (0xBF, HSTS) Store (Arg0, TXSA) Store (Arg1, HCOM) Store (0x48, HCON) If (COMP ()) { Or (HSTS, 0xFF, HSTS) Return (0x01) } Return (0x00) } Method (SRXB, 1, Serialized) { If (STRT ()) { Return (0xFFFF) } Store (0x00, I2CE) Store (0xBF, HSTS) Store (Or (Arg0, 0x01), TXSA) Store (0x44, HCON) If (COMP ()) { Or (HSTS, 0xFF, HSTS) Return (DAT0) } Return (0xFFFF) } Method (SWRB, 3, Serialized) { If (STRT ()) { Return (0x00) } Store (0x00, I2CE) Store (0xBF, HSTS) Store (Arg0, TXSA) Store (Arg1, HCOM) Store (Arg2, DAT0) Store (0x48, HCON) If (COMP ()) { Or (HSTS, 0xFF, HSTS) Return (0x01) } Return (0x00) } Method (SRDB, 2, Serialized) { If (STRT ()) { Return (0xFFFF) } Store (0x00, I2CE) Store (0xBF, HSTS) Store (Or (Arg0, 0x01), TXSA) Store (Arg1, HCOM) Store (0x48, HCON) If (COMP ()) { Or (HSTS, 0xFF, HSTS) Return (DAT0) } Return (0xFFFF) } Method (SBLW, 4, Serialized) { If (STRT ()) { Return (0x00) } Store (Arg3, I2CE) Store (0xBF, HSTS) Store (Arg0, TXSA) Store (Arg1, HCOM) Store (SizeOf (Arg2), DAT0) Store (0x00, Local1) Store (DerefOf (Index (Arg2, 0x00)), HBDR) Store (0x54, HCON) While (LGreater (SizeOf (Arg2), Local1)) { Store (0x0FA0, Local0) While (LAnd (LNot (And (HSTS, 0x80)), Local0)) { Decrement (Local0) Stall (0x32) } If (LNot (Local0)) { KILL () Return (0x00) } Store (0x80, HSTS) Increment (Local1) If (LGreater (SizeOf (Arg2), Local1)) { Store (DerefOf (Index (Arg2, Local1)), HBDR) } } If (COMP ()) { Or (HSTS, 0xFF, HSTS) Return (0x01) } Return (0x00) } Method (SBLR, 3, Serialized) { Name (TBUF, Buffer (0x0100) {}) If (STRT ()) { Return (0x00) } Store (Arg2, I2CE) Store (0xBF, HSTS) Store (Or (Arg0, 0x01), TXSA) Store (Arg1, HCOM) Store (0x54, HCON) Store (0x0FA0, Local0) While (LAnd (LNot (And (HSTS, 0x80)), Local0)) { Decrement (Local0) Stall (0x32) } If (LNot (Local0)) { KILL () Return (0x00) } Store (DAT0, Index (TBUF, 0x00)) Store (0x80, HSTS) Store (0x01, Local1) While (LLess (Local1, DerefOf (Index (TBUF, 0x00)))) { Store (0x0FA0, Local0) While (LAnd (LNot (And (HSTS, 0x80)), Local0)) { Decrement (Local0) Stall (0x32) } If (LNot (Local0)) { KILL () Return (0x00) } Store (HBDR, Index (TBUF, Local1)) Store (0x80, HSTS) Increment (Local1) } If (COMP ()) { Or (HSTS, 0xFF, HSTS) Return (TBUF) } Return (0x00) } Method (STRT, 0, Serialized) { Store (0xC8, Local0) While (Local0) { If (And (HSTS, 0x40)) { Decrement (Local0) Sleep (0x01) If (LEqual (Local0, 0x00)) { Return (0x01) } } Else { Store (0x00, Local0) } } Store (0x0FA0, Local0) While (Local0) { If (And (HSTS, 0x01)) { Decrement (Local0) Stall (0x32) If (LEqual (Local0, 0x00)) { KILL () } } Else { Return (0x00) } } Return (0x01) } Method (COMP, 0, Serialized) { Store (0x0FA0, Local0) While (Local0) { If (And (HSTS, 0x02)) { Return (0x01) } Else { Decrement (Local0) Stall (0x32) If (LEqual (Local0, 0x00)) { KILL () } } } Return (0x00) } Method (KILL, 0, Serialized) { Or (HCON, 0x02, HCON) Or (HSTS, 0xFF, HSTS) } Device (BUS0) { Name (_CID, "smbus") Name (_ADR, 0x00) Device (MKY0) { Name (_ADR, 0x00) Name (_CID, "mikey") Method (_DSM, 4, NotSerialized) { Store (Package (0x07) { "refnum", 0x00, "address", 0x39, "device-id", 0x0CCB, Buffer (0x01) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } Method (H1EN, 1, Serialized) { If (LLessEqual (Arg0, 0x01)) { If (LEqual (Arg0, 0x01)) { Or (GL04, 0x04, GL04) } Else { And (GL04, 0xFB, GL04) } } } Method (H1IL, 0, Serialized) { ShiftRight (And (GL00, 0x02), 0x01, Local0) Return (Local0) } Method (H1IP, 1, Serialized) { Store (Arg0, Local0) } Name (H1IN, 0x11) Scope (\_GPE) { Method (_L11, 0, NotSerialized) { Notify (\_SB.PCI0.SBUS.BUS0.MKY0, 0x80) } } Method (P1IL, 0, Serialized) { ShiftRight (And (GL00, 0x40), 0x06, Local0) Return (Local0) } Method (P1IP, 1, Serialized) { If (LLessEqual (Arg0, 0x01)) { Not (Arg0, Arg0) And (GIV1, 0x0B, Local0) ShiftLeft (Arg0, 0x02, Local1) Or (Local1, Local0, GIV1) } } Name (P1IN, 0x16) Scope (\_GPE) { Method (_L16, 0, NotSerialized) { XOr (GIV1, 0x04, GIV1) Notify (\_SB.PCI0.SBUS.BUS0.MKY0, 0x81) } } } Device (DVL0) { Name (_ADR, 0x57) Name (_CID, "diagsvault") Method (_DSM, 4, NotSerialized) { Store (Package (0x03) { "address", 0x57, Buffer (0x01) { 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } } } }
Optional: IDE Fix (added 2009/11/17)
This fix allows you to use Snow Leopard with the vanilla IOATAFamily.kext (Thank you The King).
Under the both the Device (IDE0) and Device (IDE1) sections under the first Name line the add:
OperationRegion (IDET, PCI_Config, 0x40, 0x04) // IDE Timing RegisterField (IDET, WordAcc, NoLock, Preserve){ Offset (0x00), M1, 8, Offset (0x01), M2, 8, Offset (0x02), M3, 8, Offset (0x03), M4, 8}Method (_DSM, 4, NotSerialized){ Store (0x07, M1) Store (0xE3, M2) Store (Zero, M3) Store (0xC0, M4) Return (Zero)}
Optional: Clamshell Fix (added 2010/04/12)
This patch lets your computer sleep when you close the lid (thanks Brett Whinnen). Under _SB add the following:
Device (PNLF) { Name (_HID, EisaId ("APP0002")) Name (_CID, "backlight") Name (_UID, 0x0A) Name (_STA, 0x0B) }
Optional: Wait for it... SHUTDOWN FIX (YAY!) (added 2010/04/12)
This patch allows the computer to shut down properly with NVidia graphics. Reportedly working on M1530s but unfortunately not M1330s yet. Our friends on the Gigabyte thread figured out how to get shutdown working (sorry don't know who to credit), and Dlach and MorLipf here applied it to the M1530. Above method PTS, add the following:
OperationRegion (PMRS, SystemIO, 0x1030, One)Field (PMRS, ByteAcc, NoLock, Preserve){ , 4, SLPE, 1}
and then replace the PTS method with the following:
Method (_PTS, 1, NotSerialized) { If (LEqual (Arg0, 0x05)) { Store (Zero, SLPE) Sleep (0x10) } }
Recommended for newer 10.6 releases: USB Patch to Fix Sleep (added 2011/05/30)
Later 10.6.X releases (10.6.6+?) caused sleep to stop working when disconnected from the power supply. This patch fixes this. Under USB1, USB3, and USB4, remove the block that begins with _PSW. Do not touch the _PSW method under the other USBs or anywhere else. Thanks VMonHeros.
Here is a sample USB1 after complete (note no _PSW method):
Device (USB1) { Name (_ADR, 0x001D0000) Method (_PRW, 0, NotSerialized) { Store (UPRW (Zero, Zero), Local0) If (LEqual (Local0, 0x03)) { Return (Package (0x02) { 0x03, 0x03 }) } If (LEqual (Local0, One)) { Return (Package (0x02) { 0x03, One }) } Return (Package (0x02) { 0x03, Zero }) } Device (HUB0) { Name (_ADR, Zero) Device (CH00) { Name (_ADR, One) } Device (CH01) { Name (_ADR, 0x02) } } }
Required for 10.6.8 and Lion: PCI Patch (added 2011/07/20)
10.6.8 is much more Lion like. LatinMcG pointed out these patches that fix the DSDT for 10.6.8 (and I believe Lion but I haven't tested myself). Without these patches you will get beach balling and kernel panics. You may also need to change your Mac model in the smbios.plist to fix speed step and prevent kernel panics. MacBook5,1 works best for me.
Replace:
Device (PCI0) { Name (_HID, EisaId ("PNP0A03")) Name (_ADR, Zero)
With:
Device (PCI0) { Name (_HID, EisaId ("PNP0A08")) Name (_CID, EisaId ("PNP0A03")) Name (_UID, Zero)
Required for 10.6.8 and Lion: RTC Patch (added 2011/07/20)
This patch replaces the RTC with one from a Mac. Replace RTC with the below code:
Device (RTC) { Name (_HID, EisaId ("PNP0B00")) Name (_CRS, ResourceTemplate () { IO (Decode16, 0x0070, // Range Minimum 0x0070, // Range Maximum 0x01, // Alignment 0x08, // Length ) }) }
Required for 10.6.8 and Lion: SMBUS Patch (added 2011/07/20)
This is a simplified SMBUS patch that fixes the SMBuspci error that you would get if you don't do it.
Device (SBUS) { Name (_ADR, 0x001F0003) Device (BUS0) { Name (_CID, "smbus") Name (_ADR, Zero) Device (DVL0) { Name (_ADR, 0x57) Name (_CID, "diagsvault") } } Method (_DSM, 4, NotSerialized) { Store (Package (0x0A) { "built-in", Buffer (One) { 0x00 }, "name", "pci8086,283e", "device-id", Buffer (0x04) { 0x3E, 0x28, 0x00, 0x00 }, "subsystem-id", Buffer (0x04) { 0xA0, 0x00, 0x00, 0x00 }, "subsystem-vendor-id", Buffer (0x04) { 0x6B, 0x10, 0x00, 0x00 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } }
Required: HPET (added 2011/07/20)
The HPET is required for power management. Earlier I suggested to use "DSDT Patcher" with the -newHPET option that would automatically write a new HPET, but here is an HPET recommened by LatinMcG. If you use this HPET and the RTC above, you will no longer need to use the patcher. Replace the HPET with the one below.
Device (HPET) { Name (_HID, EisaId ("PNP0103")) Name (_CID, EisaId ("PNP0C01")) Name (BUF0, ResourceTemplate () { IRQNoFlags () {0} IRQNoFlags () {8} IRQNoFlags () {15} Memory32Fixed (ReadOnly, 0xFED00000, // Address Base 0x00000400, // Address Length ) }) Method (_STA, 0, NotSerialized) { Return (0x0B) //researching if F or B is best } Method (_CRS, 0, NotSerialized) { Return (BUF0) } }
Required: Compile the DSDT:
Run the following command:
iasl myDSDT.dsl
In the current folder you will find myDSDT.aml (possibly a different name or folder: it uses the file name specified in the DSDT). This is the final product! If it works, congratulations!
Step Four: Testing and Using the DSDT
I use Chamelleon RC2 so that's what I will give instructions for (no reason to upgrade to RC3 yet because I'm still using Leopard). Chamelleon installs an /Extra folder that contains the configuration information and can also contain your finished DSDT.aml. I don't recommend installing it there yet however because it might not work!
To prepare your machine to test/use the DSDT.aml
1. Edit the file /Extra/com.apple.Boot.plist. I use "sudo nano /Extra/com.apple.Boot.plist"
2. Under the key "Kernel Flags", add the flag "DropSSDT=Y" (flags are space separated if you already have another flag).
EDIT 2009/10/22 -> I ran into an interesting problem here. I installed 10.6 Snow Leopard on a second partition leaving 10.5 intact on it's partition, and Snow Leopard was looking at the com.apple.Boot.plist on the 10.5 partition! This appears to be a Chameleon bug.
3. Copy the attached smbios.plist file to the /Extra folder and edit it to match your hardware. Set SMmaximalclock to your processor speed in MHz, your SMexternalclock to your bus speed, and SMSerial to something unique but with the same number of characters. If you do not know the bus speed you can use the utility CPU-X to look it up.
4. If you use SMBIOSResolver.kext or something similar remove it. The smbios.plist takes the role of it.
5. Copy your DSDT.aml to the /Extra folder, and rename it to something different such as "DSDT_Test.aml" This is so that it does not load by default, so if it doesn't work, it's not that big a deal.
6. Correct all the permissions in the /Extra folder with the following commands:
sudo chmod -R 755 /Extrasudo chown root:wheel /Extra
7. If you use IntelCPUPMDisabler.kext (or NullCPUPowerManagement.kext), VoodooPower.kext, VoodooUSBEHCI.kext, and/or SleepEnabler.kext remove them. Also remove the patch necessary to make VoodooUSBEHCI.kext work. You can also remove HDAEnabler.kext if you have it, and if you did the NVidia patch you should remove your injector. Clear the kext cache if you removed any kexts. Repair permissions. Kext Utility comes in really helpful here.
8. Reboot
9. When the boot loader comes up, arrow over to the OS-X partition, and type:
DSDT=/Extra/[testdsdt.aml]
10. Press [ENTER] and cross your fingers!
11. If you are happy with the results, rename your test DSDT file to DSDT.aml in the /Extra folder, and it will load by default from now on.
Kexts I use for Lion and Snow Leopard (2011/08/25)
In /Extra/Extensions
FakeSMC.kext: Slice's version with hardware monitoring.
NVClockX: FakeSMC plugin: Nvidia graphics specific hardware monitoring.
IntelCPUMonitor: FakeSMC plugin.
VoodooBattery.kext : From SuperHai's boot CD.
*You do not need AppleACPIPS2Nub.kext with this version!
VoodooSDHC.kext: from Voodoo Labs (note I sometimes get lockups when using this under Lion)
EvoReboot.kext: Reboot fix.
In /System/Library/Extensions
BCM5722D.kext: Needed for M1330 Only! Ethernet. By Adlan here: http://www.insanelym...p...t&p=1638112
VoodooHDA.kext: By Slice. Not compatible with stock AppleHDA.kext -> will cause KP if both present. I tried a disabler but it didn't work for me, so I just delete it.
VoodooPS2Controller.kext: By Andy Vandijck patched by Brett Whinnen here: http://www.insanelym...p...t&p=1623714
Kexts that must be removed if you have them:
IntelCPUPMDisabler.kext
NullCPUPowerManagement.kext
SleepEnabler.kext
SMBIOSResolver.kext
AppleHDA (if you use the HDEF sound patch)
Other Required and Useful Software:
Chameleon 2 RC5: Not officially released but Ermak periodically packages builds here: http://www.insanelym...p...t&p=1543024 (I've always had best luck installing it manually: link to howto on Ermak's page)
Kext Utility: Repairs permissions and rebuilds kext caches after installing or removing kexts.
SMCMonitor: Monitor your current CPU speed. Useful for testing if SpeedStep is working. Your CPU frequency should change between a fraction of your CPU frequency (33% on mine) to the highest CPU frequency depending on what you are doing.
iStat Pro Monitor your temps. When your video card goes close to 100 degrees C it means you will have to get another motherboard soon.
Portal 2: For celebrating when you finally get your Hackintosh working!
Hints
To see what other people of done, decompile other people's DSDT.aml files by using the same iasl command you used to decompile the dumped tables.
Files
DSDT_M1330_T8300_NVIDIA_091014.zip 10.4K
256 downloads - DSDT.aml for an M1330 with NVidia graphics and a T8300 (2.4GHz) CPU ONLY with USB fix, USB sleep fix, and audio fix. (2009/10/14).
DSDT_M1330_T8300_NVIDIA_091022.zip 11.31K
197 downloads - Above DSDT with SBUS added (2009/10/22)
DSDT_M1330_NVIDIA_ANYCPU_20091117.zip 10.29K
521 downloads - DSDT for M1330 with any CPU and NVidia graphics with all fixes listed in this guide (2009/11/17)
DSDT_M1530_NVIDIA_ANYCPU_20091117.zip 8.52K
789 downloads - DSDT for M1530 with any CPU and NVidia graphics with all fixes listed in this guide by Brett Whinnen. Details Here. (2009/11/17)
DSDT_M1530_NVIDIA_ANYCPU_20100404.zip 9.42K
1183 downloads - DSDT for M1530 with any CPU and NVidia graphics with shutdown fix and SBUS fix by Brett Whinnen. Brett's Post Here. (2010/04/12)
DSDT_M1330_NVIDIA_ANYCPU_20100411.zip 10.33K
602 downloads - DSDT for M1330 with any CPU and NVidia graphics with shutdown fix (not working yet), clamshell fix, and USB storage device unsafe remove on sleep fix. (2010/04/12)
DSDT_M1530_NVIDIA_ANYCPU_20110525.zip 9.43K
270 downloads - DSDT for M1530 with any CPU and NVidia graphics with USB sleep fix and all other previous fixes. (2011/05/30)
DSDT_M1330_NVIDIA_ANYCPU_20110525.zip 10.33K
162 downloads - DSDT for M1330 with any CPU and NVidia graphics with USB sleep fix and all other previous fixes. (2011/05/30)
DSDT_M1530_NVIDIA_ANYCPU_20110720.zip 8.8K
735 downloads - DSDT for M1530 with any CPU and NVidia graphics with 10.6.8/Lion fixes. Confirmed working on Snow Leopard 10.6.8 and Lion. (2011/07/20)
DSDT_M1330_NVIDIA_ANYCPU_20110720.zip 9.79K
350 downloads - DSDT for M1330 with any CPU and NVidia graphics with 10.6.8/Lion fixes. Tested on Snow Leopard 10.6.8 and Lion. (2011/07/20)
DSDT_M1530_NVIDIA_ANYCPU_20111023.zip 8.81K
365 downloads - Same as above M1530 DSDT but with NVidia patch for 10.7.2 (2011/10/23)
DSDT_M1330_NVIDIA_ANYCPU_20111023.zip 9.79K
254 downloads - Same as above M1330 DSDT but with NVidia patch for 10.7.2 (2011/10/23)
DSDT_M1530_NVIDIA_ANYCPU_20111029.zip 8.65K
540 downloads - No NVidia injection patch. Use GraphicsEnabler=Yes in Chameleon. (2011/10/29)
DSDT_M1330_NVIDIA_ANYCPU_20111029.zip 9.62K
493 downloads - No NVidia injection patch. Use GraphicsEnabler=Yes in Chameleon. (2011/10/29)
DSDT_M1530_NVIDIA_ANYCPU_20120929.zip 8.6K
146 downloads - Strip out HDEF for Mountain Lion 10.8.2 compatibility with VoodooHDA (2012/10/10).
DSDT_M1330_NVIDIA_ANYCPU_20120929.zip 9.57K
186 downloads - Strip out HDEF for Mountain Lion 10.8.2 compatibility with VoodooHDA (2012/10/10).*You must use the DropSSDT=y boot flag if you use a DSDT meant for a specific CPU, and you must NOT use it if you use a DSDT meant for any CPU.
smbios.plist.zip 658bytes
2612 downloads - smbios.plist. Edit for your machine.



Sign In
Create Account










