Jump to content

Sandy Bridge-E Power Management [Big Sur 11.2.1] && [Big Sur 11.4]


40 posts in this topic

Recommended Posts

You "calculated" ? :|

You'd have to explain better than that how you derived those patches.

Sure, the "Find" hex strings do appear to exist in 11.4's AICPUPM kext but you do not say what those binary patches do nor how you derived them in the 1st place. By that I mean what the original code does and what your patches do in terms of behaviour change on the CPU power management front. As such, it's quite difficult to comprehend how you made those up.

 

Of course, if it's something you collected somewhere from someone else's work, do link to it to enlighten us on the underlying process. No credits, no indication of source, no technical explanation or anything on p1 but don't feel uncomfortable about this, we all know that binary patches for CPU power management don't fall off the sky...

On 6/7/2021 at 6:48 AM, Vinicius P. Miranda said:

Specifically, I only used these two patches to make Power Management work very well:
7511B9 to EB11B9
3E7538 to 3E9090

 

I'm in the process of trying out Big Sur on my X79/3930k now that I have a Metal-capable graphics card in it. Noticed that CPUPM wasn't working and did some digging in the absence of a working set of patches.

 

Here are the two patches you listed updated for 11.4:

 

7513B9 to EB13B9

3E7539 to 3E9090

 

I'll do some more digging and try to find the new strings for the rest of the patches (as you can see with just two patches it shows 5.7GHz for Core REQ). But for now these two will get speedstep working with a 3930k.

 

These might work for 11.3 too but I don't have it to check.

 

pm-quickfix.thumb.png.7e23f892b00b159d5e17d71e6ce0f377.png

 

After some more digging I think I've found the 7 updated strings. However two of them don't appear patchable in any recognisable way (to me at least):

 

FF0F841A01 to FF0F851A01

0100010F84 to 0100010F85 (this string hasn't changed since Yosemite)

0600000F3225FF0F00006B to ?

0600000F3283E01F4289443B to ?

01745E to 01EB5E

3E7539 to 3E9090

7513B9 to EB13B9

 

If I enable any of the three in red I get kernel panics on boot. The last of these looks right to me based on previous patches but it may be dependent on the other two which I can't see how to patch. The previous versions of these started with C974 which was patched to C9EB. But now they're 0600 so I'm stumped. 

 

Experimental!:

 

The string FC02740D appears a little before the first two strings in red above. It's the closest set of bytes to the strings that have a 74 in them and they only appear above those two strings. Replacing those two patches with a single patch changing FC02740D to FC02EB0D boots with no panic. However my Big Sur volume has gotten corrupted and Disk Utility can't repair it so I probably have to do a wipe and reinstall which I don't have time for tonight. I've had to boot the recovery image to check this new patch for panics.

 

Enabling the 01745E patch still results in a panic though.

Edited by Riley Freeman
  • Like 2

I'm beginning to think that only those two patches are needed. Maybe in the past all 7 were necessary but I've been able to boot 10.13.6, 10.15.7 and 11.4 with speed step and turbo using just those two patches. I can't see any change in operation with the other patches missing.

  • verdazil changed the title to Sandy Bridge-E Power Management [Big Sur 11.2.1] && [Big Sur 11.4]
On 6/30/2021 at 12:07 AM, Hervé said:

You "calculated" ? :|

You'd have to explain better than that how you derived those patches.

Using the "scientific poke method" 

I am not a developer and for me a binary is a black box. However, now Power Management for 11.4 works and this is the main thing for me.

On 6/30/2021 at 3:52 PM, Riley Freeman said:

 

I'm in the process of trying out Big Sur on my X79/3930k now that I have a Metal-capable graphics card in it. Noticed that CPUPM wasn't working and did some digging in the absence of a working set of patches.

 

Here are the two patches you listed updated for 11.4:

 

7513B9 to EB13B9

3E7539 to 3E9090

 

I'll do some more digging and try to find the new strings for the rest of the patches (as you can see with just two patches it shows 5.7GHz for Core REQ). But for now these two will get speedstep working with a 3930k.

 

These might work for 11.3 too but I don't have it to check.

 

pm-quickfix.thumb.png.7e23f892b00b159d5e17d71e6ce0f377.png

 

After some more digging I think I've found the 7 updated strings. However two of them don't appear patchable in any recognisable way (to me at least):

 

FF0F841A01 to FF0F851A01

0100010F84 to 0100010F85 (this string hasn't changed since Yosemite)

0600000F3225FF0F00006B to ?

0600000F3283E01F4289443B to ?

01745E to 01EB5E

3E7539 to 3E9090

7513B9 to EB13B9

 

If I enable any of the three in red I get kernel panics on boot. The last of these looks right to me based on previous patches but it may be dependent on the other two which I can't see how to patch. The previous versions of these started with C974 which was patched to C9EB. But now they're 0600 so I'm stumped. 

 

Experimental!:

 

The string FC02740D appears a little before the first two strings in red above. It's the closest set of bytes to the strings that have a 74 in them and they only appear above those two strings. Replacing those two patches with a single patch changing FC02740D to FC02EB0D boots with no panic. However my Big Sur volume has gotten corrupted and Disk Utility can't repair it so I probably have to do a wipe and reinstall which I don't have time for tonight. I've had to boot the recovery image to check this new patch for panics.

 

Enabling the 01745E patch still results in a panic though.

Yeahhhhhh!!! Riley, u rock man.

It worked perfectly on 11.4 and also on Monterey beta 2 (In 11.3 I haven't tested it but it doesn't matter anymore. What matters is to keep macOS up to date).
I believe that only these two Patches are needed for perfect Power Management.

How did you find these new values? Is it difficult to explain how you get them?
I believe it will only be a matter of time before we have to look for new patches for PM. I spent weeks trying to find the new patches, but I don't know how to look for that.

On 6/25/2021 at 1:13 PM, Hervé said:

Such binary patches are usually derived from disassembling the binary code of the kext and/or consulting the source code published by Apple (but I've not checked if the source code of AICPUPM kext is available). Most of the time, the reason why binary patches that worked in certain versions no longer work in subsequent ones is because the code has changed over time and after new OS X/macOS versions got released (eg: IOGraphicsFamily or AppleIntelSNBGraphicsFB patches). Easiest way to check that out is to:

  1. open up the binary file of the kext targeted for patching with a hex editor such as Hex Fiend or other
  2. search for the binary sequences that were used in previous patches for modification (i.e. the "find" sequences)

If any sequence cannot be found, the associated patch is of course no longer valid/applicable. The new sequences and their patches must therefore be identified. That's when code disassembling is usually required unless the new/revised binary sequences can easily be derived through, say, shortening, similarities or otherwise.

 

For instance:

  • out of the 7 x sequences listed in post #1 of the Catalina thread mentioned by @Vinicius P. Miranda, only the 2nd one can be found in Big Sur 11.4's AICPUPM kext.
  • out of the 2 x sequences shown in his screenshot of May 31st, none can be found in Big Sur 11.4's AICPUPM kext.

The previous/existing patches are therefore irrelevant/deprecated in such conditions.

 

On 6/27/2021 at 5:08 AM, PPCnostalgic said:

BTW you should wait for Big Sur 11.5 release to see if that release will solve, before going mad...

Thank you Hervé for the explanation. I really didn't know it was something like a detective survey. I thought there might be a more generic tutorial, but I couldn't find it.
The way is to try to take some time to study more about it. I'm new to the world of programming and I'm starting with web languages, I don't know anything about hardware language.

I will try to learn this for when patches stop working in the future.

 

PPCnostalgic, Hervé, @Riley Freeman found Patches to solve the PM of 3930K and derivatives. Thank you all.

 

3 hours ago, Vinicius P. Miranda said:

How did you find these new values? Is it difficult to explain how you get them?
I believe it will only be a matter of time before we have to look for new patches for PM. I spent weeks trying to find the new patches, but I don't know how to look for that.

 

I compared the Catalina and Big Sur AppleIntelCPUPowerManagement binaries in a hex editor. Just searched for matching strings between the two binaries that were near the ones in the Catalina binary. That way I knew I had the right strings.

 

If you look back at the history of these patches there's usually only one or two bits that change in these strings.

7 hours ago, PPCnostalgic said:

Glad to know you solved. Are those patches for Core i7 3930k only or they work for other CPU(s) as well?

I believe it works on any x79 with Sandy Bridge-E and -EP. Including Chinese motherboards.

Maybe it can work on Ivy Bridge-E too, but I don't have to test.

On 3/13/2021 at 1:14 AM, verdazil said:

This information is for get a working CPU Power Management on Chinese motherboards X79 with Sandy Bridge-E CPU.

We need 7 patches (2 patches for 11.4) for AppleIntelCPUPowerManagement.kext (See samples in attachment)

In addition to the standard post-install recommendations you should use your own prepared:

- DSDT.aml

- SSDT.aml, generated for your CPU by ssdtPRGen.sh script

and SSDT-PLUG.aml from OpenCore set

 

Tested work in

OpenCore, v 0.6.7, Big Sur v 11.2.1 (20D75), PC Build II in my profile

OpenCore, v 0.7.0, Big Sur v 11.4 (20F71), PC Build II in my profile

 

You have no patches for Ivy Bridge EP (Big Sur 11.4)?

8 minutes ago, NEOSoftWare said:

You have no patches for Ivy Bridge EP (Big Sur 11.4)?

Patches not tested on Ivy Bridge EP. But they should work too.

54 minutes ago, verdazil said:

Патчи не тестировались на Ivy Bridge EP. Но они тоже должны работать.

did not help, that with the patch, that without the patch, the stepping does not work, the multiplier jumps from 29 to 32, and does not mess up to 12

 

Снимок экрана 2021-07-12 в 11.44.06.png

6 minutes ago, NEOSoftWare said:

did not help, that with the patch, that without the patch, the stepping does not work, the multiplier jumps from 29 to 32, and does not mess up to 12

I can only confirm once again that the patches ideally work on the specified hardware and version of the system. 

In theory, should work for Ivy Bridge EP too. However, patches are only one part of the necessary settings. Is it loaded X86PlatformPlugin? Is there a DSDT with the correct CPU frequencies?

1234.png

12 minutes ago, verdazil said:

I can only confirm once again that the patches ideally work on the specified hardware and version of the system. 

In theory, should work for Ivy Bridge EP too. However, patches are only one part of the necessary settings. Is it loaded X86PlatformPlugin? Is there a DSDT with the correct CPU frequencies?

1234.png

yes, these records are there, ssdtPRGen was made without applying patches, but stepping does not work, for catalina I took patches from here https://www.insanelymac.com/forum/topic/344523-sandy-bridge-e-ivy-bridge-e-power-management-1015/ and everything worked, I updated it to bigsur and I can't get it to work properly. now the processor in benchmarks gives out maximum performance, but in idle time due to the fact that it does not drop the processor frequency constantly at a temperature of 48-51 degrees, and in catalina and windows it was 36-39 degrees.

 

Edited by NEOSoftWare
×
×
  • Create New...