zhangqq 发表于 2017-1-16 12:40

我修改了HWPEnable.kext使之在唤醒时重新使能HWP。

附件如下,请自行编译,安全考虑,恕不提供编译好的文件。
我只增加了电源管理的部分的代码,代码的其它部分属于原作者。

zhangqq 发表于 2017-1-16 17:17

用了这个新版kext就不再需要clover的HWPEnable开关。

参数的设定请参考原作者的如下说明。

goodwin_c said:


Quote
- My changes for HWP support in Clover are already in repo and will be included into next build https://sourceforge....boot/code/3879/ (https://sourceforge.net/p/cloverefiboot/code/3879/)
- Fully rewrote my kext. I like it now! You can got it here https://github.com/goodwin/HWPEnable (https://github.com/goodwin/HWPEnable)
- Normal support of HWP needs not only CPU configuration, but also frequencyVectors with HWP flag. Currently in El Capitan this is only MacBook9,1. So who want to have best possible CPU performance with incredible battery life - change your smbios to MacBook9,1. Also, for those who has generated ssdt.aml - delete it and forget, we don't need it anymore bcz HWP will handle all power management! Yarrr
So now my kext have some configuration in Info.plist. Also you can manually change your performance profile with new command line tool. If somebodywants-youcanmakeGUIforit Asformeclitoolismorethanenough.
So let's do some description:
In Info.plist:
- you can disable HWP enabling by kext with "HWPenable"
- you can disable automatic HWP profile setting on kext load with "HWPSetDeaults" - you can set automatic HWP profile with "HWPDeaultVal"   
You can read current HWP profile until working ins OS X with next command: ./hwpenabler rd_req
You can set current HWP profile until working ins OS X with next command: ./hwpenabler wr_req <HEX_VAL>
Where <HEX_VAL> is hexidecimal value for HWP settings cpu register. So, this setting looks scary as for now... lets learn a little...
Lets check example:
80002301 - you can divide into four parts:
80 - EPP profile (performance preference), can be value from 00 to FF (from 0 to 255 in decimal). Bigger value - more aggresive battery saving. WithFFmostpartoftimeyouCPUwillbeonlowestfrequency.Findoutwhatyoulikemore Defaultisdecimal128thatgives80inhex
00 - reserved, should be zero
23 - maximum frequency, from hex 23 will give 35 that is maximum turbo freq for i7-6700HQ. If you have different CPU or you want to limit max freq - change this
01 - lowest frequency, just keep it as 01
So, looking on that, we can make few profiles:
80002301 - middle point
64002301 - little more performance (moderate mode)
94002301 - little more battery saving (same setting as on real MacBook9,1)
Happy using guys!
P.S. Forgot one more detail! New kext now loads automatically with system, no need to load it manually on each reboot!

794767404 发表于 2017-1-16 22:13

支持,终于不用写脚本重新加载HWPEnable.kext了。

calmtv 发表于 2017-1-16 22:48

楼主还是放上编译好的Kext吧

794767404 发表于 2017-1-16 22:53

还是挺矛盾的,虽然用hwp比用ssdtPRGen变频档数多,但是Rehabman说只通过hwp不能完全实现原生电源管理(x86PlatformPlugin?).

zhangqq 发表于 2017-1-16 23:58

794767404 发表于 2017-1-16 22:53 https://www.pcbeta.com/static/image/common/back.gif
还是挺矛盾的,虽然用hwp比用ssdtPRGen变频档数多,但是Rehabman说只通过hwp不能完全实现原生电源管理(x86P ...

主要我的机器如果只用ssdt变频,只有turbo的频率和最低的两三个频率,没办法,只好用HWP。

另外,原作者同时开发有命令行工具可以关闭HWP功能。
我的新kext没有记忆其关闭状态(原来的kext也没有这个功能,下次有空我再加上吧),
所以休眠唤醒后还会自动使能HWP(如果plist文件中的参数是使能HWP的话)。
变成休眠唤醒后如果你不想使能HWP,就要再次用那个命令行工具再次关闭HWP。
恰好和原来的唤醒后需要重新使能HWP的做法反过来。&#128516;。

15176580671 发表于 2017-1-17 01:07

廖彬LBW 发表于 2017-1-17 02:32

留个名,好翻记录

dlhonghan 发表于 2017-1-17 09:10

谢谢分享   

zhangqq 发表于 2017-1-17 09:22

另外,原来的kext似乎要放在S/L/E或者L/E中以方便唤醒脚本加载与卸载,
新的kext不再需要这个脚本,所以可以放在clover的目录里面。
还有,原作者的目标系统是10.11(我没有改动),如果在10.12上编译,
且目标系统是10.12的话或者没有安装10.11的SDK,请自行修改编译器的目标。
(有点啰嗦了,见谅。)

hoping 发表于 2017-2-20 23:05

感谢楼主分享,得赶紧测一下,一直在手动卸载、加载 kext

zhangqq 发表于 2017-2-20 23:31

hoping 发表于 2017-2-20 23:05 https://www.pcbeta.com/static/image/common/back.gif
感谢楼主分享,得赶紧测一下,一直在手动卸载、加载 kext

不用谢。还有坛友记得这个贴子呢。我一直用着这个kext,变频很正常,暂时没有发现问题。

qwe123cjl 发表于 2017-2-20 23:32

已经测试 放到clover 睡眠唤醒后依然生效。感谢楼主奉献

hoping 发表于 2017-2-20 23:34

zhangqq 发表于 2017-2-20 23:31 https://www.pcbeta.com/static/image/common/back.gif
不用谢。还有坛友记得这个贴子呢。我一直用着这个kext,变频很正常,暂时没有发现问题。

又抓住夜猫子一只。
我现在要先把brew装的服务那些先卸载了才能测试这个。
要不然还不能确定效果。

zhangqq 发表于 2017-2-20 23:45

qwe123cjl 发表于 2017-2-20 23:32 https://www.pcbeta.com/static/image/common/back.gif
已经测试 放到clover 睡眠唤醒后依然生效。感谢楼主奉献

不客气。呵呵,能小小贡献一下也是很高兴的事情。

qq787152848 发表于 2017-2-21 00:07

谢谢分享      

wwwlhp 发表于 2017-2-21 07:16

hwp只支持6代cpu么

zhangqq 发表于 2017-2-21 08:53

wwwlhp 发表于 2017-2-21 07:16 https://www.pcbeta.com/static/image/common/back.gif
hwp只支持6代cpu么

6以上吧。

yjplayer 发表于 2017-2-25 15:54

不懂编译。。。。。{:5_279:}

sweetfamily2 发表于 2017-2-26 14:55

不知道什么用,还是要感谢楼主
页: [1] 2 3
查看完整版本: 我修改了HWPEnable.kext使之在唤醒时重新使能HWP。