Welcome to AMD OS X

Why not register now to gain full access.

Help with AMD OS X after installation.
#51092
Hi there,

A bit of a Hackintosh noob here, getting up to speed with everything. Have found the community to be a wonderful help in setting my first Hackintosh up, so thanks to everyone so far! :D

Hit a bit of a brick wall with a relatively minor issue, but nevertheless one I'd like to clear up. I have followed the guide at https://kb.hackintoshisfun.ml/clover/ to get a working system. It's very stable, and have been pleasantly surprised how well it functions. As I downloaded build 17G66 (which seems to be a bit of an anomaly), I followed the guide here (https://www.tonymacx86.com/threads/inst ... ld.269228/, bottom post of that page) to install the Nvidia web drivers -- these work fine with GPU acceleration.

Sleep didn't work either, but I fixed it with the solution posted here -- viewtopic.php?f=39&t=2875&start=10.

My issue is with kernel_task. For 9 in 10 boot ups, the "process" sits in Activity Monitor with ~68%-~71% CPU "usage" with a crazy high number of "Idle wake ups" (~117,000). I'm pretty stumped at how to address this with my limited knowledge, and am wondering if someone has some insight into what I could need to do.

What I have found: for 1 in 10 boot ups, it works fine, CPU usage is minimal for kernel_task in this scenario. But when I reboot, the problem returns. I also noticed that when I got sleep to work (following the post I linked above), the problem disappears when I wake the computer up (CPU usage drops to 1-2% idling, and the idle wake ups drops to a reasonable number). I can replicate this behaviour 100% of the times I have attempted to do it.

It's obvious something is going crazy -- my hunch is something in the ACPI settings is a bit out of whack. When I disable Nvidia drivers, it still does it. I've attached a screenshot of Activity monitor, along with a link to my current config.plist. Below are also my UEFI drivers and KEXTS that I have currently.

Any pointers (even telling me how to see a log file that may give me a clue as to what is going on!) or suggestions for settings I can tweak/additional KEXTS that might help would be very much appreciated. Let me know if you need any more information, too. :thumbup:

Thanks in advance! 8-)

Link to config.plist: https://pastebin.com/wHAEMjCZ

Current UEFI drivers:
Code: Select all
ApfsDriverLoader.efi, EmuVariableUefi-64.efi, HFSPlus.efi, OsxAptioFixDrv-64.efi
Current KEXTS:
Code: Select all
Lilu.kext, NullCPUPowerManagement.kext, RealtekRTL8111.kext, VirtualSMC.kext, VoodooHDA.kext, WhateverGreen.kext
Image
Post Merged
As an update, I switched over to FakeSMC.kext, and installed a number of additional kexts as outlined here -- https://hackintosher.com/forums/thread/ ... ctions.78/.

Had a thought that maybe the kernel_task process would have high CPU usage because it didn't know temperatures or anything (throttling?). Although I got my CPU/GPU/ambient temps and fan speeds to show up, it doesn't unfortunately solve the problem.

Wondering out loud if it's something to do with the SMC emulator. Most posts online for folk with high CPU usage on kernel_task with a real Mac fixed it by resetting their SMC. Surely it's something in the SMC config. But I don't know what it could be. Any pointers/ideas would be very much appreciated. Thanks.
Post Merged
A further update! I dug out my old university books about debugging. Found a tool that shows what's going on inside the Mach kernel over a given sample time. Leaving the program to gather data for one minute when the problem exists and when it doesn't (after sleep), I found a large series of calls coming from the AppleAHCIPort kext when the problem exists, and none when it doesn't. Bingo!

My question now: what am I missing in my setup for the AHCI configuration? In System Information, the app reports it as a Generic AHCI Controller. Maybe there is a setting, patch or kext that is required for my AHCI controller to work properly? I will keep digging.
Post Merged
FYI if it interests anyone, here is the output from the kernel tracer when the CPU usage problem exists:
Code: Select all
Module               | Method                                                                                                                                                                           |  Calls |      Share
---------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+-----------
kernel               | machine_idle+0x1e0                                                                                                                                                               | 653934 |  91.6471 %
kernel               | 0xffffff8000287170+0x37f                                                                                                                                                         |  17901 |   2.5088 %
AppleAHCIPort        | AppleAHCIPort::HandleInterruptRequest()+0xe8                                                                                                                                     |  11275 |   1.5802 %
AppleAHCIPort        | AppleAHCIPort::HandleInterruptRequest()+0x116                                                                                                                                    |   5434 |   0.7616 %
AppleAHCIPort        | AppleAHCIPort::HandleInterruptRequest()+0x21f                                                                                                                                    |   5034 |   0.7055 %
AppleAHCIPort        | AppleAHCIPort::HandleInterruptRequest()+0xf3                                                                                                                                     |   4245 |   0.5949 %
AppleAHCIPort        | AppleAHCIPort::HandleInterruptRequest()+0x141                                                                                                                                    |   3319 |   0.4651 %
AppleAHCIPort        | AppleAHCIPort::HandleInterruptRequest()+0xfd                                                                                                                                     |   2025 |   0.2838 %
kernel               | lck_mtx_unlock+0x47                                                                                                                                                              |   1444 |   0.2024 %
kernel               | IOWorkLoop::threadMain()+0xd7                                                                                                                                                    |   1402 |   0.1965 %
AppleAHCIPort        | AppleAHCIPort::HandleInterruptRequest()+0x32                                                                                                                                     |   1043 |   0.1462 %
When the problem goes away (random boots, or always after resuming from sleep):
Code: Select all
Module                     | Method                                                                                                                                                                                           |  Calls |      Share
---------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------+-----------
kernel                     | machine_idle+0x1e0                                                                                                                                                                               | 701946 |  99.0797 %
kernel                     | dtrace_unregister+0x94                                                                                                                                                                           |   1388 |   0.1959 %
kernel                     | 0xffffff8000287170+0x37f                                                                                                                                                                         |    454 |   0.0641 %
kernel                     | user_trap+0xa0                                                                                                                                                                                   |    253 |   0.0357 %
kernel                     | hndl_unix_scall64+0xa                                                                                                                                                                            |    133 |   0.0188 %
kernel                     | hndl_mach_scall64+0xa                                                                                                                                                                            |    110 |   0.0155 %
kernel                     | __bzero+0xb                                                                                                                                                                                      |     89 |   0.0126 %
kernel                     | 0xffffff800046aa60+0x1c5                                                                                                                                                                         |     84 |   0.0119 %
NVDAResmanWeb              | osWriteRegistryDword+0xde                                                                                                                                                                        |     83 |   0.0117 %
kernel                     | waitq_wakeup64_thread+0xa5                                                                                                                                                                       |     69 |   0.0097 %
Note the lack of AppleAHCIPort in the top 10. That has to be the problem. Still digging.
Post Merged
Anyone got any ideas as to how I can go about fixing this? (@Shaneee, can you help a fellow Scot out?) I think I've exhausted everything I can find online... can't seem to find anyone with this exact issue. Tried different kexts, different EFI drivers, everything... nothing fixes it. Would appreciate any rough ideas or thoughts that I could explore. This is the last thing, then my system is 100% perfect for my needs!

Again, when I run the snooper, it always shows the AppleAHCIPort kext as going crazy. No idea why as the system appears to be super stable with and without this issue present.

Thanks.

 Advertising

#51111
In Activity Monitor, select the kernel_task and click on the Information button then select the Open Files and Ports tab and share what's there.
#51112
Thank you for getting back to me, Shaneee. I really appreciate it.

Unfortunately the information button is greyed out for the kernel_task entry. Can't click it. Can click it on other processes, mind, but not kernel_task.

I can however double click it -- three screenshots linked below show the results.

Activity Monitor showing high CPU usage: https://i.ibb.co/yBwDBw5/activity-monitor.png
Memory view: https://ibb.co/kBXR8FJ
Statistics view: https://i.ibb.co/BwVQkRV/stats.png

No open files/ports tab available for kernel_task.

Used OSXKernelTracer (https://github.com/nickbruun/osxkerneltracer) to get a deeper insight into what's going on.
Here is the output from that program -- with one file for when the problem exists, and one when it doesn't (after resuming from sleep): https://gofile.io/?c=X4WFp9

Cheers!
#51115
So it's just completely random on when it happens? Try replacing OsxAptioFixDrv-64.efi with AptioMemoryFix-64.efi. I've attached it below.
You do not have the required permissions to view the files attached to this post.
#51119
Yes, it's seemingly random. Sometimes it boots, it doesn't happen. Other times I boot, it does. Every time I just hit enter at the Clover boot screen -- I don't do anything different.
Would say the problem is more likely to happen than not. However when I sleep and then resume, it always resolves if it was happening before sleeping.

I tried replacing OsxAptioFixDrv-64.efi with AptioMemoryFix-64.efi as per your suggestion. Unfortunately, the problem reoccured in the first boot after replacing it. Rebooting a couple of times afterwards yielded the same behaviour. Once again, a sleep/resume cycle clears the problem each time. Examining calls to the kernel again reveals a huge number of calls from/to the AppleAHCIPort kext.

FWIW, I also tried replacing OsxAptioFixDrv-64.efi with OsxAptioFix2Drv-64.efi and OsxAptioFix3Drv-64.efi. With these replacements, the system just panics when they are being loaded. At least with your suggestion it boots, but the problem does not unfortunately go away.

Do you have any other suggestions? I appreciate your time.
#51121
Try rebuilding the kernel cache with this command in Terminal,
Code: Select all
sudo kextcache -i / && sudo kextcache -u /
#51127
Hi Shaneee,

Tried to rebuild the kernel cache and rebooted. Unfortunately that didn't work -- same ~70% CPU usage by kernel_task. :?

Have noticed something is a little bit weird with USB - don't know if this would have anything to do with it.
When resuming from sleep, I had a USB disk inserted, but it ejected it and the USB keyboard and mouse started to behave strangely.
Now when there is a USB disk inserted on startup, no USB devices function until the disk is removed, then everything works normally.
Don't know if that can account for the AppleAHCIPort issue.

Cheers.
#51130
It might be USB related. Give this a try, https://amd-osx.com/forum/viewtopic.php?t=4986
#51132
Thanks, Shaneee.

Followed the instructions you linked to (did the manual option as the automatic patcher did not work). Tried the three DSDT USB patches available (standard, standard 2, old) and each time boot failed with XHCI stalling messages, doesn't look like a panic but didn't progress from there either.

When I reverted, everything booted fine but the issue of high CPU is still there. Plus the problem with USB. Seems like when a particular USB drive is plugged in on boot (not the macOS installer drive I made, just a random one) no USB devices work until I unplug the drive. Then everything works. But the CPU issue is still present. Shame. :crazy:
Post Merged
Might consider doing a fresh install following the vanilla instructions again, starting from scratch. Don't know what else I can really try now. Unless I've made a mistake elsewhere.
Post Merged
Managed to apply the USB Ryzen patch, the ports now show up as AppleUSB20XHCIPort (or 30XHCIPort) devices in IOReg. Assume that it applied it correctly.

CPU usage still an issue though. Have linked to a dump of the IOReg output in case anyone has some ideas. Thanks.

https://gofile.io/?c=lPCuS5
Post Merged
It was the connected DVD drive. When the problem occurred, the DVD drive did not appear in System Information. When the computer resumed from sleep, or started without the issue, the DVD drive was present. So I guess something is not 100% happy with the optical drive I am using. Might just unplug it, unless anybody has heard of anything like this before.

The 9, 10 and 20 series cards are not supported […]

Screen Shot 2019-09-19 at 6.28.48 PM.png Specs:[…]

nvidia gpu laggy

I use this driver on my GTX 1070: https://images.n[…]

Install the nvidia web driver for 10.13.6 here: ht[…]