Contribute
Register

Sleeping problems (ASUS Prime Z370-A)

Status
Not open for further replies.
Joined
May 24, 2018
Messages
54
Motherboard
ASUS Prime Z370-A
CPU
i7-8700K
Graphics
RX 580
Mac
  1. MacBook Pro
Mobile Phone
  1. Android
  2. iOS
Hi, I successfully built my first hackintosh :)

Components:
ASUS Prime Z370-A
i7 8700K
Corsair Vengeance 16GB DDR4 3000 CMK16GX4M2C3000C16 (A1-B1 slotted very important!)
ABWB 802.11AC WI-FI With Bluetooth Card 4.0 BCM943602CS (everything works OOB, Bluetooth signal is weak -> bought an extension cable for the antenna)
Samsung 850 EVO 500 GB SSD
2x Samsung UHD 28 (2x DP)

Energy Settings:
Put hard disks to sleep when possible

BIOS:
Load Optimized Defaults : Yes
Intel Virtualizaiton Technology: Enabled
Vt-d: Disabled
IOAPIC 24-119 Entries: Enabled
When system is in sleep, hibernate or soft off states: OFF
AMP Configuration → Everything disabled
Network Stack: Disabled
Legacy USB Support: Auto
OS Type : Other OS
Serial Port: Disabled
CSM: Disabled
XMP: Enabled
Primary Display: dGPU
IGPU Multimonitor: enabled
Pre allocated: 128m
Disabled ASMEDIA USB3.1 controller

KEXTs: (injected with clover)
AppleALC.kext
FakeSMC_ACPISensors.kext
FakeSMC_CPUSensors.kext
FakeSMC_GPUSensors.kext
FakeSMC_LPCSensors.kext
FakeSMC.kext
IntelMausiEthernet.kext
Lilu.kext
USBInjectAll.kext

drivers64UEFI:
ApfsDriverLoader-64.efi
AppleKeyFeeder-64.efi
DataHubDxe-64.efi
SMCHelper-64.efi
AppleImageCodec-64.efi
AppleUITheme-64.efi
FSInject-64.efi
VBoxHfs-64.efi
AppleKeyAggregator-64.efi
AptioMemoryFix-64.efi
FirmwareVolume-64.efi

boot flags:
darkwake=0
disablegfxfirmware

kext patches:
Apple RTC checked
KernelPM checked
com.apple.driver.AppleGraphicsDevicePolicy (for my RX580)

SSDT:
custom usb ssdt

DSDT:
change EC0_ to EC__
change SAT0 to SATA
Halt Enabler
PluginType

Devices:
USB-Inject
USB-Add ClockID
USB-FixOwnership
Audio-7

SMBIOS:
iMac18,3 (during installation I used 18,1)
Trust

Graphics:
Inject Intel
ig-platform-id=0x3E920003
Inject ATI
Framebuffer=Orinoco
(For my RX580 see see this post)


What's working?
All USB ports (excluding 3.1)
Bluetooth
WiFi
Ethernet
RX580 MultiMonitor
Audio
AirDrop
iMessage (generally all iXXX things with generated serial number in SMBIOS)
Power Management Native
Reboot
Shutdown
iStatMenu
Sleep/Wake
Windows dual boot (on separate hard drive)
Airplay
Intel QuickSync
WakeOnLAN (see this post(ASUS Prime Z370-A))

What 's not working?
Apple Watch Unlock sometimes (i guess the bluetooth is weak in my case)
iPhone Network sharing

The initial problem: When the sleep begins (fans are out) the Hackintosh wakes immediately and starts a strange loop that i would describe as a sleep-wake-loop. During the loop my display is awake sometimes but all I can see is black. I have to manually shut down the PC in order to break the loop. Then it boots like nothing happened.


Edit 1:
Fixed the cycle:
Redetermined my usb-ports with a usb3.0 hub (i missed some).
Additionally using darkwake=0.

The new problem: Sleep just wakes immediately and everything works...still cannot go to sleep.

Edit 2:
Found the problem:
My Bluetooth/Wifi card is connected by USB on the motherboard. This connection prevents the sleeping.
I found out that i need a SSDT to declare the port as a bluetooth port.

Edit 3:
I created a SSDT and marked the bluetooth port as internal (255).
I removed the uia_exclude flag.
Then I disabled the port limit patch.

Edit 4:
I discovered that the Hackintosh doesn't go to sleep sometimes if the file sharing option is checked.
I tried to find the reason but I couldnt find any pattern (connected client / no client / multiple clients,...).
I also discovered if any handoff funcionality is used during the sleep transition (sleep to fans out), then sometimes it doesn't go to sleep.
This can be solved by initiating the sleep carefully (no handover, file sharing off).

Edit 5:
I discovered a new problem when initiating the sleep while a download is running. Immidietely before the sleep transition is complete, the Hackintosh reboots because of a kernel trap. The issue here is the IntelMausiEthernet.kext so I don't have a solution for this. But as in "Edit 4", this can be solved by carefully initiating the sleep (no handover, file sharing off, downloads stopped).

Edit 6:
Everything is working so far. Just added Airplay and Intel QuickSync settings.

Edit 7:
Updated my config because i installed a RX580 for a dual monitor setup.

Edit 8:
Clean installed Mojave and sleep was broken again. It woke up randomly.
The fix was to disable proximitywake in macOs. (pmset -a proximitywake 0).
I also disabled everything else in the pmset options.

Edit 9:
Cleaned up my config.plist.
Useless Renames and there is no need to drop tables in my case.
Also the i7-8700k is now fully supported native in Mojave.
 
Last edited:
Hi,

I have a build with the same motherboard, CPU and WI-FI/Bluetooth Card as you. So far I haven't had the the time to create a custom ssdt for USBInjectAll. Could you please share your custom ssdt with me? I would be very grateful if you did.
 
Hi :)

Sure, I can share mine. But depending on the internal usb header you used to connect the card (it's HS10 in my case), you may have to change the SSDT.

I attached the code(dsl), and the binary(aml) in case you have exactly the same setup.
 

Attachments

  • SSDT-UIAC-PRIME-Z370-A.dsl
    3.1 KB · Views: 503
  • SSDT-UIAC-PRIME-Z370-A.aml
    541 bytes · Views: 374
Hi.. congrats on the new set up
I have the same motherboard but I'm using MSI 1070ti.
I've been troubleshooting for nearly a month. I just managed a week ago to install hakintosh 10.13.5, but no luck with the dGPU.
now I keep getting "[IGPU] Graphic failed to load: could not register with Framebuffer driver!".. do you mind sharing the EFi if you have the set up working?
Thanks
 
Hi :)
Your problem is most likely that you don't have native MacOS support for the graphics card like in my case.
I would recommend to do the installation with the iGPU and then switch to the dGPU.
But then you need to change my plist (add the intelgraphicsfixup and check injectintel i think...don't remember exactly) and your bios settings (disable dGPU) during the installation.

I attached my working plist which does not support iGPU and an experimental version which should support it (untested).
 

Attachments

  • config.plist
    7.7 KB · Views: 370
  • experimental_config.plist
    7.7 KB · Views: 314
Thanks a lot for the tip, I just formatted the SSD and starting clean again hoping to avoid the same issue.
I'll use your guid to install 10.13.5 on hakintosh.
 
Hi there. Done same build week ago, I can add some suggestions:
USB:
Remove XHCI-300-series-injector.kext or XHCI-200-series-injector.kext. Last version of USBInjectAll.kext and last versions of High Sierra work native for your chipset now.
also you can remove these patches for same reason:
change XHCI to XHC

change XHC1 to XHC
change HECI to IMEI
change GFX0 to IGPU
change PEGP to GFX0

USBInjectAll.kext https://bitbucket.org/RehabMan/os-x-usb-inject-all/downloads/ + Remove USB port limit in XHCI kext in config.plist from MultiBeast is all you need
Find [HEX] 837D940F 0F839704 0000
Replace [HEX] 837D940F 90909090 9090
Anyway custom usb ssdt is best method.


I highly recommended enable iGPU (aka Intel Quick Sync) but use it only as additional compute power. you notice faster UI, smoother h264/265 video playback and additional compute power in many apps (up to 6x faster encoding of h264)

There is a new actual method directly from developers
- Use only LAST version of IntelGraphicsFixup.kext 1.2.7 https://github.com/lvs1974/IntelGraphicsFixup/releases it autodetects all except device-id.
- Use only LAST version of Lilu kext 1.2.4 https://github.com/acidanthera/Lilu/releases

- Do NOT use Shiki.kext. Shiki.kext no more needed for iGPU compute power acceleration. It needs only if you want to watch DRM protected video in iTunes and Safari.
- Remove all FakePCIID kexts
- For some AMD cards you may need to add WhatEverGreen.kext
https://github.com/acidanthera/WhateverGreen/releases
- For Nvidia NvidiaGraphicsFixup.kext https://github.com/lvs1974/NvidiaGraphicsFixup/releases
- Update to Clover UEFI Boot Mode v2.4k r4586 https://www.tonymacx86.com/resources/clover-uefi-boot-mode-v2-4k-r4586.396/

in Clover Configurator:
[Acpi] remove all those patches GFX0->IGPU, PEGP->GFX0, MEI/HECI->IMEI
[Devices] remove FakeID IntelGFX (set it to 0x0)
[Devices] disable UseIntelHDMI
[Graphics] uncheck Inject Intel
[Graphics] remove ig-platform-id

[Boot] You can add boot arg igfxfw=1 (this will load GuC iGPU microcode and enable it at 100% full speed (up to 1.2GHz). There are reports that it may produce problems and bugs on some systems. It is for experimental use)

Next you need to Inject Intel HD device-id with new "Arbitrary" method to config.plist. Clover Configurator UI is not updated yet to use this method so you need to open config.plist in plist editor or text editor and add this code to Devices area manually.
Note that device-id below is only for Intel HD630 Coffee Lake. For other systems and iGPUs you need use different device-id and more additional patches. can find more info at dedicated forum discussions.

Code:
    </dict>
    <key>Devices</key>
    <dict>
        <key>Arbitrary</key>
        <array>
            <dict>
                <key>Comment</key>
                <string>Inject Intel HD properties</string>
                <key>CustomProperties</key>
                <array>
                    <dict>
                        <key>Key</key>
                        <string>device-id</string>
                        <key>Value</key>
                        <data>
                        ElkAAA==
                        </data>
                    </dict>
                </array>
                <key>PciAddr</key>
                <string>00:02.00</string>
            </dict>
        </array>

This is how it looks in Plist Editor:

Screen Shot 2018-07-12 at 1.10.24 AM.png



Enable iGPU in UEFI BIOS.
Advanced > System Agent(SA) Configuration > IGPU Multi-Monitor : Enabled
Advanced > System Agent(SA) Configuration > DVMT pre-Allocated : 32M
Advanced > System Agent(SA) Configuration > Primary Display : PCIE

To check if iGPU works use VDADecoderChecker utility https://github.com/cylonbrain/VDADecoderCheck/releases . iGPU also visible in Geekbench devices list, Intel Power gadget and in iStat Menu. It will not visible in System Profiler because don't outputs graphics.

Screen Shot 2018-07-12 at 1.15.04 AM.png

Screen Shot 2018-07-12 at 1.45.00 AM.png

Screen Shot 2018-07-12 at 1.56.44 AM.png
 

Attachments

  • 1012VDADecoderChecker.zip.zip
    5.9 KB · Views: 175
Last edited:
Hi, I have nowbie question.
Is it possible to use this motherboard only with iGPU and RAM in dual channel mode?
I have used machine id of iMac 18.1. And with his machine It boots only with RAM in single channel mode. When I configure it to iMac 18.2 or 18.3 I get windows flickering in High Sierra 10.13.6.

EDIT: I have read initial message more carefully and I realised that I have tu put my RAM to other pair of slots. And It works now.
@MacBobs Thank You a lot.
 
Last edited:
Hi there. Done same build week ago, I can add some suggestions:
USB:
Remove XHCI-300-series-injector.kext or XHCI-200-series-injector.kext. Last version of USBInjectAll.kext and last versions of High Sierra work native for your chipset now.
also you can remove these patches for same reason:
change XHCI to XHC

change XHC1 to XHC
change HECI to IMEI
change GFX0 to IGPU
change PEGP to GFX0

USBInjectAll.kext https://bitbucket.org/RehabMan/os-x-usb-inject-all/downloads/ + Remove USB port limit in XHCI kext in config.plist from MultiBeast is all you need
Find [HEX] 837D940F 0F839704 0000
Replace [HEX] 837D940F 90909090 9090
Anyway custom usb ssdt is best method.


I highly recommended enable iGPU (aka Intel Quick Sync) but use it only as additional compute power. you notice faster UI, smoother h264/265 video playback and additional compute power in many apps (up to 6x faster encoding of h264)

There is a new actual method directly from developers
- Use only LAST version of IntelGraphicsFixup.kext 1.2.7 https://github.com/lvs1974/IntelGraphicsFixup/releases it autodetects all except device-id.
- Use only LAST version of Lilu kext 1.2.4 https://github.com/acidanthera/Lilu/releases

- Do NOT use Shiki.kext. Shiki.kext no more needed for iGPU compute power acceleration. It needs only if you want to watch DRM protected video in iTunes and Safari.
- Remove all FakePCIID kexts
- For some AMD cards you may need to add WhatEverGreen.kext
https://github.com/acidanthera/WhateverGreen/releases
- For Nvidia NvidiaGraphicsFixup.kext https://github.com/lvs1974/NvidiaGraphicsFixup/releases
- Update to Clover UEFI Boot Mode v2.4k r4586 https://www.tonymacx86.com/resources/clover-uefi-boot-mode-v2-4k-r4586.396/

in Clover Configurator:
[Acpi] remove all those patches GFX0->IGPU, PEGP->GFX0, MEI/HECI->IMEI
[Devices] remove FakeID IntelGFX (set it to 0x0)
[Devices] disable UseIntelHDMI
[Graphics] uncheck Inject Intel
[Graphics] remove ig-platform-id

[Boot] You can add boot arg igfxfw=1 (this will load GuC iGPU microcode and enable it at 100% full speed (up to 1.2GHz). There are reports that it may produce problems and bugs on some systems. It is for experimental use)

Next you need to Inject Intel HD device-id with new "Arbitrary" method to config.plist. Clover Configurator UI is not updated yet to use this method so you need to open config.plist in plist editor or text editor and add this code to Devices area manually.
Note that device-id below is only for Intel HD630 Coffee Lake. For other systems and iGPUs you need use different device-id and more additional patches. can find more info at dedicated forum discussions.

Code:
    </dict>
    <key>Devices</key>
    <dict>
        <key>Arbitrary</key>
        <array>
            <dict>
                <key>Comment</key>
                <string>Inject Intel HD properties</string>
                <key>CustomProperties</key>
                <array>
                    <dict>
                        <key>Key</key>
                        <string>device-id</string>
                        <key>Value</key>
                        <data>
                        ElkAAA==
                        </data>
                    </dict>
                </array>
                <key>PciAddr</key>
                <string>00:02.00</string>
            </dict>
        </array>

This is how it looks in Plist Editor:

View attachment 340624


Enable iGPU in UEFI BIOS.
Advanced > System Agent(SA) Configuration > IGPU Multi-Monitor : Enabled
Advanced > System Agent(SA) Configuration > DVMT pre-Allocated : 32M
Advanced > System Agent(SA) Configuration > Primary Display : PCIE

To check if iGPU works use VDADecoderChecker utility https://github.com/cylonbrain/VDADecoderCheck/releases . iGPU also visible in Geekbench devices list, Intel Power gadget and in iStat Menu. It will not visible in System Profiler because don't outputs graphics.

View attachment 340626
View attachment 340631
View attachment 340632

Hi,
Do you think this would work for my current heardware config?

MSI Z370i Pro Gaming Carbon
Intel i3-8100
Gigabyte RX 460 4GB

I have it working but using all the old patches. I'd like to try this "new" way of patching but not sure if it's universal or just for this OP's board?
 
Hi, I successfully built my first hackintosh :)

Components:
ASUS Prime Z370-A
i7 8700K
Corsair Vengeance 16GB DDR4 3000 CMK16GX4M2C3000C16 (A1-B1 slotted very important!)
ABWB 802.11AC WI-FI With Bluetooth Card 4.0 BCM943602CS (everything works without doing anything)
Samsung 850 EVO 500 GB SSD
Samsung UHD 28 (DP)

Energy Settings:
Put hard disks to sleep when possible

BIOS:
Load Optimized Defaults : Yes
Intel Virtualizaiton Technology: Enabled
Vt-d: Disabled
IOAPIC 24-119 Entries: Enabled
When system is in sleep, hibernate or soft off states: OFF
AMP Configuration → Everything disabled
Network Stack: Disabled
Legacy USB Support: Auto
OS Type : Other OS
Serial Port: Disabled
CSM: Disabled
XMP: Enabled

KEXTs: (injected with clover)
AppleALC.kext
CodecCommander.kext
FakeSMC_ACPISensors.kext
FakeSMC_CPUSensors.kext
FakeSMC_GPUSensors.kext
FakeSMC_LPCSensors.kext
FakeSMC.kext
IntelMausiEthernet.kext
Lilu.kext
USBInjectAll.kext
XHCI-300-series-injector.kext

boot flags:
-dart=0
darkwake=no

kext patches:
Apple RTC checked
KernelPM checked
AppleAHCIPort
AppleUSBXHCIPCI (disabled)
com.apple.driver.usb.AppleUSBXHCI

SSDT:
custom usb ssdt
generated: PluginType

DSDT: (no idea why)
Rename HDAS to HDEF
change EC0 to EC
change XHCI to XHC
change XHC1 to XHC
change HECI to IMEI
change GFX0 to IGPU
change PEGP to GFX0
Halt Enabler

Devices:
USB-Inject
USB-Add ClockID
USB-FixOwnership
Audio-7 (untested)

SMBIOS:
iMac18,3
Trust
iMessage Settings


What's working?
All USB ports (2.0 +3.0)
Bluetooth (native)
WiFi (native)
Ethernet (IntelMausiEthernet)
dGPU (native)
Audio (should work but untested)
AirDrop (native)
iMessage (generally all iXXX things - SMBIOS settings)
Power Management (native)
Reboot (native)
Shutdown (native)
HWMonitor (FakeSMC + Plugins)
Sleep (custom usb ssdt)
Windows dual boot (on separate hard drive)

What 's not working?
Universal Clipboard (it's buggy anyway)
iGPU (not needed)



The initial problem: When the sleep begins (fans are out) the Hackintosh wakes immediately and starts a strange loop that i would describe as a sleep-wake-loop. During the loop my display is awake sometimes but all I can see is black. I have to manually shut down the PC in order to break the loop. Then it boots like nothing happened.

I would appreciate any input on my configuration, some tips, or maybe the solution to my problem :)
Thanks.

Edit 1:
Fixed the cycle:
Redetermined my usb-ports with a usb3.0 hub (i missed some).
Additionally using darkwake.
Using XHCI-300-series-injector.kext (instead of 200 series).
Updated the config above accordingly.

The new problem: Sleep just wakes immediately and everything works...still cannot go to sleep.


Edit 2:
Found the problem:
My Bluetooth/Wifi card is connected by USB on the motherboard. This connection prevents the sleeping.
I found out that i need a SSDT to declare the port as a bluetooth port.

The new problem: I have no idea how to create a SSDT.

Edit 3:
I created a SSDT and marked the bluetooth port as internal (255).
I removed the uia_exclude flag.
Then I disabled the port limit patch.
Finally i cleaned up my config a little bit (updated the text above accordingly)


Now I have a fully working Hackintosh :)

Edit 4:
I discovered that the Hackintosh doesn't go to sleep sometimes if the file sharing option is checked.
I tried to find the reason but I couldnt find any pattern (connected client / no client / multiple clients,...).
I also discovered if any handoff funcionality is used during the sleep transition (sleep to fans out), then sometimes it doesn't go to sleep.
This can be solved by initiating the sleep carefully (no handover, file sharing off).

Edit 5:
I discovered a new problem when initiating the sleep while a download is running. Immidietely before the sleep transition is complete, the Hackintosh reboots because of a kernel trap. The issue here is the IntelMausiEthernet.kext so I don't have a solution for this. But as in "Edit 4", this can be solved by carefully initiating the sleep (no handover, file sharing off, downloads stopped).
how you made custom SSDT for usbinjectall.kext. I try to make it for my mobo ga -z97x -gaming 5 but I can't find how make it for the moment. If you can help me, I thank you in advance .
 
Status
Not open for further replies.
Back
Top