Skip to content

Instantly share code, notes, and snippets.

@sclem
Last active January 4, 2022 19:51
Show Gist options
  • Save sclem/c48fc373325e9b3fd6e5 to your computer and use it in GitHub Desktop.
Save sclem/c48fc373325e9b3fd6e5 to your computer and use it in GitHub Desktop.
Dell Precision T3500 OSX Power Management Tutorial

Dell T3500 OSX Power Management Tutorial

  1. Assume you have OSX installed.

Extract your dsdt from windows or linux - use aida64.

You may get errors. Choose fix errors. If any remain, google the line the error occurs for the fix. For example: My only remaining error was an unidentified *. rename *pnp0c14 to PNP0C14 - all caps, remove the *, keep the quotes.

Compile… Save AML as, desktop wherever. copy to /Extra/

open chameleon wizard set generate p,c,dropssdt

backup your dsdt file! you’re about to edit it.

dsdteditor patches: lpc ich10 dtgp

modify method DSM (ctrl+f for it) make it look exactly like this: If your device-id buffer values are not 0x18, 0x3a, change the values under compatible, ioname, and name to the hex values corresponding to what you have. Verify these are valid appleLPC kext definitions by running this command:

cat /System/Library/Extensions/AppleLPC.kext

Look for the string pci8086,3a18 or whichever corresponds to your device id. If its not there, you’re going to have to hunt down the proper info in intel documentation for your chipset - you can verify your chipset by opening IORegistryEditor (Part of Xcode now) and searching for “ISA”.

or get a processor that is more compatible with the OS X operating system…

Method (_DSM, 4, NotSerialized)
       
{
            Store (Package (0x08)
                {
                    "device-id", 
                    Buffer (0x04)
                    {
                         0x18, 0x3A, 0x00, 0x00
                    }, 
                    "compatible", 
                    Buffer (0x0D)
                    {
                        "pci8086,3a18"
                    }, 
                    "IOName", 
                    Buffer (0x0D)
                    {
                        "pci8086,3a18"
                    }, 
                    "name", 
                    Buffer (0x0D)
                    {
                        "pci8086,3a18"
                    }
                }, Local0)
            DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
            Return (Local0)
}

DSDT editing is not something to play around with. If you don’t know what you are doing, don’t try to just “follow” this guide, as it will probably require some debugging on your part because everyone’s system is different.

if you ever get kernel panics during the process, use DSDT=null boot arg. This won’t load your custom dsdt.

When complete, reboot and verify that appleLPC.kext is loaded by running this command: kextstat | grep AppleLPC If it’s not, you still need to fix your dsdt. Look at the patches list and use google, its your best friend here.

If it is, congratulations.

http://www.insanelymac.com/forum/files/file/132-aicpmpatch/

Next, we need to patch apples cpu power management kernel extension. Basically, on non apple hardware, mrs registers are read only. Writing to them will cause a KP. This patch fixes this issue.

first, backup your current power management kext.

cp -r /System/Library/Extensions/AppleIntelCPUPowerManagement.kext/ ~/AppleIntelCPUPowerManagement.kext

This puts this backup file in your home folder but you can place it anywhere as long as you remember where!

next cp into downloaded patch folder… run this command:

sudo perl AICPMPatch.pl /System/Library/Extensions/AppleIntelCPUPowerManagement.kext/Contents/MacOS/AppleIntelCPUPowerManagement --patch

This will patch your aicpm kext. (acronym)

Next remove kernel cache.. sudo touch /System/Library/Extensions/

Then repair permissions on your boot drive diskutil repairPermissions /

cd /System/Library/Extensions mv NullCPUPowerManagement.kext NullCPUPowerManagement.kext.backup

This re enables AppleIntelCPUPowerManagement.kext, allowing native power management.

Reboot and cross your fingers.

If you get a kernel panic here, boot from your usb installer, go into terminal and copy your backed up NullCPUPowerManagement.kext back to where it belongs. (reverse the mv command.) This will let you boot and debug.

If your computer does not shut down properly and your bios settings are reset to default after hard reset, you have a CMOS reset problem. You need to patch: Install the ElliotForceLegacyRTC.kext.

Remove ev0Reboot after shutdown fix.

Open dsdt editor again. Apply sbus fix. right below the sbus code, insert this if you have CheckSleepCapability logs on boot. These are registered as expansion slots and will prevent proper sleep.

Device (EHC1)
        {
            Name (_ADR, 0x001D0007)
            Name (_PRW, Package (0x02)
            {
                0x0D, 
                0x03
            })
            Method (_DSM, 4, NotSerialized)
            {
                Store (Package (0x04)
                    {
                        "device-id", 
                        Buffer (0x04)
                        {
                             0x3C, 0x3A, 0x00, 0x00
                        }, 
                        "AAPL,clock-id", 
                        Buffer (One)
                        {
                             0x01
                        }
                    }, Local0)
                DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                Return (Local0)
            }
        }
        Device (EHC2)
        {
            Name (_ADR, 0x001A0007)
            Name (_PRW, Package (0x02)
            {
                0x0D, 
                0x03
            })
            Method (_DSM, 4, NotSerialized)
            {
                Store (Package (0x04)
                    {
                        "device-id", 
                        Buffer (0x04)
                        {
                             0x3C, 0x3A, 0x00, 0x00
                        }, 
                        "AAPL,clock-id", 
                        Buffer (One)
                        {
                             0x01
                        }
                    }, Local0)
                DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                Return (Local0)
            }
}

Verify the fix on reboot. kextstat | grep SMBus You should see this kext loaded. Also, your boot log with -v will no longer have ehci errors.

com.apple.driver.AppleSMBusPCI (1.0.12d1) <12 5 4 3>

Prevent CMOS reset, get rid of elliotforcelegacyrtc.kext: sudo perl -pi -e 's|\x75\x2e\x0f\xb6|\xeb\x2e\x0f\xb6|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

sudo touch /System/Library/Extensions

Then backup your ElliotForceLegacyRTC and remove it from S/L/E.


Now we need to extract your SSDT file (for power management). Extract from linux, use same DSDT tutorial to compile and place in /Extra. Chameleon will load it automatically.

On reboot, run HWMonitor app if its not loaded on login and check your CPU speeds. You should get all multiplers working for your CPU. This means power management is working!

Benefits:

  • Lower CPU temps - on average, my cpu ran 10 degrees C cooler.
  • Less power consumption
  • Proper sleep capability
  • Better overall CPU usage = faster computer.

For the interested:

There are two ways of getting this kext working. One is this way. The long way. The other is to patch your bios. However, this is a BAD idea unless you really really REALLY know what you are doing. An improperly patched bios can turn your computer into an expensive doorstop. More info on DSDT patching here:

http://clover-wiki.zetam.org/Fixing-DSDT

On OS X update

  • Repatch AppleIntelCPUPowerManagement.kext
  • repatch AppleRTC.kext

sudo perl -pi -e 's|\x75\x2e\x0f\xb6|\xeb\x2e\x0f\xb6|' /System/Library/Extensions/AppleRTC.kext/Contents/MacOS/AppleRTC

remove GPUSensors from FakeSMC if its there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment