Jump to content
cat2devnull

Guide: ASUS TUF Z390M-Pro Gaming, i9-9900k, UHD 630

4 posts in this topic

Recommended Posts

Introduction:
So this build has been very challenging as the Z390 platform is fairly new. I struggled for some days trying to get USB, power management and onboard graphics working. You need to do a bit of work customising your own plist and SSDT but if you do, your rig will not disappoint.

The guide below should work for any of the ASUS Z390 boards but may require some minor SSDT changes to configure your USB ports but it’s not that hard to do as long as you are willing to read the motherboard manual and do some very basic text file editing.

Hardware:

 

Working:

  • Onboard USB, audio, ethernet, graphics
  • Wifi and BT via the PCI-e adapter
  • Reboot, shutdown, hibernate, sleep/wake
  • iCloud, iMessage, FaceTime, Time Machine
  • GPU Hardware acceleration
  • RAM XMP (3200MHz)

 

Not Working:

  • USB: I’ve disabled two of the rear USB ports to keep under the 15 port limit. I tried the USB port limit patch but had no luck getting it working. Also the general consensus is that using >15 USB ports is a bad idea and can cause unexpected crashes/data-corruption.
  • iTunes Streaming (I have not investigated this as I don’t use iTunes).
  • Clover auto boot from OS partition (this has me stumped at the moment).
  • Onboard HDMI port during installation (used DP instead).

 

Not Investigated (yet):

  • USB 3.1 Gen 2 and USB-C (I don’t have any such devices)
  • Overclocking or exceeding the 95W TDP of the i9900k
  • Upgrade to Mojave 10.14.3

Install Procedure:
This install guide should work with any version of 10.14 but I have only tried 10.14.2 since that was the current version at the time I started this process.

BIOS settings (v2.20.1271):

  1. Advanced\System Agent (SA) Configuration\VT-d - Disabled
  2. Advanced\System Agent (SA) Configuration\Above 4G - Decoding Enabled
  3. Advanced\USB Configuration\Legacy USB Support - Disabled
  4. Advanced\USB Configuration\XHCI Hand-off - Disabled

 

What you will need:

This Guide is based on the amazing /r/Hackintosh Vanilla Desktop Guide and follows it with some critical additions that will fix USB, sleep/reboot/hibernate and a few other issues. It is expected that you have a basic understanding of Mac OSX, Clover, Clover Configurator and command line tools such as text editors. If not, give the below a go, and just Google when you get stuck

Follow the /r/Hackintosh Vanilla Desktop Guide to do the following;

  1. Gather all your kexts as listed above. They can be downloaded and placed in /EFI/CLOVER/kexts/other/ by hand or most can be installed automatically by Clover configurator via the Kexts Installer menu.
  2. Build your USB installer.
  3. Perform your Clover setup.
  4. Update your config.plist file to include all the Coffee Lake specific configuration.
    Here are some specific alterations to the vanilla build that were required;
    1. Acpi
      1. I added a few extra patches which were used for USB testing and are probably not required once setup. All of which can be installed from the List Of Patches pulldown.
        -> change EHC1 to EH01
        -> change EHC2 to EH02
        -> change _OSI to XOSI
    2. Boot
      1. You should be able to remove the verbose (-v) option as hopefully it will not be required.
      2. Added slide=0 to fix various boot issues. Unfortunately I don’t remember exactly what those errors were or which forum post helped me identify the issue.
      3. Added darkwake=10 to fix issues with power nap.
    3. Kernel and Kext Patches
      1. I disabled the USB port limit patches because the didn’t work and can cause stability issues if left enabled. See the USB section below for more details.
    4. SMBIOS
      1. Set the Product Name to Macmini8,1
        I found that since the Macmini8,1 is based on Coffee Lake and uses the Intel UHD 630 onboard graphics seemed to work better than when set to iMac18,1 which caused random graphical glitches.
      2. You shouldn’t need to use macserial to generate the Serial Number or board number, just hit this Generate New button and let Clover Configurator sort it for you. You will still need to verify that the serial number is safe to use with Check Coverage button.

 

USB:
By now you should have a bootable USB drive with a near working configuration. The last remaining issue is getting USB working. This is the step that most people get stuck. There are a few issues with USB on Hackintosh that cause problems;

  1. You are limited to 15 USB ports. Now this might sound like lots but each physical port usesone port if it is USB 2.0 but if it supports USB 3.1 then it counts as two ports (both a USB 2.0 and USB 3.1 in the one physical port). There are various patches out there which remove this limit but even if you can get them to work, they will probably break when you upgrade and can cause system instability. OSX has a fixed size memory array to store this data and if you have more than 15 ports it can overwrite other critical memory.
  2. All 300 series motherboards (in our case the Z390) have way more than 15 USB ports.
  3. If you don’t bother fixing this issue then on the 300 series boards you will most likely enumerate 15 USB 2.0 ports before the system ever gets a chance to find the USB 3.1 ports. As such all your USB ports will be locked to USB 2.0. This means if you install off a USB 3.x drive, it will fail part way through the install when the ports get locked to USB 2.0 and the drive can no longer be seen.

So in order to fix this problem you have to build your own SSDT file to tell the system which ports to enable, where they are on the XHC bus and what version of USB they support. I used the guide from RehabMan (Creating a Custom SSDT for USBInjectAll.kext) to build mine.

Now the catch will be that you probably need to boot into OSX in order to be able to map the USB port locations to create the SSDT file. If you need to do this, you must install from a USB 2.0 drive as discussed above.

The other option is just try and guess the location of each port. I mapped them all out and then realised that ASUS actually named each port sensibly so I could have just worked it out if I bothered to read the manual and look at the motherboard layout diagram.

So for the ASSUS ASUS TUF Z390M-Pro Gaming the port layout looks like this;

  • Intel® Z390 Chipset : 2 x USB 3.1 Gen 2 port(s) (1 at back panel, teal blue, Type-A, 1 at mid-board)
  • Intel® Z390 Chipset : 7 x USB 3.1 Gen 1 port(s) (4 at back panel, blue, Type-A, 1 x Type-C, 2 at mid-board)
  • Intel® Z390 Chipset : 4 x USB 2.0/1.1 port(s) (4 at mid-board)

 

 

Location/Type BIOS & Motherboard Manual Description XHC High Speed Identifier XHC Super Speed Identifier
Back Panel above HDMI upper port Blue Type-A U31G1_5 HS05 SS05
Back Panel above HDMI lower port Blue Type-A U31G1_6 HS06 SS06
Back Panel USB 3.1 Gen 2 Teal Type-A U31G2_1 HS01 SS01
Back Panel USB 3.1 Type-C U31G1_C2 HS02^ SS02^
Back Panel below ethernet upper port Blue Type-A U31G1_7 HS07 SS07
Back Panel below ethernet lower port Blue Type-A U31G1_8 HS08 SS08
Onboard Connector USB 2.0 Left Header USB11 & USB12 HS11 & HS12 N/A
Onboard Connector USB 2.0 Right Header USB3 & USB4 HS03 & HS04 N/A
Onboard Connector USB 3.1 Header U31G1_9 & U31G1_10 HS09 & HS10 SS09 & SS10
Onboard USB 3.1 Gen2 Header U31G2_C3 HS13^ SSxx^


^Unable to confirm as do not have any device to test on these ports.

The motherboard manual and BIOS names for each port map perfectly to the XHC name so if this holds true for other ASUS 300 series motherboards (which it appears from my research that they do) then you probably can just build the .dsl file by hand.

Building your own custom SSDT file as per Creating a Custom SSDT for USBInjectAll.kext;

  1. Start by grabbing SSDT-UIAC-ALL.dsl from RehabMan’s OS-X-USB-Inject-All repository.
  2. Delete all sections of the XHC configuration that do not match your XHC device-id. In this case the Z390 chipset is “8086_a36d”. You can confirm this with IORegistryExplorer. Look for /Root/Macmini8,1/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/XHC@14 then it should be listed as IOName.
  3. Now decide which ports you want to enable and which you want disabled remembering that you can only have a maximum of 15. In my case I disabled all the USB 2.0 internal ports except for one which is connected to the Broadcom BCM943602CS for BlueTooth. I also disabled a few of the USB 3.1 ports that I don’t need.
    Just comment out the ports you don’t need so that if in future you want to make changes it is easy.
  4. Check that the USB Connector values are correct. USB2=0, USB3=3, internal=255
  5. Now compile the SSDT-UIAC-ALL.dsl to SSDT-UIAC.aml
    In MaciASLFile: Save As, format: ACPI Machine Language Binary and place it in /EFI/ACPI/patched. USBInjectAll.kext will now enable only the USB ports you have configured.

 

My file looks like the following;

// SSDT-UIAC.dsl
//
// This SSDT can be used as a template to build your own customization
// for USBInjectAll.kext for the ASUS TUF Z390M-Pro Gaming motherboard.
// It would be very easy to modify this file for any ASUS Z390 motherboard.
//
// Ports have comments on each to help identify their location.
// You can disable ports by commenting out their configuration.
// To avoid errors, this file is best edited in MaciASL.
//
// Note: UsbConnector: USB2 = 0, USB3 = 3, internal = 255

DefinitionBlock ("", "SSDT", 2, "hack", "_UIAC", 0)
{
    Device(UIAC)
    {
        Name(_HID, "UIA00000")

        Name(RMCF, Package()
        {
            "8086_a36d", Package()
            {
                "port-count", Buffer() { 26, 0, 0, 0 },
                "ports", Package()
                {
//                    "HS01", Package()  // U31G2_1 - Back Panel USB 3.1 Gen 2 Blue Type-A
//                    {
//                        "UsbConnector", 3,
//                        "port", Buffer() { 1, 0, 0, 0 },
//                    },
//                    "HS02", Package()  // U31G1_C2 - Back Panel USB 3.1 Type-C
//                    {
//                        "UsbConnector", 3,
//                        "port", Buffer() { 2, 0, 0, 0 },
//                    },
//                    "HS03", Package()  // USB3 - Onboard Connector USB 2.0 Right Header
//                    {
//                        "UsbConnector", 0,
//                        "port", Buffer() { 3, 0, 0, 0 },
//                    },
                    "HS04", Package()  // USB4 - Onboard Connector USB 2.0 Right Header
                    {
                        "UsbConnector", 0,
                        "port", Buffer() { 4, 0, 0, 0 },
                    },
                    "HS05", Package()  // U31G1_5 - Back Panel above HDMI upper port Blue Type-A
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 5, 0, 0, 0 },
                    },
                    "HS06", Package()  // U31G1_6 - Back Panel above HDMI lower port Blue Type-A
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 6, 0, 0, 0 },
                    },
                    "HS07", Package()  // U31G1_7 - Back Panel below ethernet upper port Blue Type-A
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 7, 0, 0, 0 },
                    },
                    "HS08", Package()  // U31G1_8 - Back Panel below ethernet lower port Blue Type-A
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 8, 0, 0, 0 },
                    },
                    "HS09", Package()  // U31G1_9 - Onboard Connector USB 3.1 Header
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 9, 0, 0, 0 },
                    },
                    "HS10", Package()  // U31G1_10 - Onboard Connector USB 3.1 Header
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 10, 0, 0, 0 },
                    },
//                    "HS11", Package()  // USB11 - Onboard Connector USB 2.0 Left Header
//                    {
//                        "UsbConnector", 0,
//                        "port", Buffer() { 11, 0, 0, 0 },
//                    },
//                    "HS12", Package()  // USB12 - Onboard Connector USB 2.0 Left Header
//                    {
//                        "UsbConnector", 0,
//                        "port", Buffer() { 12, 0, 0, 0 },
//                    },
//                    "HS13", Package()  // Unknown
//                    {
//                        "UsbConnector", 3,
//                        "port", Buffer() { 13, 0, 0, 0 },
//                    },
//                    "HS14", Package()  // Unknown
//                    {
//                        "UsbConnector", 3,
//                        "port", Buffer() { 14, 0, 0, 0 },
//                    },
//                    "SS01", Package()  // U31G2_1 - Back Panel USB 3.1 Gen 2 Teal Type-A
//                    {
//                        "UsbConnector", 3,
//                        "port", Buffer() { 17, 0, 0, 0 },
//                    },
//                    "SS02", Package()  // U31G1_C2 - Back Panel USB 3.1 Type-C
//                    {
//                        "UsbConnector", 3,
//                        "port", Buffer() { 18, 0, 0, 0 },
//                    },
//                    "SS03", Package()  // Unknown
//                    {
//                        "UsbConnector", 3,
//                        "port", Buffer() { 19, 0, 0, 0 },
//                    },
//                    "SS04", Package()  // Unknown
//                    {
//                        "UsbConnector", 3,
//                        "port", Buffer() { 20, 0, 0, 0 },
//                    },
                    "SS05", Package()  // U31G1_5 - Back Panel above HDMI upper port Blue Type-A
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 21, 0, 0, 0 },
                    },
                    "SS06", Package()  // U31G1_6 - Back Panel above HDMI lower port Blue Type-A
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 22, 0, 0, 0 },
                    },
                    "SS07", Package()  // U31G1_7 - Back Panel below ethernet upper port Blue Type-A
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 23, 0, 0, 0 },
                    },
                    "SS08", Package()  // U31G1_8 - Back Panel below ethernet lower port Blue Type-A
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 24, 0, 0, 0 },
                    },
                    "SS09", Package()  // U31G1_9 - Onboard Connector USB 3.1 Header
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 25, 0, 0, 0 },
                    },
                    "SS10", Package()  // U31G1_10 - Onboard Connector USB 3.1 Header
                    {
                        "UsbConnector", 3,
                        "port", Buffer() { 26, 0, 0, 0 },
                    },
//                    "USR1", Package()
//                    {
//                        "UsbConnector", 255,
//                        "port", Buffer() { 15, 0, 0, 0 },
//                    },
//                    "USR2", Package()
//                    {
//                        "UsbConnector", 255,
//                        "port", Buffer() { 16, 0, 0, 0 },
//                    },
                },
            },
        })
    }
}
//EOF

Now you should be able to perform a successful install of Mojave. Once you are up and running, copy the EFI folder from your USB to the EFI partition on your SSD/HDD and you should be good to go.

iMessage, iCloud and FaceTime:
If you get errors enabling these services, you can try this simple repair guide from Hackintosher to get up and running.

Files:
If it helps I have uploaded all my config files to Dropbox so you can see what I did.
If you copy my config.plist file, be aware that I have removed the following keys;

  • SerialNumer
  • SmUUI
  • BoardSerialNumber
  • Memory

You will need to generate these keys for yourself.

 

Good Luck!

Share this post


Link to post
Share on other sites
Advertisement

Very nice and detailed guide, I actually don't have this configs but it still encourages me to upgrade to i9 from 8700K :)

Share this post


Link to post
Share on other sites

Hi,

 

This is my first post on this forum.

 

I found the original post here very helpful thanks cat2devnull, so figured I should give back.

I am also using an Asus TUF Z390M PRO (non WI-FI) motherboard and just the iGPU (i5 9600k).

Currently running the latest kexts mentioned by the OP (excluding the Light and Battery ones) and the latest clover bootloader seems to be working fine with the latest Mojave 10.14.5 from the light testing I've done so far.

 

Here are a few issues and solutions I ran into.

 

1. Kernel Panic trying to boot from USB to install. Fixed by DVMT Pre-Allocated from 32M to 64M in the bios

 

2. I stupidly updated the BIOS to the latest (Version 2401) before doing any research and it results in an uninitialised variable in Device(RTC) that makes OSX DSDT parser freak out. Fixed using a patch I found for an Asrock Motherboard worked fine on the Asus board.

        <dict>
          <key>Comment</key>
          <string>Fix AsRock and Asus Z390 BIOS DSDT Device(RTC) bug</string>
          <key>Disabled</key>
          <false/>
          <key>Find</key>
          <data>
          oAqTU1RBUwE=
          </data>
          <key>Replace</key>
          <data>
          oAqRCv8L//8=
          </data>
        </dict>

Credit to 'pupin' in this thread: https://www.tonymacx86.com/threads/mojave-on-asrock-z390-phantom-gaming-itx-ac.265245/

 

3. Trying to use the HDMI port results in a black screen once the installer initialises. Fixed using this frame buffer patch for (ASUS Prime Z390-A etc) I don't this it's perfect because it lists 3 ports and my motherboard only has 2 (DP and HDMI) but I haven't tried creating my own patch yet.

 

<key>Properties</key>
        <dict>
            <key>PciRoot(0x0)/Pci(0x2,0x0)</key>
            <dict>
                <key>AAPL,ig-platform-id</key>
                <data>
                BwCbPg==
                </data>
                <key>device-id</key>
                <data>
                mz4AAA==
                </data>
                <key>framebuffer-con0-busid</key>
                <data>
                AgAAAA==
                </data>
                <key>framebuffer-con0-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-con0-flags</key>
                <data>
                xwMAAA==
                </data>
                <key>framebuffer-con0-index</key>
                <data>
                AgAAAA==
                </data>
                <key>framebuffer-con0-pipe</key>
                <data>
                CgAAAA==
                </data>
                <key>framebuffer-con0-type</key>
                <data>
                AAgAAA==
                </data>
                <key>framebuffer-con1-busid</key>
                <data>
                BAAAAA==
                </data>
                <key>framebuffer-con1-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-con1-flags</key>
                <data>
                xwMAAA==
                </data>
                <key>framebuffer-con1-index</key>
                <data>
                AwAAAA==
                </data>
                <key>framebuffer-con1-pipe</key>
                <data>
                CAAAAA==
                </data>
                <key>framebuffer-con1-type</key>
                <data>
                AAgAAA==
                </data>
                <key>framebuffer-con2-busid</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-con2-enable</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-con2-flags</key>
                <data>
                xwMAAA==
                </data>
                <key>framebuffer-con2-index</key>
                <data>
                AQAAAA==
                </data>
                <key>framebuffer-con2-pipe</key>
                <data>
                CQAAAA==
                </data>
                <key>framebuffer-con2-type</key>
                <data>
                AAQAAA==
                </data>
                <key>framebuffer-patch-enable</key>
                <data>
                AQAAAA==
                </data>
            </dict>
        </dict>

Credit here https://www.tonymacx86.com/threads/guide-general-framebuffer-patching-guide-hdmi-black-screen-problem.269149/

 

4. AppleALC I set the layout-id (inject) to 3 instead of 1 as my motherboard only has the 3 audio ports and not 5/6 like I think layout 1 is meant for. I could be wrong on this one but the green port on the back seems to be working great.

 

I can post my config.plist if there is any interest.

 

Cheers,

zac

 

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×