My first Hackintosh: Mojave Gigabyte Z390 M Gaming Coffee Lake
Last month I decided to replace my ageing 2015 iMac with my first Hackintosh...and what an experience has it been! I invested a lot of time in getting it up and running but now it works like a charm and I want to share with you my working configuration.
You may find this useful if you have identical or similar hardware. I will focus on the Clover configuration, drivers and kexts specific to this hardware and provide links to the guides I used for more general info on Vanilla installations.
!IMPORTANT!
Please note that many guides for the Gigabyte Z390 M Gaming use an unsupported memory fix driver called OsxAptioFix2Drv-free2000.efi . The developer of this driver says that you should never ever use it, as it can cause serious issues to your system (here's his post). After a lot of and trial and error...I managed to use the standard memory fix driver contained in Clover r5033 (OsxAptioFix3Drv.efi) , by changing one little setting in the BIOS!
------------------------------------------------------------------------------------------------------------
The Clover configuration proposed in this post is valid only with a discrete graphic card. I am using a Sapphire Pulse RX570, which is in the recommended list from Apple, connected via Display Port. The embedded Intel IGPU is used in "headless mode", i.e. it does not drive a monitor but provides encoding hardware acceleration to Mojave via Intel Quick Sync. Should you have a similar Radeon card from the same series (say an RX 560 or RX580), you should still be able to use this configuration.
If you plan to use the Integrated Graphic card only, you can use this post to get some ideas but will definitely have to use different BIOS and Clover settings to make it work.
The config.plist file I use is really minimal. Entire sections (Acpi, Boot Graphics, CPU, Devices, Disable Drivers, Gui) have been completely removed or cut to the bone. The Kernel and Kext Patches section is de facto disabled (no need for a USB patch, as we have a custom USB kext), but I had to keep the section as a placeholder or the system will not boot.
Before you can use this plist file, you have to customise it with your generated Serial Number, Board Serial Number, UUID and MLB (Please refer to the general instructions above). I am using iMac 19,2 in SMBIOS: you may want to change that if you use different hardware, especially a different CPU generation.
I have removed the verbose boot as the system is now very stable and I do not have to troubleshoot. If you want to enable it to see what's happening behind the scene, just add the -v argument in Boot/Arguments.
I tried to stay with the Optimised Defaults to the extent possible, and changed just four settings.
I am assuming that you have successfully created a USB Install stick following the general instructions for Vanilla installations.
Before the Mojave installation: Install Clover on USB Installer
If you found this post useful or have questions, leave a comment below!
Cheers
----------------------------------------------------------------------------------
UPDATE TO CATALINA PUBLISHED ON 26 DECEMBER 2019
https://www.briskandwise.com/2019/12/my-first-hackintosh-update-to-catalina.html
You may find this useful if you have identical or similar hardware. I will focus on the Clover configuration, drivers and kexts specific to this hardware and provide links to the guides I used for more general info on Vanilla installations.
!IMPORTANT!
Please note that many guides for the Gigabyte Z390 M Gaming use an unsupported memory fix driver called OsxAptioFix2Drv-free2000.efi . The developer of this driver says that you should never ever use it, as it can cause serious issues to your system (here's his post). After a lot of and trial and error...I managed to use the standard memory fix driver contained in Clover r5033 (OsxAptioFix3Drv.efi) , by changing one little setting in the BIOS!
-----------------------------------------------------------------------------------------------------------
UPDATE TO CATALINA PUBLISHED ON 26 DECEMBER 2019
https://www.briskandwise.com/2019/12/my-first-hackintosh-update-to-catalina.htmlUPDATE TO CATALINA PUBLISHED ON 26 DECEMBER 2019
------------------------------------------------------------------------------------------------------------
Hardware Components
- Gigabyte Z390 M Gaming Mainboard
- Intel® Core™ i5-8400 (8th Generation, Coffee Lake)
- Corsair VENGEANCE® LPX 16GB (2 x 8GB) 3200MHz C16 Memory Kit – White
- Sapphire PULSE RX 570 8G G5 HDMI DP
- Sabrent 256GB ROCKET NVMe PCIe M.2 2280 (main drive)
- Crucial BX500 120GB 3D NAND SATA 2.5-inch SSD (time machine)
- TP-link Archer T6E AC1300 Wireless Dual Band PCI Express Adapter
- Asus USB-BT400 Bluetooth 4.0 USB Adapter
- BitFenix Prodigy M (Orange) case
- Sony SRS-XB12 Portable Wireless Speaker (Orange)
- Apple Magic Mouse 2
- Apple Magic Keyboard
- LG 27UD58 27" 4k IPS Monitor
What works
Frankly, I think everything! iMessage, iCloud, Appstore, Continuity, WiFi, Ethernet, Bluetooth, sleep/wake, restart/shutdown, hardware acceleration of the Intel GPU in "headless mode", USB ports, NVRAM, CPU power management...
Software
- Clover EFI (version 2.5 r5033)
- Clover Configurator (5.4.5.0)
- Hackintool (2.7.1)
- 8 standard Kexts: you can find the latest versions directly on Github (links below), Hackintool->Installed or Clover Configurator->kext installer.
- AirportBrcmFixup (for the WIFI card)
- AppleALC (for audio)
- IntelMausiEthernet (precompiled here) (for Ethernet)
- Lilu (fundamental kext)
- VirtualSMC together with two of its related kexts (fundamental kext)
- WhateverGreen (for graphic cards)
- 1 custom kext for USBports, which I created with Hackintool specifically for this mainboard. It activates the 6 USB ports on the back of the mainboard - four USB 3.0, one 3.1 and one USB C- and two USB ports on the case, connected to the USB2.0 header of the mainboard.
- The config.plist template, that you should further customise (see below)
- As to the EFI drivers, we are going to use exclusively the ones included in the Clover installer. This should ensure maximum support with Clover also for the future.
Sources and General Instructions for Vanilla Installation
I started my Hackintosh experience with the videos of Morgonaut, which are a good starting point to get a general idea of how things work with Clover & co. (e.g. Build a Perfect Hackintosh - Beginners Tutorial)
I then switched to more complete and technical guides, like CorpNewt's Hackintosh Vanilla Desktop Guide. For the creation of a minimal config.plist I took Icymind's Minimal Clover Config as a basis and further reduced it.
Again from CorpNewt, I used a guide (and a script) for the mapping of USB ports. I eventually switched to Hackintool for that, but I would have not managed without the understanding gained thanks to CorpNewt.
Other resources I used are /r/hackintosh/ and the forums of tonymacx86.com (though I am not using Uni or Multibeast) and InsanelyMac, in particular the very insightful posts from RehabMan.
I then switched to more complete and technical guides, like CorpNewt's Hackintosh Vanilla Desktop Guide. For the creation of a minimal config.plist I took Icymind's Minimal Clover Config as a basis and further reduced it.
Again from CorpNewt, I used a guide (and a script) for the mapping of USB ports. I eventually switched to Hackintool for that, but I would have not managed without the understanding gained thanks to CorpNewt.
Other resources I used are /r/hackintosh/ and the forums of tonymacx86.com (though I am not using Uni or Multibeast) and InsanelyMac, in particular the very insightful posts from RehabMan.
Specific settings, configurations and considerations
Graphic Card
VideoProc Hardware Info to check Quick Sync acceleration |
If you plan to use the Integrated Graphic card only, you can use this post to get some ideas but will definitely have to use different BIOS and Clover settings to make it work.
Personalise the Clover config.plist
Config.plist |
Before you can use this plist file, you have to customise it with your generated Serial Number, Board Serial Number, UUID and MLB (Please refer to the general instructions above). I am using iMac 19,2 in SMBIOS: you may want to change that if you use different hardware, especially a different CPU generation.
I have removed the verbose boot as the system is now very stable and I do not have to troubleshoot. If you want to enable it to see what's happening behind the scene, just add the -v argument in Boot/Arguments.
BIOS
I am on BIOS revision F7, the latest available at the time of writing.I tried to stay with the Optimised Defaults to the extent possible, and changed just four settings.
- Save&Exit: Load Optimised Defaults and confirm
- M.I.T: no changes here. Well talk about the ram settings later.
- System: no changes.
- BIOS: no changes.
- Peripherals:
- Super IO: disable Serial Port
- USB configuration: enable XHCI Hand-off
- Chipset:
- Enable Internal Graphics (we use the Radeon, but we need this for HW acceleration)
- set DVMT Pre-Allocated to 32M. This single change enabled the use of the standard driver OsxAptioFix3Drv.efi With the standard setting (64M), I can only boot with the unsupported OsxAptioFix2Drv-free2000.efi (see above)
- Other posts suggest to disable VT-d. I left it enabled and all seems to be working fine.
- Power: no changes
Clover Install and EFI folder
Before the Mojave installation: Install Clover on USB Installer
- Open the Clover EFI package (r5033)
- click "Change Install Location" and select your USB installer as target disk
- click "Customise"
- uncheck everything and then check ONLY the following:
- Clover for UEFI booting only
- Install Clover in the ESP
- UEFI Drivers->File System drivers-> ApfsDriverLoader
- UEFI Drivers->File System drivers-> VBoxHfs
- UEFI Drivers->Memory fix drivers > OsxAptiofix3Drv
- UEFI Drivers->Additional drivers > EmuVariableUefi
- click Install and complete the installation
- mount and open the EFI folder (with Clover Configurator or Hackintool)
- copy all the nine kexts above in EFI/CLOVER/kexts/Other
- replace the config.plist with your customised one
After the Mojave installation: Install Clover on the main drive, i.e. exactly like before BUT:
- In step 2 "Change Install Location" and select the drive where Mojave is installed
- In step 4 also Install RC scripts on target volume (this is needed together with EmuVariableUefi for proper NVRAM emulation)
After the Mojave installation: Install Clover on the main drive, i.e. exactly like before BUT:
- In step 2 "Change Install Location" and select the drive where Mojave is installed
- In step 4 also Install RC scripts on target volume (this is needed together with EmuVariableUefi for proper NVRAM emulation)
RAM settings
In the BIOS settings described above, I have intentionally left the M.I.T section unchanged. The RAM runs at the failsafe speed determined by the mainboard (in my case 2133 MHz at 1.2v).
As my modules are rated to run at 3200 MHz with XMP, I went into BIOS->M.I.T. -> Advanced Frequency Settings and enabled XMP to Profile 1. This immediately boosted the RAM to 3200 MHz and 1.35v. Mojave correctly recognised the new speed in System Report, Geekbench scores improved, and all seemed to work perfectly ok at a first.
However, two weird behaviours appeared:
As my modules are rated to run at 3200 MHz with XMP, I went into BIOS->M.I.T. -> Advanced Frequency Settings and enabled XMP to Profile 1. This immediately boosted the RAM to 3200 MHz and 1.35v. Mojave correctly recognised the new speed in System Report, Geekbench scores improved, and all seemed to work perfectly ok at a first.
However, two weird behaviours appeared:
- wake from sleep took longer and required pressing a key on the keyboard twice, once to wake the system and a second time to get an image on the screen. Before tweaking the RAM, the wake was very fast and completed with one keypress only
- after wake from sleep, I got the message "Disk was not ejected properly" if external USB disks were connected
The solution to this was to the set the speed to 2666 MHz, i.e. the fastest on current Macs. This still gives a tangible speed increase compared to stock setting. I also disabled XMP, so the voltage stays at 1.2v. At 2666 MHz, the RAM seems stable at 1.2v and I could see no difference in benchmarks with XMP disabled vs enabled.
To conclude, I changed only one RAM setting in BIOS compared to Optimised Defaults:
https://www.reddit.com/r/hackintosh/comments/bngrrk/usb_30_drive_ejected_on_sleep_and_remounted_on/
https://www.reddit.com/r/hackintosh/comments/apcijb/a_guide_to_vanilla_hackintosh_from_scratch/
https://github.com/macfanatic77/hackintosh/blob/master/07_Troubleshooting.md
If you find a way to make it work at full speed let me know in the comments!
To conclude, I changed only one RAM setting in BIOS compared to Optimised Defaults:
- M.I.T. -> Advanced Frequency Settings->System Memory Multiplier, set to DDR4-2666
https://www.reddit.com/r/hackintosh/comments/bngrrk/usb_30_drive_ejected_on_sleep_and_remounted_on/
https://www.reddit.com/r/hackintosh/comments/apcijb/a_guide_to_vanilla_hackintosh_from_scratch/
https://github.com/macfanatic77/hackintosh/blob/master/07_Troubleshooting.md
If you find a way to make it work at full speed let me know in the comments!
Enable TRIM for SSD
TRIM was not enabled by default. You can check your drive by opening System Report/Sata or System Report/NVMExpres. If "TRIM Support: NO" then run "sudo trimforce enable" from Terminal and follow the instructions on the screen. The system will reboot. Check again in System Report that "TRIM Support: YES"Extra Info
I originally installed Mojave 10.14.5. After that, two updates for 10.14.6 were released. I run the updates as I would do on my normal Mac. They eventually installed without problems, but I encountered a strange behaviour. The progress bar got stuck at zero progress and showing 12 or 13 minutes remaining. The system seems not respond and you may be tempted to force a shutdown: please don't, just be patient! The system is not blocked, it will eventually restart after 10-20 minutes with the updates correctly installed.Conclusion
I am happy to have learned something new and I am satisfied with the results. The system runs reliably and much faster that my 2015 iMac! Once setup, there's really not much maintenance, apart from the occasional Clover and kext refresh prior to a macOS update.If you found this post useful or have questions, leave a comment below!
Cheers
----------------------------------------------------------------------------------
UPDATE TO CATALINA PUBLISHED ON 26 DECEMBER 2019
Thanks for putting this amazing guide and providing all these resources together.
ReplyDeleteI am having similar build with Z390 M Gaming and RX 580.
Yesterday I updated to Catalina and since then my USB ports are not working.
Have you updated to Catalina? Can you guide me how can I fix the USB Ports?
Hello! Yes, I did update to Catalina but I did not experience any problem with USB ports afterwards. If they were working before the update, make sure that your USB kext is in the EFI folder under Clover/kexts/other (as opposed to Clover/kexts/10.xx), or it might not load with a new version of the OS.
DeleteThank you for sharing your installation experience. I have a same setup except CPU being i3-9100. I followed your guide, installation was a success. However after clover install to target harddrive (with RC scripts, as instructed in your guide) and moving kexts and config.plist from EFI of USB installer disk to EFI of harddrive, the system booted up without graphic card outputting anything. When I used the USB installer to boot, graphic card works fine. Do you have any idea what this problem might be? I checked that my harddrive EFI is identical to USB installer EFI.
ReplyDeleteen effet moi aussi elle est meme reconnue dans clover au boot / options /et la partie graphic mais il manque le deviceID pour cette carte c'est 0x67FF1002 j ai la meme avec clover configurator j ai pu installer les codes device dfans le config.plist ont obient ensuite Radeon polaris 2GB
DeleteNow that the RC scripts are installed, you may want to try deleting the EFI folder on the HD and directly copying the one from the USB (including the nvram file if it is there). If the EFI folders are identical, the booting behavior should really be the same! In theory :-)
ReplyDeleteThanks for the reply. Yes theoretically it should boot the same way, but it just does not. I cleared HD EFI, then copied whole USB EFI to it. The HD boots everything else except the graphic output (I'm using HDMI) as I can check from Anydesk (Remote Desktop app). I've tried hundreds of times -- RC script first, copy USB EFI, with or without nvram.plist, all the combinations.... so frustrating...
ReplyDeleteThe problem is kind of solved, although I have no idea how the solution is related to the problem. I removed the HD EFI nvram.plist file, then set the BIOS to disable my windows HD from booting. (Its original boot order is behind clover HD though). Clover boots up fine and graphic output is normal.
DeleteI guess I will have to swap windows HD and clover HD in BIOS whenever I need windows. Thanks for the help!
Glad you found a satisfactory solution!
DeleteThank you so much for putting this guide together. I used this guide and successfully installed Catalina. Everything is working as you have said other than my case USB's. 1 is running correctly off the board (as my bluetooth). The other one that's connected to two USB ports is not running correctly. Any ideas on how to perhaps change your USB kexts? It is a USB 3 port but I used an adapter to plug into my USB 2 ports on my motherboard. It actually works in the BIOS but just not in my MacOS.
ReplyDeleteThanks again!
Hello Wang!
DeleteThat’s normal, as the USB ports on the PC case differ for each model, your mileage using my kext may vary... You might have to create your own customized kext: have a look at the link on mapping USB ports in the section “ Sources and General Instructions for Vanilla Installation”. Hackintool is also very useful!
Thanks for visiting my website and Cheers!
I have the same motherboard with you so I am about to try it your way! All the other guides had failed me..
ReplyDeleteWhat did you do for your "KextsToPatch" settings? (also given that you made your own custom USB kext file, which I am also going to use!)
Thank you in advance ;)
And if you could, could you please please please upload either your current EFI or the EFI you had when you were first setting up? Thank you so much in advance
DeleteHello! Regarding the “kexttopatch”, I simply had to leave one disabled entry in the plist. It looks like it would not boot if that section is completely empty. You can download the plist file linked in the post and have look!
DeleteAny chance you could also upload your EFI folder and related kexts, specifically the USB kext? This would be very helpful for I and others who are following this guide and using the same motherboard as you. Thanks!
ReplyDeleteNevermind, I see the file now. Thank you much for providing!
DeleteUSB kext is linked in the post!
ReplyDeletetks for that, rlly appreciate it :) will try it as soon as I put my hands on the new pc
ReplyDeleteSigh, I've got the same MB, and followed this exactly but with some changes from the Vanilla Desktop Guide to apply it to my iGPU (I have an i5-9600k with the UHD 630). I've been trying lots of different things (Unibeast, straight from scratch from the aforementioned guide, etc), but so far all have failed. In fact the only time I've gotten into the installer was via a completely vanilla Unibeast install, which took four restarts and ages to do - but I wasn't able to get the drive to boot after that.
ReplyDeleteThis one will boot into the Clover launcher but crashes while trying to boot the Mojave installer. I'd really love this to work, since the non-unibeast Clover is much faster and cleaner. The verbose report returns an error I've seen a lot but have still not gotten to the bottom of: AE_AML_UNINITIALIZED_LOCAL. Any idea what that could be?
Sorry Erbert, i have no experience with that error message...
DeleteThanks for this guide! Plan on doing a very similar build in few weeks time. Can I ask why you can’t just follow the morgonaut tutorial on installing Mojave? Why did you decide to create your own config.list. Thanks.
ReplyDeleteHi Adam, you can try, but each hardware and configuration has its own specificities!
DeleteHi I have pretty much the same specs as you except a i7 9700K and RX 560 I am having a kernel panic when trying to boot into the installer its something to do with memory fix I installed OsxAptioFix3Drv.efi from clover what setting did you have to change in the BIOS?
ReplyDeletehello comment fait ont pour l'audio qui est ALC892 merci
ReplyDeletebonjour ja i la meme config a part le cpu qui est un I3 /9100f qui ne prend pas en charge la partie graphique de la carte mere malgres ca tout fonctionne sauf L audio je pourrais avoir votre dossier efi car je suis interressé par la partie ACPI / patch et la partie config.plist catalina tourne bien sur du ssd flash hyper rapide et ne prends pas de place voila merci pour le dossier EFI
ReplyDeleteje suis sur catalina avec cpu I3 / 9100F et GPU Pulse Radeon RX550 2GB avec la news version du bios en F9g j ai essayer la version beta F9k mais pas stable une qui m a bien plus c'est la F9g moddé mais tjrs pas d audio
ReplyDeletethx a lot for doing this! Im gonna buy similar components and this could be very helpful!!
ReplyDelete