Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help debug coil whine #25

Open
sunrez opened this issue May 24, 2020 · 7 comments
Open

Help debug coil whine #25

sunrez opened this issue May 24, 2020 · 7 comments

Comments

@sunrez
Copy link

sunrez commented May 24, 2020

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 (the-darkvoid/XPS9360-macOS#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
Copy link
Author

sunrez commented May 25, 2020

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

@ghost
Copy link

ghost commented May 25, 2020

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

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

@sunrez
Copy link
Author

sunrez commented May 25, 2020

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
Copy link
Author

sunrez commented May 25, 2020

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.

@profzei
Copy link

profzei commented Jun 5, 2020

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!

@AutinMitra
Copy link

AutinMitra commented Jun 17, 2020

@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

@ghost
Copy link

ghost commented Jun 21, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants