Jump to content

[GUIDE] HWP(Intel Speed Shift) enable with full power management


syscl
 Share

171 posts in this topic

Recommended Posts

For those who experience incomplete power management with the HWP, here's the solution 

  • [Updated: 2017-02-11] @dpassmore suggested me to use tiny SSDT method to inject Plugin-Type instead of using ssdtPRGen. Here's the refined SSDT-pr I made(use _DSM)

SSDT-pr.aml.zip

  • HWPEnable = Yes
  • Piker's MSR 0xE2 lock patch to fix instant reboot(in KernelToPatch)
Comment: MSR 0xE2 _xcpm_idle instant reboot (c) Pike R. Alpha
MatchOS: 10.12
Find:    20b9e200 00000f30  
Replace: 20b9e200 00009090 

Through Clover config.plist

<key>KernelToPatch</key>
		<array>
			<dict>
				<key>Comment</key>
				<string>MSR 0xE2 _xcpm_idle instant reboot(c) Pike R. Alpha</string>
				<key>Disabled</key>
				<false/>
				<key>Find</key>
				<data>
				ILniAAAADzA=
				</data>
				<key>MatchOS</key>
				<string>10.12</string>
				<key>Replace</key>
				<data>
				ILniAAAAkJA=
				</data>
			</dict>
		</array>
  • choose HWP support model, e.g. MacBook9,1, MacBookPro13,1, MacBookPro13,2, MacBookPro13,3

Here's the proof from my XPS 13 9350(Iris 540 model)

post-950366-0-24257300-1486676816_thumb.png

 

Note: for better battery life and cpu temperature, you also need to tune with X86PlatformPlugin.kext/Contents/Resources, I injected more power management properties for  i7-6560:

  • Base frequency: 2.20Ghz
  • Max turbo frequency: 3.20Ghz
  • I even lower 6550's threshold down to 0.50Ghz which can never achieve while using MacBookPro13,2 with vanilla X86PlatformPlugin.kext
  • power_reduced_playback
  • thermally_optimized_xcode
  • optimized_photobooth
  • thermally_optimized_xcode
  • optimized_screensavers
  • optimized_slideshows
  • optimized_visualizers
  • thermally_optimized_maps

the rest with optimized_* and thermall_*, powe_reduced* are extracted from MacBook9,1's config file: Mac-9AE82516C7C6B903.plist, here's where to change:

post-950366-0-68905600-1486684239_thumb.png

 

The temperate and frequency are pretty well now!

I will post more detail about how to tune the frequency vector later. But, since I have 2 dues and 2 mid terms soon, my post will be slow.

 

credit Pike R. Alpha(_xcpm_idle patch stop the kernel panic)

credit David Passmore(SMBios solution such that all Dell Skylake laptop can enjoy this flash function)

​credit syscl (full HWP Enable)

 

Good luck,

syscl

  • Like 15
Link to comment
Share on other sites

Wow, it's amazing you finally release the method you mentioned a few months ago. Means it is finally stable enough to release?

:lol:

Thank you J*F*(I've hidden her/his name intentionally to save her/his privacy). Actually, I've tested quiet a long time, but I never release this method in any of my blogs because I'm afraid it's unstable. Till now, I am a bit sure it will work as expect. 

 

Thank you,

syscl

Link to comment
Share on other sites

Does this method work with iMac 17.1 SMBIOS?

Sorry, I don't know if iMac 17.1 supported HWP or not, and I haven't had time. In theory, you can copy MacBookPro133's freqv to iMac17,1 which will make your iMac17,1 support HWP's config.

 

syscl

Link to comment
Share on other sites

Actually, I tried before with clover method without SSDTPrgen. I activated the HWP using 0x80002A01 value for i76700K. Then when i check it with AppleIntelInfo.kext HWP has enabled. However, once the system wakes up, I realise that HWP is not enabled. Did you check that HWP is active after system wakes?

Link to comment
Share on other sites

This method (the SSDTPrgen part) is not yet working with MBP 13,x and a skylake CPU as reported here:

 

https://github.com/Piker-Alpha/ssdtPRGen.sh/issues/293

 

The HWP option by itself works but the ssdt.aml generated causes a kernel panic.

First, I can 100% sure to tell you it work because I've tested this method about a month long! And bugman who has posted the issue in the link you post has just told me the successful result by using my method:

post-950366-0-51918300-1486694418_thumb.png

 

post-950366-0-86581000-1486694436_thumb.png

 

syscl

Actually, I tried before with clover method without SSDTPrgen. I activated the HWP using 0x80002A01 value for i76700K. Then when i check it with AppleIntelInfo.kext HWP has enabled. However, once the system wakes up, I realise that HWP is not enabled. Did you check that HWP is active after system wakes?

Use Clover to active HWP, not the kext.

 

syscl

Link to comment
Share on other sites

I didn't say I use any kext for HWP. :yes:  Just in Clover; HWPEnable= True / HWP Value= 0x80002A01

OK, sorry, I haven't even realized there's HWP value in Clover's setting. And, I barely sleep XPS 13 these days, because there may be data corruption(don't know why!).

 

With this method, you need ssdtPRGen to generate SSDT-pr, otherwise you won't get complete PowerManagement.

 

syscl

  • Like 1
Link to comment
Share on other sites

it's good news. i boot system success with ssdt and hwp ,x86 is load success,please check it by yourself~
thanks syscl and pike

my laptop is asus ux501vw ,i7-6700hq,smbios 13,3


This method (the SSDTPrgen part) is not yet working with MBP 13,x and a skylake CPU as reported here:

 

https://github.com/Piker-Alpha/ssdtPRGen.sh/issues/293

 

The HWP option by itself works but the ssdt.aml generated causes a kernel panic.

Use syscl's method ,you can boot system now,it's ok~ kp problem has fixed by this method~ 

byw,i'm bugman,i have tested~

  • Like 1
Link to comment
Share on other sites

Mmm i must've done something wrong here? What i did:

-Acitvated HWP through clover (did not add any options for CPU other than that)

-Generated the ssdt.aml with the latest Pike's script

-Using MBP 13,3 Smbios.

-Using the provided patch in clover (against instant reboot) - This may be the culprit (i have KernelPm activated in Clover). I guess your patch replaces this.

 

Will try again now and report back (without KrnelPm in Clover).

Link to comment
Share on other sites

Mmm i must've done something wrong here? What i did:

-Acitvated HWP through clover (did not add any options for CPU other than that)

-Generated the ssdt.aml with the latest Pike's script

-Using MBP 13,3 Smbios.

-Using the provided patch in clover (against instant reboot) - This may be the culprit (i have KernelPm activated in Clover). I guess your patch replaces this.

 

Will try again now and report back (without KrnelPm in Clover).

You need KernelPM as well if your BIOS lock the MSR 0xE2. They are different patches.

 

syscl

Link to comment
Share on other sites

You need KernelPM as well if your BIOS lock the MSR 0xE2. They are different patches.

 

syscl

Yeah just tested now.  No imediate reboot without KernelPm but it hangs right after it loads OsxAptioFixDrv-64.efi

Only choice was to re-activate KernelPm and drop ssdt.aml to get the system to boot.

  • Like 1
Link to comment
Share on other sites

Yeah just tested now.  No imediate reboot without KernelPm but it hangs right after it loads OsxAptioFixDrv-64.efi

Only choice was to re-activate KernelPm and drop ssdt.aml to get the system to boot.

What system you use? Do you touch X86PlatformPlugin.kext before?

 

syscl

Link to comment
Share on other sites

What system you use? Do you touch X86PlatformPlugin.kext before?

 

syscl

I have an Alienware 15 r2 laptop (intel CPU 6820HK).  X86PlatformPlugin.kext never altered, still vanilla.

Attached my Clover Folder if it can be of any help.

CLOVER.zip

Well actually i think i found the problem, i added your patch to Kexttopatch instead of KernelToPatch.  Misread your post :)

Will try again now.

Link to comment
Share on other sites

I have an Alienware 15 r2 laptop (intel CPU 6820HK).  X86PlatformPlugin.kext never altered, still vanilla.

Attached my Clover Folder if it can be of any help.

attachicon.gifCLOVER.zip

Well actually i think i found the problem, i added your patch to Kexttopatch instead of KernelToPatch.  Misread your post :)

Will try again now.

Yes something messed up in your Clover, try this one

 

CLOVER.zip

 

Report here.

 

syscl

  • Like 1
Link to comment
Share on other sites

using ssdprgen or ssdt plugintype1 ..when sleep using fn+ insert ..i get reboot on wake on my xps 13 9350 i7 6560u

do you have same issue? no problem with sleep from apple menu

Hello @azlvda, what's this mean?... OK, let me see. I don't try fn + insert because I barely sleep my XPS 13 9350 due to it may cause data corruption. Need to find what's wrong.

 

BTW, why press fn + insert? Do you try my latest deploy.sh here

 

syscl

Link to comment
Share on other sites

All right. Now I know the usage of the 'Frequencies'! Actually the value is the Max Turbo Frequency. X86 may just read this IMHO to avoid confusions?

e.g. Let's take a look at the configuration file of MacBook9,1. i.e. Mac-9AE82516C7C6B903.plist

For my MacBook9,1, its CPU is Core m5-6Y54, which can turbo boost up to 2.7 GHz / 2700 MHz. And now have a look!

post-1579222-0-71579100-1486717678_thumb.png

Okay. This is for my CPU. Its value is <integer>1</integer>. This means that the "2nd" ('FrequencyVectors' -> '1') set of the FrequencyVectors will be used. Check the following FrequencyVectors section. Or this picture may help you.

post-1579222-0-63368400-1486717885_thumb.png

But this is for real Macs. For hackintosh builds. The CPU is typically different from the ones that real Macs used.

So. I suggest everyone edit the 'Frequencies' entry to match your own situations, which the Max Turbo Frequency should correspond to the FrequencyVectors you selected.

 

For example. @syscl's i7-6560u.

According to its specs, the Max Turbo Frequency is 3.2 GHz / 3200 MHz, and we want to use the first set of FrequencyVectors, which can be the most approachable to the vanilla settings and thus we shall change the 'Frequencies[0]' to '3200'. Just like this. And also. You can even delete the other ones. Like this.

post-1579222-0-16117500-1486718741_thumb.png

 

FYI.

 

 

[EDIT]

Or I think we can do it more easily: Select your preferred set of FrequencyVectors, note that just ONE! And then remove the 'Frequencies' entry...

 

Link to comment
Share on other sites

 

 

 

I didn't say I use any kext for HWP. :yes:  Just in Clover; HWPEnable= True / HWP Value= 0x80002A01

 

 

i have had HWPEnable=True for awhile on my T460 skylake box (with a proper SSDT PR) so i just assumed this aspect was working!?

 

However, I was using MBP11,1 so may be not working or not 100%? 

 

... i will change to 13,1 and see what is different.

 

how is this HWP value determined and entered? 

Link to comment
Share on other sites

 Share

×
×
  • Create New...