XPS-9360-macOS icon indicating copy to clipboard operation
XPS-9360-macOS copied to clipboard

Help debug coil whine

Open sunrez opened this issue 4 years ago • 7 comments

Hi Quert,

First thanks for your hard work! I tried out your latest repo and things like HDMI audio (via USB-C adapter) work well (thanks for your suggestion on the other thread).

However, I am still facing a coil whine issue as I detailed in this post (https://github.com/the-darkvoid/XPS9360-macOS/issues/151) ; the coil whine issue is unfortunately still present when using your latest repo.

Is this something I can work with you on to debug? This seems like the last outstanding major issue.

For some reason (when using the EFI repo from DarkVoid, Dec-2-2019) after click on the Apple, choosing sleep, waiting for power LED to go off, then tapping on touchpad, coilwhine goes away and power profile changes (biggest difference is DRAM power goes from 0.7x W to 0.45W). In this state the coil whine issue is non-existant and the laptop works beautifully. It's not 100% consistent (going to sleep, waking up with no coil whine) but when the change occurs, it stays until something like connecting HDMI via USB-C and then disconnect it.

My theory is some ACPI fix is applied during sleep or after that changes the HWP or power management settings. Changing out CPUFriend doesn't seem to make a noticeable difference. I can post the EFI repo to help debug.

I have lots of experience with firmware and low-level SW but haven't really debugged ACPI or MacOS stuff, but if I can help, let me know.

sunrez avatar May 24 '20 12:05 sunrez

I used Piker's AppleIntelInfo v2.9 to dump the MSR information before and after the situation where this is and isn't coil whine.

Coil whine : https://pastebin.com/m0RykYq5 No coil whine: https://pastebin.com/z2SrAfTc

If I do I diff these are the differences:

https://pastebin.com/Rkwu2DL2

Based on the differences, I will try to peek/poke these registers to see which one makes the difference

sunrez avatar May 25 '20 01:05 sunrez

Thanks for testing, more improvements would be updated in few days.

  • Feel free to report any issues, and maybe I will do it tomorrow.

the-Quert avatar May 25 '20 13:05 the-Quert

Hi. If you see any SSDT related operations in darkvoid's EFI that might be an influence (especially when waking up from sleep), let me know. It will take a me a few days to modify code to write to the registers.

sunrez avatar May 25 '20 20:05 sunrez

I tried playing with the binary to read/write the MSR reg (offset 774) :https://github.com/headkaze/HWPEnable/tree/master/binary .

While I found a difference between sleep and no sleep values, if I used wr_req and put the value I heard before sleeping, the whine did NOT come back. So the register responsible must be elsewhere. Will try to create a variant of this binary so I can read/write arbitrary offsets and try one by one based on the diff.

sunrez avatar May 25 '20 22:05 sunrez

Hi @sunrez! I can report the same type of issue (i.e. an increased power consumption after sleep) on my machine, a Huawei Matebook X Pro (2018) with i7-8550U and Intel(R) UHD620. My machine has HWP enabled via CLOVER. In Bios Speed Shift is enabled (default). Have you made any progress? If you need a "similar machine" to test your hypothesis I'm happy to contribute!

profzei avatar Jun 05 '20 16:06 profzei

@sunrez disabling turbo boost in macOS seems to get rid of a ton of coil whine for me (on the 7560u model), but for some reason I have to do it via VoltageShift because macOS does not respect my bios disable.

I've gone through one replacement already, and I've still noticed pretty load coil whine during video playback. Do any of you have coil whine when typing in quicklook or scrolling through videos or IDEs? I'm trying to see whether if the coil whine can be improved by another config, or if I need to do another RMA

AutinMitra avatar Jun 17 '20 04:06 AutinMitra

OpenCore is just modified and updated. Try OpenCore as bootloader, cause more detailed power management is just configured with DSDT in OC.

  • Feel free to report any issues, and maybe I will do it tomorrow.

the-Quert avatar Jun 21 '20 13:06 the-Quert