the-darkvoid/XPS9360-macOS

CPU power / power management differ after sleep ; after sleep NO coil whine

sunrez opened this issue · 2 comments

Setup:

  • Using dark-void files from Dec-2-2019
  • XPS13/9360/i7-8550u/16GB on Mojave 10.14.6 (fresh install)

Observation machine boots up, at 100% idle, there is:

  • Noticeable coil whine
  • Power Gadget shows numbers around 0.74 PKG / 0.09 Core / 0.70 RAM
  • Max CPU frequency seems to vary and avg CPU frequency is around 1 GHz
  • Screenshot : https://imgur.com/a/4ZfUl6n

After invoking sleep from Apple --> Sleep, power LED goes off, waiting ~5 mins and hitting power button:

  • Coil whine is gone IF power numbers change ; not 100% consistent after sleeping
  • Power Gadget shows numbers around 1.05 PKG / 0.09 Core / 0.44 RAM
  • Max CPU frequency is 1.8 GHz, max/avg are < 900 MHz
  • Screenshot : https://imgur.com/a/qE37uE9

Hypothesis:

  • Coil whine is caused by CPU frequency changing rapidly which means the CPU voltage is changing as needed (logically makes sense)
  • When invoking sleep, some ACPI method or operation is triggered which changes the HWP/SpeedShift settings which seem to change how/when the CPU frequency is changing

Somethings I've tried:

  • I've tried untoggling HWP and generate P-states with Clover no real change except for breaking sleep

Left to try:

  • Use Pike's HWP Info kext to capture MSR && HWP settings before/after sleep
  • Peek/poke MSR register and/or use HWP enable kext source to change SpeedShift settings

Have you figured something out? Weird enough, I found that my hackintosh has get higher geekbench scores after sleep.

截屏2020-03-2413.01.10.png

I switched over to using the-Quert's repository for XPS13 since he has USB-C fixes for HDMI audio that seem to work for me.

That said, I did a bit more debugging and dumped the MSR information between no coil whine case and with coil whine.

More info here: theQuert/XPS-9360-macOS#25