Jump to content

Ivy-Bridge XCPM Kernelpatch for 10.12


wastez
 Share

17 posts in this topic

Recommended Posts

Hello,

I installed sierra on my Ivy-Bridge Laptop and had to realize that the -xcpm flag was removed in 10.12 which allowed to use the XNU Kernel CPU Powermanagement on a Ivy System.
Because i don´t want to use the old AppleIntelCPUPM i searched for a solution and i found it.

Thx to pike who wrote here about xcpm for haswell-e cpus: https://pikeralpha.wordpress.com/2016/07/26/xcpm-for-unsupported-processor/
I used his informations about the kernel structure to create this patch.

So here is the patch for Clover:
Add it in KernelAndKextPatches --> KernelToPatch:

Comment: xcpm bootstrap
Find: 83C3C483 FB22
Replace: 83C3C683 FB22
Comment: Reboot fix for xcpm
Find: 554889E5 41574156 41554154 53504189 D64189F7 4889FB45 85FF0F84 
Replace: C34889E5 41574156 41554154 53504189 D64189F7 4889FB45 85FF0F84

You can check if xcpm is active with the following terminal command:

sysctl -n machdep.xcpm.mode

If it is 1 then xcpm is working as it should.


Clear i´ve to say that everything else need to be correct that it work as it should. (ssdt with xcpm mode enabled and also the FrequencyVectors need to be setted in the X86PlatformPlugin)
But this isn´t other then in older OS.

Hope it will help somebody.

Edit:
If there are problems else with the powermanagement use a new Version of ssdtprgen to create a new ssdt.

  • Like 2
Link to comment
Share on other sites

Same here.  :)

IVB too and enabled XCPM. All works fine now.

BTW you can use an injector to fix X86PlatformPlugin. This will patch vanilla X86PP on the fly.

AppleX86PlatformPluginInjector.kext.zip

Notes:

1. Put your patched [board-id].plist to ./AppleX86PlatformPluginInjector.kext/C*/R*

2. Install AppleX86PlatformPluginInjector.kext to /L*/E* [Recommended] or /S*/L*/E*

3. You can keep SIP in place. (Injector is not affected by SIP.)

 

And I don't think to block all MSRs is a good way. Just do some experiments to find out which MSR(s) trigger the reboot and just block it(them). You can check this at https://pikeralpha.wordpress.com/2016/07/26/xcpm-for-unsupported-processor/comment-page-1/#comment-6301 (The byte values don't change so far, 16C60b.)

 

Enjoy.  :)

 

PMheart

  • Like 2
Link to comment
Share on other sites

Same here.  :)

IVB too and enabled XCPM. All works fine now.

BTW you can use an injector to fix X86PlatformPlugin. This will patch vanilla X86PP on the fly.

attachicon.gifAppleX86PlatformPluginInjector.kext.zip

Notes:

1. Put your patched [board-id].plist to ./AppleX86PlatformPluginInjector.kext/C*/R*

2. Install AppleX86PlatformPluginInjector.kext to /L*/E* [Recommended] or /S*/L*/E*

3. You can keep SIP in place. (Injector is not affected by SIP.)

 

And I don't think to block all MSRs is a good way. Just do some experiments to find out which MSR(s) trigger the reboot and just block it(them). You can check this at https://pikeralpha.wordpress.com/2016/07/26/xcpm-for-unsupported-processor/comment-page-1/#comment-6301 (The byte values don't change so far, 16C60b.)

 

Enjoy.  :)

 

PMheart

Can you explain a bit in more detail what I should do to run this on my GA-B75M-D3H UEFI with i3 3225 and NVidia GTX750ti? Specifically note 1. My pc runs ok in osx 10.12 except for waking up from sleep (it doesn't). SysDef is now 14,2. Should this be changed to 6,1? Thanks.

Link to comment
Share on other sites

The 14.2 smbios is setted already for xcpm.
So if you want to keep this setting it would be good to activate xcpm as i wrote in post 1.
If you want to keep AppleIntelCPUPM it would be good to use a file for X86PlatformPlugin which has no FrequencyVectors (every model before haswell) in it.

Link to comment
Share on other sites

  • 6 months later...

Patches for 10.13 PB1

 

Comment: xcpm bootstrap 10.13 PB1
Find: 89d804c4 3c22
Replace: 89d804c6 3c22
Comment: _xcpm_pkg_scope_msr
Find: 488d3d8b 316600be 07000000 31d2e88ffcffff 
Replace: 488d3d8b 316600be 07000000 31d29090909090
Link to comment
Share on other sites

  • 2 weeks later...

Same here. :)

IVB too and enabled XCPM. All works fine now.

BTW you can use an injector to fix X86PlatformPlugin. This will patch vanilla X86PP on the fly.

attachicon.gifAppleX86PlatformPluginInjector.kext.zip

Notes:

1. Put your patched [board-id].plist to ./AppleX86PlatformPluginInjector.kext/C*/R*

2. Install AppleX86PlatformPluginInjector.kext to /L*/E* [Recommended] or /S*/L*/E*

3. You can keep SIP in place. (Injector is not affected by SIP.)

 

And I don't think to block all MSRs is a good way. Just do some experiments to find out which MSR(s) trigger the reboot and just block it(them). You can check this at https://pikeralpha.wordpress.com/2016/07/26/xcpm-for-unsupported-processor/comment-page-1/#comment-6301 (The byte values don't change so far, 16C60b.)

 

Enjoy. :)

 

PMheart

how to make board-id.plist?

 

나의 SM-N930S 의 Tapatalk에서 보냄

Link to comment
Share on other sites

how to make board-id.plist?

 

나의 SM-N930S 의 Tapatalk에서 보냄

First run

ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//'

in Terminal. You will get something like this:

Mac-F60DEB81FF30ACF6

This is your board-id. X86PlatformPlugin will read it.

Locate to /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources, you will find various these kinds of plist. (e.g. Mac-F60DEB81FF30ACF6.plist )

Make some modifications to it. For example. With freqVectorsEdit.sh.

But the modified plist will be restored to vanilla one after system update. So you can put it/them inside AppleX86PlatformPluginInjector.kext/C*/R* and install it to /S/L/E or /L/E, and it will keep working after system update.

  • Like 2
Link to comment
Share on other sites

First run

ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//'
in Terminal. You will get something like this:
Mac-F60DEB81FF30ACF6
This is your board-id. X86PlatformPlugin will read it.

Locate to /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources, you will find various these kinds of plist. (e.g. Mac-F60DEB81FF30ACF6.plist )

Make some modifications to it. For example. With freqVectorsEdit.sh.

But the modified plist will be restored to vanilla one after system update. So you can put it/them inside AppleX86PlatformPluginInjector.kext/C*/R* and install it to /S/L/E or /L/E, and it will keep working after system update.

thank you sir

 

나의 SM-N930S 의 Tapatalk에서 보냄

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

First run

ioreg -p IODeviceTree -d 2 -k board-id | grep board-id | sed -e 's/ *["=<>]//g' -e 's/board-id//'

in Terminal. You will get something like this:

Mac-F60DEB81FF30ACF6

This is your board-id. X86PlatformPlugin will read it.

Locate to /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources, you will find various these kinds of plist. (e.g. Mac-F60DEB81FF30ACF6.plist )

Make some modifications to it. For example. With freqVectorsEdit.sh.

But the modified plist will be restored to vanilla one after system update. So you can put it/them inside AppleX86PlatformPluginInjector.kext/C*/R* and install it to /S/L/E or /L/E, and it will keep working after system update.

I'm trying to get this work. I have an ivy bridge processor I tried using the freqvectorsedit.sh script but none of the board ids are the board I have. can you give me some direction on which board-id to use? my smbios is iMac 13,2 and that's pretty close to my hardware.

Link to comment
Share on other sites

I'm trying to get this work. I have an ivy bridge processor I tried using the freqvectorsedit.sh script but none of the board ids are the board I have. can you give me some direction on which board-id to use? my smbios is iMac 13,2 and that's pretty close to my hardware.

 

You don't have to change your board.  That's the whole point of the script.  You can take the frequency vectors of a different board and apply them to yours.  You will have to see which one works best.  For example, I use the board that is appropriate for the SMBIOS for MBP9,2.  However, I took the frequency vectors from the board for MBP11,4 and applied them to my board.  I still have the same board-id in my SMBIOS and the SMBIOS is still the one for MBP9,2 but the frequency vectors were modified so that I get the power management features found in the board for MBP11,4, including new P-States I never had before.  You'll have to experiment to find out which board-id works best for you.  Therefore, be sure to save a copy of the plist for your board-id as a back up first before you begin experimenting.

  • Like 1
Link to comment
Share on other sites

thank you for the help. I tried your advice and got it working with iMac 14,2. then I updated to 10.12.6 and it stopped working. I redid everything since this post says a system update will break things, but it didn't help. The good thing is I know it works. perhaps the kernelpatch isn't the same. I did some searching but can't find anything about 10.12.6. 

 

You don't have to change your board.  That's the whole point of the script.  You can take the frequency vectors of a different board and apply them to yours.  You will have to see which one works best.  For example, I use the board that is appropriate for the SMBIOS for MBP9,2.  However, I took the frequency vectors from the board for MBP11,4 and applied them to my board.  I still have the same board-id in my SMBIOS and the SMBIOS is still the one for MBP9,2 but the frequency vectors were modified so that I get the power management features found in the board for MBP11,4, including new P-States I never had before.  You'll have to experiment to find out which board-id works best for you.  Therefore, be sure to save a copy of the plist for your board-id as a back up first before you begin experimenting.

Link to comment
Share on other sites

thank you for the help. I tried your advice and got it working with iMac 14,2. then I updated to 10.12.6 and it stopped working. I redid everything since this post says a system update will break things, but it didn't help. The good thing is I know it works. perhaps the kernelpatch isn't the same. I did some searching but can't find anything about 10.12.6. 

 

Here's the new patch info for 10.12.6:

 

            #17            

  • Like 1
Link to comment
Share on other sites

  • 2 years later...
 Share

×
×
  • Create New...