Popular Post Pimentel Posted January 25, 2014 Popular Post Share Posted January 25, 2014 (edited) Hello folks! GUIDE UPDATED - Added support for 10.10 XCPM kernelFirst of all it is very good that we have an updated version of Chameleon, so please take this most updated version right here in the official thread: http://www.insanelym...ameleon-22-svn/Since 10.7.4 for CPUs and SandyBridger IvyBridger P and C States - that are responsible for the proper functioning of energy - are no longer provided by Chameleon, in others words, only activate GeneratePStates and GenerateCStates doesn't work any more.A quick exit is to use the kext NullCPUPowermanagement, but I don't recommend continued use of this kext because it disables AppleIntelCPUPowermanagement kext which is responsible for power managementThe most viable and recommended solution that will give to you a good power management is the creation of a SSDT which will contain all P-States and C-States.Step-by-StepCreating the SSDT Create your SSDT based on the script Pike R. AlphaRun these commands in terminal curl -o ~/ssdtPRGen.sh https://raw.githubusercontent.com/Piker-Alpha/ssdtPRGen.sh/master/ssdtPRGen.sh chmod +x ssdtPRGen.sh ./ssdtPRGen.sh After you run it you need to put the Maximum Frequency and Maximum TDP of your CPU ... see these information about your CPU in here: http://ark.intel.com/This is an example of one i7 2600 that has 3800MHz(3.8 Ghz) of maximum frequency and 95 of TDP sudo ./ssdtPRGen.sh 3800 95 Place the SSDT in Extra folder and rename ssdt_pr for SSDT Note: Some CPUs are auto-detected by the script, the script just now detects the maximum frequency and TDP, so if simply after running the first command you are prompted to save the SSDT in Extra folder(not asking to enter your max frequenc. and TDP as the guide teach),don't worry about it, just to confirm, because the script already detected everything and created the SSDT and the time is already asking to save the file.Patch AppleIntelCPUPowermanagement In older mobos is necessary to patch the kext AICPUPM to enable recording in Bios, otherwise you will get a kernel panic because it can't write to the Bios ...Download the patch: AICPUPMpatchRun in terminal cd ~/Downloads/AICPMPatch Just find and list ... sudo perl AICPMPatch.pl /System/Library/Extensions/AppleIntelCPUPowerManagement.kext/Contents/MacOS/AppleIntelCPUPowerManagement Then give patch in wrmsr to enable recording in Bios sudo perl AICPMPatch.pl /System/Library/Extensions/AppleIntelCPUPowerManagement.kext/Contents/MacOS/AppleIntelCPUPowerManagement --patch After that you need to update the cache sudo touch /System/Library/Extensions Kernel Patch for Haswell CPU(Kernel XCPM) Since version 10.8.5 a new kernel was implemented on OSX, he called XNU kernel(XNU CPU Power Management(xcpm)). This kernel has the power management moved down into it, in past we used AppleIntelCPUPowermanagement kext to control power management and some Bios were lockeds, in others words, were not allowed to write information on it, so the patch was created for kext AICPUPM to solve this problem (see above how to patch the kext AICPUPM). But with the power management moved down into the kernel(XNU kernel) AICPUPM the kext isn't loaded and so the same mistake that we were having in the past with AICPUPM kext(Kernel Panic)are having now with the XNU kernel in some models CPU haswell(mainly in portable models, some Desktop models doesn't need patch) To solve this problem it is necessary to patch the kernel. For 10.10 you need Open the terminal and type: cd /Volumes/Name of your HDD/System/Library/Kernels/ Note that in 10.10 kernel directory was changed. Copy this perl code is for 10.10 version, put line by line sudo perl -pi -e 's|\xe2\x00\x00\x00\x02\x00\x00\x00|\x00\x00\x00\x00\x02\x00\x00\x00|g' kernel sudo perl -pi -e 's|\xe2\x00\x00\x00\x4c\x00\x00\x00|\x00\x00\x00\x00\x4c\x00\x00\x00|g' kernel sudo perl -pi -e 's|\xe2\x00\x00\x00\x90\x01\x00\x00|\x00\x00\x00\x00\x90\x01\x00\x00|g' kernel For 10.9.x and 10.8.5 you need run this command in terminal: cd /Volumes/Name of your HDD/ Now copy this perl code if you use version 10.9.x sudo perl -pi -e 's|\x74\x6c(\x48\x83\xc7\x28\x90\x8b\x05..\x5e\x00\x85\x47\xdc)\x74\x54(\x8b\x4f\xd8\x45\x85\xc0\x74\x08\x44\x39\xc1\x44\x89\xc1)\x75\x44(\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x57\xf8\x48\x8b\x47\xe8\x48\x85\xc0\x74\x06\x48\xf7\xd0\x48\x21\xc2\x48\x0b\x57\xf0\x49\x89\xd1\x49\xc1\xe9\x20\x89\xd0\x8b\x4f\xd8\x4c\x89\xca)(\x0f\x30\x8b\x4f\xd8\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x17\x48\x83\xc7\x30\xff\xce)\x75\x99(\x5d\xc3)\x90{7}|\x74\x73${1}\x74\x5b${2}\x75\x4b${3}\x66\x81\xf9\xe2\x00\x74\x02${4}\x75\x92${5}|g' mach_kernel or that other perl code if you use version 10.8.5 sudo perl -pi -e 's|\x74\x69(\x48\x83\xc7\x28\x90\x8b\x05\xfe\xce\x5f\x00\x85\x47\xdc)\x74\x51(\x8b\x4f\xd8\x45\x85\xc0\x74\x05\x44\x39\xc1)\x75\x44(\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x57\xf8\x48\x8b\x47\xe8\x48\x85\xc0\x74\x06\x48\xf7\xd0\x48\x21\xc2\x48\x0b\x57\xf0\x49\x89\xd1\x49\xc1\xe9\x20\x89\xd0\x8b\x4f\xd8\x4c\x89\xca)(\x0f\x30\x8b\x4f\xd8\x0f\x32\x89\xc0\x48\xc1\xe2\x20\x48\x09\xc2\x48\x89\x17\x48\x83\xc7\x30\xff\xce)\x75\x9c(\x5d\xc3)\x90{7}(\x90{3})|\x74\x70${1}\x74\x58${2}\x75\x4b${3}\x66\x81\xf9\xe2\x00\x74\x02${4}\x75\x95${5}${6}|g' mach_kernel Finally update the cache sudo touch /System/Library/Extensions Ready! XCPM patched kernel and is working perfectly on your CPU haswellNote1: XCPM only works in Ivy Bridge and Haswell CPUs, and the CPUs Ivy Bridger use by default the power management given by AICPUPM kext, to use the power management provided by the kernel XCPM you must enable this flag(Chameleon)/argument(Clover): -xcpm Haswell CPUs use XCPM management by default and doesn't change.The management XCPM not support CPUs Sandy Bridger, so who uses SB can stay quiet about it.Note2: Even Patching the kernel XCPM, you will need to patch the kext AICPUPM if your BIOS is locked for writing.Note3: If you have no problem with KP, it isn't necessary to patch the kernel, but in some cases, helped to patch the kernel to add some energy states. Note4: Clover bootloader already has this patched built-in, you just need edit config.plist to enableir it <key>KernelAndKextPatches</key> <dict> <key>KernelPm</key> <true/> </dict> So, if you enable it in Clover isn't necessary patch kernel, because Clover will make this for you Final adjustments To make the Chameleon recognize your SSDT, enable DropSSDT in org.chameleon <key>DropSSDT</key> <string>Yes</string> Don't install the NullCPUPM and don't enable P and C States in org.chameleon ... Don't forget to create a DSDT in future to help the power management Note: For those who are having difficulty with power management ... take a look to see if the kexts: X86PlatformPlugin, ACPI_SMC_PlatformPlugin, AppleLPC are loaded, type kextstat the terminal to see ...Good luck to all who try this guide, I just put it all together in a single tutorial to facilitate the understanding of power management in Sandy and Ivy Bridger, but all credits go to the respective owners of the wonderful tools that enable power management in our CPUs Credit: Pike R. Alpha flaked RevoGirl ReHabMan: http://www.insanelymac.com/forum/topic/302376-guide-patching-the-kernel-for-haswell-cpus-xcpm-early-reboot/ Edited November 7, 2014 by PimentelX86 38 Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/ Share on other sites More sharing options...
Allan Posted January 26, 2014 Share Posted January 26, 2014 PimentelX86...Congrats man,!! Very easy and simple!! Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1988854 Share on other sites More sharing options...
Pimentel Posted January 26, 2014 Author Share Posted January 26, 2014 Hello Thanks Allan...I think this guide work in Haswell CPU too... i make a hack to my friend, he use haswell and i use this script to get power management and work perfect...But i don't know yet... if it work in haswell 100%, i make only 1 test... but i think work... Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1988895 Share on other sites More sharing options...
Revolutioner Posted February 5, 2014 Share Posted February 5, 2014 Really Good one ,very understandable Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1991599 Share on other sites More sharing options...
Pimentel Posted February 5, 2014 Author Share Posted February 5, 2014 Hello Thanks Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1991642 Share on other sites More sharing options...
Pimentel Posted February 16, 2014 Author Share Posted February 16, 2014 Hello Guide updated to Support Haswell CPUs I hope it's very clear and easy to understand Remembering: All credits to developers... 1 Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1994723 Share on other sites More sharing options...
Allan Posted February 16, 2014 Share Posted February 16, 2014 very, very good!! Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1994724 Share on other sites More sharing options...
Pimentel Posted February 16, 2014 Author Share Posted February 16, 2014 Hellothanks Allan again... i updated portuguese guide too: http://www.insanelymac.com/forum/topic/295577-gerenciamento-de-energia-para-sandy-bridgeivy-bridgehaswell-cpu/ Good Luck! Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1994728 Share on other sites More sharing options...
hydra1ysk Posted February 21, 2014 Share Posted February 21, 2014 hi everybody! i try to implement this hack to improve my hackintosh but i get this kernel panic. "attempt to re register power management interface --aicpm..." what i can do? DELL N4050 Intel I3 2330-m (SandyB) 6 GB RAM DDR 1066 500 GB HDD Intel HD3000 Atheros 9285 Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996095 Share on other sites More sharing options...
Pimentel Posted February 21, 2014 Author Share Posted February 21, 2014 HelloOk… What steps of this guide you followed???Did you create your SSDT and patch AICPUPM? Are you using NullCPUPM? Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996110 Share on other sites More sharing options...
hydra1ysk Posted February 21, 2014 Share Posted February 21, 2014 Hello Ok… What steps of this guide you followed??? Did you create your SSDT and patch AICPUPM? Are you using NullCPUPM? STEPS - Creating the SSDT - Patch AppleIntelCPUPowermanagement - Kernel Patch for Haswell CPU(Kernel XCPM) i think in the last step i did wrong, because my CPU it’s a SandyBrigde. how i revert this step? Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996134 Share on other sites More sharing options...
Pimentel Posted February 21, 2014 Author Share Posted February 21, 2014 Hello The management XCPM not support CPUs Sandy Bridger Yes… you did a wrong thing…haven’t how revert it… only way was backup your mach_kernel… so, this mean you need re-install OSX and do everything again… Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996148 Share on other sites More sharing options...
hydra1ysk Posted February 21, 2014 Share Posted February 21, 2014 Hello Yes… you did a wrong thing… haven’t how revert it… only way was backup your mach_kernel… so, this mean you need re-install OSX and do everything again… Thanks for your reply. i'll reinstall OSX and i'll try this hack again. I'll post the results. Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996155 Share on other sites More sharing options...
hydra1ysk Posted February 21, 2014 Share Posted February 21, 2014 I re-install mavericks and i got the same kernel panic "attempt to re register power management interface--AICPM present in xcpm mode?" Only i do this steps - Creating the SSDT - Patch AppleIntelCPUPowermanagement (now i skip the last one) Did you create your SSDT and patch AICPUPM? yes, with this hack Are you using NullCPUPM? no, i delete it. maybe is a problem with my SSDT or the org.chamaleon. I attach this files. Please help osx Files.zip Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996311 Share on other sites More sharing options...
Pimentel Posted February 22, 2014 Author Share Posted February 22, 2014 Hello Are you using tonymac tools? We don't support tonymac... This guide created work perfect with Chameleon, but... What bootloader are you using? Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996341 Share on other sites More sharing options...
hydra1ysk Posted February 22, 2014 Share Posted February 22, 2014 Hello Are you using tonymac tools? We don't support tonymac... This guide created work perfect with Chameleon, but... What bootloader are you using? I use chameleon wizard for install (i have the v.2371 but i tested with the v.2368). i have 2 notices 1.- I fix the problem. Only i replace the "AppleIntelCPUPowermanagement Patched" with the original file (from USB installation) and the system works. 2.- the script maybe don't work in my case. I use the kext MSRDumper.kext for test if SSDT works (from a revogirl post). When i enable this kext, in the console i only get this 22-02-14 10:41:08,000 kernel[0] MSRDumper CoreMulti(8) 22-02-14 10:41:08,000 kernel[0] MSRDumper PStatesReached: 8 22-02-14 10:41:09,000 kernel[0] MSRDumper CoreMulti(8) 22-02-14 10:41:09,000 kernel[0] MSRDumper PStatesReached: 8 i see in youtube when you apply this method, the console show the pstates of the CPU like this 16 22 29 35 38 39 I run also the geekbench and i get the same score (2000). Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996414 Share on other sites More sharing options...
Pimentel Posted February 22, 2014 Author Share Posted February 22, 2014 Hello Great Job! P-States stages is controled by SSDT, but they already in SSDT that you created, but they aren't working... you get only 8x(800Mhz)standard to you CPU Model identifier(SMbios)is responsible of enable these P-States... I have a i7 2600 and i made my SSDT using this script, but when i look my states, i only get 2 16x - 34x(Min - Max)... I used iMac 12,2 but i don't get more than 2... i simple change for a another SMbios, i changed to Macbook Pro 8,1 and i get 8 states(16, 20, 25, 28, 30, 32 34, 35) In others words... you need jus t change your SMbios... try a diferente and see with this app: http://sourceforge.net/projects/dpcimanager/ If it work.... what's your hardware? 2 Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996420 Share on other sites More sharing options...
hydra1ysk Posted February 22, 2014 Share Posted February 22, 2014 Hello Great Job! P-States stages is controled by SSDT, but they already in SSDT that you created, but they aren't working... you get only 8x(800Mhz)standard to you CPU Model identifier(SMbios)is responsible of enable these P-States... I have a i7 2600 and i made my SSDT using this script, but when i look my states, i only get 2 16x - 34x(Min - Max)... I used iMac 12,2 but i don't get more than 2... i simple change for a another SMbios, i changed to Macbook Pro 8,1 and i get 8 states(16, 20, 25, 28, 30, 32 34, 35) In others words... you need jus t change your SMbios... try a diferente and see with this app: http://sourceforge.net/projects/dpcimanager/ If it work.... what's your hardware? i'm using MACBOOK PRO 8.1 from chameleon wizard and i get the same result. I try with all other macbook pro (8.1, 8.2, 8,3, 9.1, 9.2) and i get the same result. I change the smbios, reboot, run script and reboot again. what i can do? edit: the kexts, ACPI_SMC_PlatformPlugin and AppleLPC are loaded in my system. i must delete it? both? Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996445 Share on other sites More sharing options...
Pimentel Posted February 22, 2014 Author Share Posted February 22, 2014 Hello the kexts, ACPI_SMC_PlatformPlugin and AppleLPC are loaded in my system. i must delete it? both? What's your hardware? I talk about Macbook Pro 8,1, but this work for my hardware, i don't think if this will work to you... Try other SMbios... Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996557 Share on other sites More sharing options...
hydra1ysk Posted February 22, 2014 Share Posted February 22, 2014 Hello What's your hardware? I talk about Macbook Pro 8,1, but this work for my hardware, i don't think if this will work to you... Try other SMbios... i attach the LSPCI file extract from linux (for the hardware) i try with this SMBIOS with the same result: macbook pro (8.1, 8.2, 8,3, 9.1, 9.2) lspci.txt Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996570 Share on other sites More sharing options...
Pimentel Posted February 22, 2014 Author Share Posted February 22, 2014 Hello Try another SMbios... try Mac Pro 3,1... it worked for me too, but i get only 6 states... Your CPU is Sandy Bridger, but... post a complete specs... like in my signature.. Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996585 Share on other sites More sharing options...
hydra1ysk Posted February 22, 2014 Share Posted February 22, 2014 Hello Try another SMbios... try Mac Pro 3,1... it worked for me too, but i get only 6 states... Your CPU is Sandy Bridger, but... post a complete specs... like in my signature.. I try with all SMbios and i get the same result..... maybe the SSDT it's the problem. My specs: Laptop DELL N4050 CPU: Intel I3 2330-m RAM: 6 GB RAM DDR 1066 GRAPHICS: INTEL HD3000 HD: 500 GB HDD WIFI: Atheros 9285 OS: 10.9 Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996600 Share on other sites More sharing options...
Pimentel Posted February 22, 2014 Author Share Posted February 22, 2014 Hello maybe the SSDT it's the problem. Or maybe not... you did all necessary steps to create your SSDT? Tryconfigure your Bios: http://olarila.com/forum/viewtopic.php?f=2&t=1804 Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996613 Share on other sites More sharing options...
hydra1ysk Posted February 23, 2014 Share Posted February 23, 2014 Hello Or maybe not... you did all necessary steps to create your SSDT? Tryconfigure your Bios: http://olarila.com/forum/viewtopic.php?f=2&t=1804 i have the BIOS OK. I check with the guide and i'm ok I try again this hack .... but now i see this warning s when i run the script (first step) MacBook-Pro-de-Sebastian:~ sebastian$ ./ssdtPRGen.sh ssdtPRGen.sh v0.9 Copyright (c) 2011-2012 by † RevoGirl v6.6 Copyright (c) 2013 by † Jeroen v9.1 Copyright (c) 2013-2014 by Pike R. Alpha ---------------------------------------------------------------- System information: Mac OS X 10.9 (13A603) Brandstring 'Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz' Processor Declaration(s) Found in DSDT Generating ssdt_pr.dsl for a MacBookPro8,1 [Mac-94245B3640C91C81] Sandy Bridge Core i3-2330M processor [0x206A7] setup [0x0902] With a maximum TDP of 35 Watt, as specified by Intel Number logical CPU's: 4 (Core Frequency: 2200 MHz) Number of Turbo States: 0 Number of P-States: 15 (800-2200 MHz) Adjusting C-States for detected (mobile) processor Injected C-States for CPU0 (C1,C3,C6,C7) Warning: 'cpu-type' may be set improperly (0x0902 instead of 0x0602) Intel ACPI Component Architecture ASL Optimizing Compiler version 20130117-64 [Jan 19 2013] Copyright (c) 2000 - 2013 Intel Corporation ASL Input: /Users/sebastian/Desktop/ssdt_pr.dsl - 174 lines, 5122 bytes, 33 keywords AML Output: /Users/sebastian/Desktop/ssdt_pr.aml - 1147 bytes, 11 named objects, 22 executable opcodes Compilation complete. 0 Errors, 0 Warnings, 0 Remarks, 0 Optimizations Warning: Failed to locate the Clover boot.log Creating temporarily mount point: /Volumes/EFI Mounting EFI partition... mount_hfs: Invalid argument Unmounting EFI partition... umount: /Volumes/EFI: not currently mounted Removing temporarily mount point... Do you want to copy /Users/sebastian/Desktop/ssdt_pr.aml to /Extra/ssdt_pr.aml? (y/n)?y i use chameleon for bootloader. Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996619 Share on other sites More sharing options...
Pimentel Posted February 23, 2014 Author Share Posted February 23, 2014 Hello I don't saw any problem... it said: Number of P-States: 15 (800-2200 MHz) Adjusting C-States for detected (mobile) processor Injected C-States for CPU0 (C1,C3,C6,C7) So... P-States was found and they're in SSDT, but like i said, it doens't enable... you need find a SMbios that work to you... try diferents models Try iMac 12,1/12,2 Link to comment https://www.insanelymac.com/forum/topic/295587-power-management-for-sandyivy-bridgehaswell-cpus/#findComment-1996625 Share on other sites More sharing options...
Recommended Posts