gnodipac886 / MatebookXPro-hackintosh

Hackintosh Solution for the Huawei Matebook X Pro
https://www.tonymacx86.com/threads/guide-matebook-x-pro-2018-using-hotpatch-vituralsmc-10-14-x.278730/
257 stars 57 forks source link

Cooling fan does not come on even when CPU is stressed / loaded in Cinebench. #84

Closed Chatbox1024 closed 4 years ago

Chatbox1024 commented 4 years ago

First of all: Absolutely fantastic work! My Matebook X Pro (2018 i7) is running Catalina 10.15.3 really smoothly. Thank you so much! I love your work, and really appreciate it!

Bug details: "MatebookXPro-hackintosh" Release: 1.1.20.2 Hardware: Matebook X Pro 2018 i7 (with KXG50ZNV512G TOSHIBA m.2 SSD), boot with external USB SSD.

Issue: The cooling fan doesn't seem to come on even when I was trying to stress test the CPU in Cinebench. As such, the CPU performance is lower than expected when it is under load.

Chatbox1024 commented 4 years ago

p.s. By the way, where was AppleALC-m8 v1.4.5 compiled from? It seems to be different than the AppleALC v1.4.5 release.

kvn1351 commented 4 years ago

p.s. By the way, where was AppleALC-m8 v1.4.5 compiled from? It seems to be different than the AppleALC v1.4.5 release.

It's not 1.4.5. And since 1.4.4 the patches made for our Matebook have been added to the main repo. So there's no more need for the m8 version. Just get the latest AppleALC and you're good to go.

Chatbox1024 commented 4 years ago

p.s. By the way, where was AppleALC-m8 v1.4.5 compiled from? It seems to be different than the AppleALC v1.4.5 release.

It's not 1.4.5. And since 1.4.4 the patches made for our Matebook have been added to the main repo. So there's no more need for the m8 version. Just get the latest AppleALC and you're good to go.

Thank you!! I'll do that for AppleALC.

Chatbox1024 commented 4 years ago

I got Intel Power Gadget installed. It looks like the laptop is CPU throttling even at 60c...and so that's why the fan doesn't even need to come on.

I wonder where this 60c temperature ceiling is set / specified / configured.

(This is also confirmed when I run LINPACK, only getting about 83GFLOPS. Typically it can reach 115GFLOPS in Windows).

Chatbox1024 commented 4 years ago

Found out what the issue was (mostly me, user error):

  1. I had to generate the CPUFriendDataProvider.kext as documented in this repo.
  2. Using the voltageshift from here: https://github.com/buliaoyin/VoltageShift
  3. Set the undervolt: ./voltageshift offset -90 -60 -90
  4. Set the powerlimit: ./voltageshift powerlimit 25 64 44 2
  5. Set the MSR_TURBO_RATIO_LIMIT to the following: ./voltageshift write 0x1AD 0x28282828

MSR_TURBO_RATIO_LIMIT............(0x1AD) : 0x28282828

This then gives me a peak of 131 GFLOPS in LINPACK (for a problem size of 20,000). This pretty much aligns well with the result of 135 GFLOPS under Windows.

Screen Shot 2020-03-15 at 1 57 59 AM

And of course, after that, the fan would come on once the processor gets hot enough.

jonescamilla commented 4 years ago

Chatbox1024 What are you referring to when you list " 1. I had to generate the CPUFriendDataProvider.kext as documented in this repo." I'm lost when it comes to this.

Chatbox1024 commented 4 years ago

Under here: https://github.com/gnodipac886/MatebookXPro-hackintosh#412019-10144--new-power-management-kexts

Run the "sh...." command from the terminal. It'll download CPUFriend, as well as creating the CPUFriendDataProvider.kext specific to your processor. The script will ask you what low/idle frequency would you like the CPU to run at (when it's idle, I picked 800MHz), as well as the performance preference (I picked balanced performance).

Save the two kexts to your CLOVER's kext folder (and overwrite the old/existing ones)

jonescamilla commented 4 years ago

At what temperature does your fan tend to kick in?

Chatbox1024 commented 4 years ago

Around 68-70c.

jonescamilla commented 4 years ago

That's kind of late no?

Chatbox1024 commented 4 years ago

For ultrabook design...no.

Alternatively, you decide.

Chatbox1024 commented 4 years ago

This is probably the final update for this power management matter.

The following is a screenshot of the Cinebench R20 benchmark, and LINPACK (problem size 20,00) showing the thermal-performance stability over 18 tests (around 20 minutes, full load). On battery only. Stabilizing at around 133.5 GFLOPS.

Screen Shot 2020-03-18 at 5 19 12 PM

jonescamilla commented 4 years ago

Impressive numbers. My last test in Cinebench only got as high as ~1000. I've got a ways to go.

PLTorrent commented 4 years ago

I got Matebook X Pro (MACH-W19) i5-8250U, Intel 620 iGPU, no dGPU, 8GB RAM + 256GB Liteon SSD.

I also saw a 60deg cap on my system. Used only this:

Set the powerlimit: ./voltageshift powerlimit 25 64 44 2

and I got the same result as in Windows 10.

Screenshot 2020-05-01 at 01 05 01

Thanks a lot for this tip. Curious thing though is that my CPU reports 15W TDP during test, not 25W.

EDIT: I tried undervolting. I used suggested ./voltageshift offset -90 -60 -90 and got to over 1,3k :D

Screenshot 2020-05-01 at 09 12 12

Next I tried -120 -60 -120 and seems like I got over 1,4k...

Screenshot 2020-05-01 at 09 22 32

and linpack:

Screenshot 2020-05-01 at 09 41 05
mircoianese commented 4 years ago

Under here: https://github.com/gnodipac886/MatebookXPro-hackintosh#412019-10144--new-power-management-kexts

Run the "sh...." command from the terminal. It'll download CPUFriend, as well as creating the CPUFriendDataProvider.kext specific to your processor. The script will ask you what low/idle frequency would you like the CPU to run at (when it's idle, I picked 800MHz), as well as the performance preference (I picked balanced performance).

Save the two kexts to your CLOVER's kext folder (and overwrite the old/existing ones)

Hello! I've done this but still getting around 70GFlops in linpack, so something must be wrong (i7 2018 MBX). CPU does not go above 60°C, so some throttling is going on here... The fan also does not kick in full-speed.

Any advice? Thanks

Edit: here's a screenshot where you see CPU during testing going above 15W for about 5 seconds and then dropping as soon as it reaches 60 degrees.

scree
PLTorrent commented 4 years ago

Any advice? Thanks

@mircoianese In my case CPUFriend did not help. What allowed me to get over the limit was this particular version of voltageshift that is mentioned in this thread. You will have to compile it yourself from github repo (the links leading to pre-built one lead to a different version, and not working anyway due to some reason) using Xcode. Just get rid of signatures and build it for local usage.

Set the powerlimit: ./voltageshift powerlimit 25 64 44 2

After this you should see improvement. Then you can try undervolting for better performance/battery life.