Ryzen Hackintosh

After three days of tinkering, I finally managed to successfully install macOS on my PC. I bought a salvaged Apple Wi-Fi card on a popular e-commerce platform, and it works almost perfectly. The installed system is macOS High Sierra (10.13.6 17G65), and yes, I'm writing this article on macOS (feeling proud.jpg).

1

The method of installing Hackintosh on Ryzen is Vanilla, which involves modifying the config.plist file to achieve a Hackintosh setup. After all, Apple primarily uses Intel processors, so the methods in this article only support certain AMD CPUs.

This post was translated from my Chinese blog post with the aid of ChatGpt.

The advantage of using this method to install Hackintosh is that you can use features like iMessage, FaceTime, Handoff, and Siri. The drawback is that 32-bit applications cannot be used.

This method requires downloading several files, so it’s recommended to create a folder to store the related files.

First, let’s introduce the configuration of the desktop computer. Originally, I wanted to use an NVMe SSD, but the motherboard’s second M.2 slot was not fully functional, so I switched to a more convenient SATA SSD.

  • CPU: AMD Ryzen 1700
  • GPU: NVIDIA GTX 1060 6GB
  • Motherboard: ASRock X370 Killer SLI
  • RAM: Apacer Blade 8G*2 DDR4 3000
  • SSD1: Samsung SM961 256G (Windows 10)
  • SSD2: Plextor M8VG 256G (MacOS)
  • HDD: Seagate ST2000DM008 2T
  • Bluetooth + Wi-Fi Card: BCM943602CS (a salvaged card from Apple MacBook Pro, plug and play)

Creating the Installation USB Drive

Preparations

To create an installation USB drive, you’ll need the following items:

  • gibMacOS: A program written in Python for downloading macOS components directly from Apple Download from Github
  • AMD Vanilla: Kernel patches for AMD CPUs Download from Github
  • A USB drive with a capacity of at least 8GB, USB 3.0 is recommended for faster speeds
  • Wired internet connection

Note that gibMacOS requires a Python environment, which you will need to set up yourself or find instructions online.

AMD Vanilla files are divided into two categories: 15h_16h for FX series and A series CPUs, and 17h for Ryzen, Threadripper, and Athlon 2xxGE series processors. Download the appropriate files based on your CPU model.

Download macOS Installer

Open the gibMacOS folder and run the gibMacOS script. Choose the macOS version you want to install by entering the corresponding number before the version and pressing Enter. The script will start downloading the macOS installer and create a folder structure like gibMacOS/macos Downloads/publicrelease/version in the same directory.

  • The official guide suggests entering ‘r’ before selecting the version to speed up the download, but in practice, it doesn’t make a significant difference, and the download is usually quite fast.
  • After the download is complete, you’ll see a prompt. If there are any entries under ‘Failed,’ it means those components failed to download, and you may need to run the program again to retry. If it still doesn’t work, consider using a VPN for better success.

Create the USB Installation Drive

  • Open the gibMacOS folder and run the MakeInstall script with administrator privileges. The first run will download necessary dependencies, but the download speed may be slow or fail, so you might need a VPN.
  • After the download is complete, you’ll be asked to select your USB device. Enter the corresponding number next to your USB drive, and press Enter. Confirm that the selection is correct, and enter ‘y’ and press Enter. Make sure you double-check, as the selected disk will be formatted.
  • After formatting, you’ll be prompted to enter the path to the previously downloaded macOS installer. Simply copy and paste the download path and press Enter.
  • The writing process takes some time, so be patient. After it’s completed, press Enter and close the script.

Clover Configuration

After the burning process, you will see a disk named ‘CLOVER’ in your file manager. However, it is not complete yet; you need to add kernel patches and driver files.

CPU Kernel Patch

Copy the config.plist from the downloaded AMD Vanilla corresponding to your version and paste it into the CLOVER/EFI/CLOVER directory. Replace the existing file. You will frequently use this file after installation.

Bootloader Patch

Depending on the boot method, there are two categories: Legacy and UEFI.

  • First, open the CLOVER/EFI/CLOVER/drivers64UEFI folder (or CLOVER/EFI/CLOVER/drivers if not present).
  • For UEFI boot, delete the BIOS and off folders. Then, delete all files in the UEFI folder except APFSDriverLoader.efi, HFSPlus.efi, and AptioMemoryFix.efi. Copy these three files to the parent directory.
  • For Legacy boot, delete the UEFI and off folders. Then, delete all files in the BIOS folder except APFSDriverLoader and HFSPlus. Copy these two files to the parent directory.

Kext Driver Patch

Kext files are macOS kernel extensions commonly used in Hackintosh (macOS on non-Apple hardware). They are typically used for device drivers and run in the core of the system.

For this part, you will need to identify your hardware model and Google the required driver file names. The following files are usually sufficient. Files from GitHub should be downloaded from the ‘release’ section.

After extracting all downloaded files, place them in the CLOVER/EFI/CLOVER/kext/Other directory. Additionally, delete the FakeSMC.kext file in that directory.

Essential Files

  • VirtualSMC.kext: This file emulates the real SMC functionality on a Mac, making the system think it’s a genuine Mac. Without it, Hackintosh won’t work. Download 1.0.7
  • NullCPUPowerManagement.kext: This file disables CPU power management, which is designed for Intel CPUs. AMD platforms do not support this program. You can find a usable file from 某某大神_ Download from Lanzou

Network Cards

Graphics Cards

Wi-Fi and Bluetooth

This section is only relevant if you’re using a non-native Wi-Fi card. It’s recommended to get a genuine Apple salvaged Wi-Fi card, such as BCM94360CD, BCM943602CS, or BCM94360CS2, as they work seamlessly and unlock features like Airdrop and Handoff.

Audio

Miscellaneous

Here’s a collection of kext files. You may need to use a VPN to access them.

Download from Onedrive

Now your installation drive is ready, and the next step is to proceed with the installation.

Installation of the System

This step may encounter various issues, such as freezing or error messages. If that happens, you can try to power off or restart (it can be a bit unpredictable), and you might need to restart multiple times.

BIOS Settings

  1. Restart your computer and enter the BIOS (search for the shortcut key; usually F2 or DEL). Set all settings to default, save, and exit.
  2. Re-enter the BIOS and adjust the following settings. These options are for reference; I only loaded the default settings on my motherboard and disabled CSM, leaving others at Auto.
    • AMD-V / SVM = Disabled
    • SATA Ports = AHCI
    • IOMMU = Disabled
    • APU = Disabled
    • HPET = Enabled
    • EHCI Hands-off = Enabled
    • XHCI Hands-off = Enabled (ignore this if you only have USB 3.0 ports like me)
    • Serial Port = Disabled
    • Parallel Port = Disabled
    • CSM = Disable (for UEFI boot)
  3. Save and exit. After restarting, select the USB drive as the preferred Boot Device. The shortcut key to do this varies depending on your motherboard; please search for it or refer to online resources.
  4. When booting from the USB drive, you’ll enter the Clover menu. Choose Boot macOS Install from OS X Base System and press Enter. Clover usually defaults to verbose mode, which means it will display the status as it loads. Once it completes, you’ll enter the macOS installation program. You might encounter a language selection menu; I only saw it the first time I installed macOS. For subsequent reinstallations, it was in Simplified Chinese by default.

Disk Formatting

macOS uses a journaling file system different from Windows, so you need to format the target disk before installation.

  1. Double-click Disk Utility.
  2. Click the dropdown menu in the top-left corner labeled View and select Show All Devices.
  3. Click Erase at the top.
  4. Select the hard drive where you want to install macOS and configure it as follows:
    • Name: (Set the name for your hard drive)
    • Format: Mac OS Extended (Journaled)
    • Scheme: GUID Partition Map
  5. Click Erase in the bottom right corner.
  6. Close Disk Utility.

Installation

During this process, you’ll need an internet connection to download components. Note that the server is overseas, so step 2 below may be somewhat unstable. If you encounter issues like failed to download, you may need to shut down and restart, then reformat the hard drive (you might need to format it twice; it’s a bit of a mystical issue). If possible, set up a VPN on your router for smoother downloads.

  1. Choose Install macOS, then click Continue.
  2. Click Continue again. At this point, you might receive a prompt about being unable to download something.
  3. Select the disk where you want to install macOS.
  4. Wait for about ten to fifteen minutes. After the installation is complete, your computer will automatically restart.

System Setup

After rebooting, select the USB drive for booting again, enter Clover, and choose Boot macOS from [Your Hard Drive's Name]. Wait for the Clover verbose mode to complete, and you’ll reach the welcome page. Choose your country, keyboard settings, etc.

  • Transfer Information to This Mac: For now, select Don't transfer any information.
  • Sign in with Your Apple ID: You can skip this for now, but later you might need to change your device model, and after that, sign in again.
  • Terms and Conditions: Agree to all.
  • Express Set Up: Choose Set Up Later and uncheck everything in Analytics to prevent macOS from analyzing.

After a short wait, you’ll be inside the system.

System Configuration

We still need to boot through the installation USB drive for this step. Here, we’ll copy the EFI files from the USB drive to the boot drive, eliminating the need for the USB drive.

First, you’ll need to download the following two pieces of software:

Clover EFI Bootloader Configuration

Download and install Clover EFI bootloader. Proceed with the installation and select Customize at the Installation Type step.

For UEFI Settings

  • Install only UEFI version
  • Install Clover in the ESP
  • In UEFI Drivers, select these three options:
    • AptioMemoryFix
    • PartitionDxe
    • ApfsLoader
  • Install RC Scripts on the target volume

For Legacy Settings

  • Boot0ss
  • Clover EFI Sata
  • Install Clover in the ESP
  • In Bios Drivers, 64bit, select ApfsLoader
  • Install RC Scripts on the target volume

Replacing EFI Files

  1. Download, install, and open Clover Configurator.
  2. Click on Mount EFI from the left-hand menu.
  3. In the bottom-right corner, find your macOS installation hard drive and click Mount Partition next to it.
  4. Click Open Partition, which will open the EFI folder.
  5. Open your installation USB drive’s CLOVER folder and copy its contents into the previously opened folder.
  6. You’ll receive a system prompt indicating duplicate files; click Merge.
  7. Replace the ./EFI/CLOVER/config.plist on your installation hard drive with the one from your USB drive.

Now, you can reboot your system, enter the BIOS, and change the preferred boot device to your installation hard drive. You can safely remove the USB drive at this point.

Driver Installation

Driver installation requires frequent use of the ./EFI/CLOVER/config.plist file, which can be opened with Clover Configurator. After installation, restart your system for the changes to take effect.

Nvidia Webdriver

I only have a GTX 1060, so I’m providing the installation package for 10-series graphics cards here. For other types, please search for the appropriate drivers.

Download 387.10.10.10.40.105 (17G65)
  • After downloading and installing, it will ask you to restart. After the restart, open ./EFI/CLOVER/config.plist. Right-click in the Arguments section under Boot Parameters and select nvda_drv=1.
  • If your screen is still lagging or tearing after the restart, it means the Webdriver is not enabled. You’ll need to find the Nvidia icon in the top bar, click on it, and select the driver from the dropdown menu. Restart to apply the changes.

Audio

You’ve already installed the AppleALC audio driver earlier, but you won’t have sound yet. You need to configure it in the config.plist file:

  1. Find your audio card’s folder here. In the folder, you’ll find files starting with layout. Note down any random number from one of these files.
  2. Open the config.plist file using Clover Configurator.
  3. Locate Device Properties.
  4. In the top right corner, find Audio. Enter the number you noted down next to Inject.
  5. Check the boxes next to AFG Low Power State and Reset HDA.

USB

I initially used the following method to install USB drivers, but it can cause issues when you have multiple devices connected, and Bluetooth and the camera might not work:

  1. Download the USBInjectALL driver.
  2. After downloading, move it to the ./EFI/CLOVER/kext/Other directory on your EFI partition.
  3. Open the config.plist file using Clover Configurator.
  4. Find Device Properties.
  5. Under the USB section, check the following three options:
    • Inject
    • Add ClockID
    • Fix Ownership

However, for Ryzen processors, you need to use a specific USB patch. A talented developer on GitHub has created a script for this. Copy and paste the following command into Terminal, execute it, and then restart:

1
curl -s -o ~/Desktop/ryzenusbfix.sh https://raw.githubusercontent.com/XLNCs/ryzenusbfix/master/ryzenusbfix.sh && chmod +x ~/Desktop/ryzenusbfix.sh && ~/Desktop/ryzenusbfix.sh

Others

This section is for reference only, as everyone’s configuration is different. Open ./EFI/CLOVER/config.plist and, under Install Drivers, choose other driver files you want to load. Here, I’ve downloaded the following files from the UEFI 64-bit driver section:

  • ApfsDriverLoader
  • AptioMemoryFix
  • EmuVariableUefi
  • HFSPlus
  • NTFS
  • AudioDxe

Other Adjustments

Change Clover Theme

The default Clover boot menu is in text mode, which may not look very appealing. To enhance it with a theme, I found a nice theme on GitHub called Simple. Here’s how to use it as an example:

  1. Download and unzip the theme folder, then place it in the ./EFI/CLOVER/theme directory. Also, copy the theme.plist file from within the theme folder to the parent directory (the theme folder itself).
  2. Open the ./EFI/CLOVER/config.plist file.
  3. Navigate to the Boot Screen section and enter the name of the theme, in this case, Simple, into the Theme field.
  4. Uncheck the Text Mode option below.
  5. Adjust the resolution as needed (there’s no 21:9 resolution, so I chose 1920x1080, which seemed to work well as it filled the screen).

Modify CPU Model

This step is just for personal satisfaction since macOS can’t recognize Ryzen processors, resulting in the CPU showing up as Unknown in the About This Mac section. What we can do is modify the file corresponding to the Unknown CPU to display custom content.

  1. Download BBEdit or TextWrangler.
  2. Open the files in /System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/Resources/zh_CN.lproj/.
  3. Find UnknownCPUKind and modify the text 未知 (Unknown) to whatever you’d like.
  4. Save the changes. Now, the CPU in About This Mac will display the content you entered.

Modify Model Identifier

Open ./EFI/CLOVER/config.plist and under the Model Settings section, select the right-most option with up and down arrows to open a dropdown menu. Choose the model identifier that suits your system.

Enable Native NTFS Read/Write

Currently, macOS can only read NTFS-formatted drives but can’t write to them. However, macOS does have the capability to write to NTFS drives, but it’s not enabled by default due to licensing issues (NTFS is a Microsoft format). Here’s how to enable it:

  1. Open Terminal and enter the command diskutil list to list your drives. Find the drive you want to enable for read and write access and note its NAME.
  2. Enter the command sudo nano /etc/fstab and press Enter, then enter your password.
  3. Add the line LABEL=NAME none ntfs rw,auto,nobrowse where NAME is the name of the drive you noted earlier.
  4. Use Control+X to exit, then press Y to confirm and Enter to save.
  5. Restart your system, and you should be able to write to the NTFS drive.
  6. If you can’t see the drive in Finder, you can create a symbolic link to it on your desktop using the command sudo ln -s /Volumes/NAME ~/Desktop/NAME, where NAME is the name of the drive.

Create a macOS Virtual Machine

This section provides an alternative method in case the installation process fails. If you prefer not to install directly on your disk, you can use a lazy method of creating a virtual machine. Here’s how I did it in the past:

  1. The virtual machine image is shared by Shamme on the forum. Download and extract it using the following link:Download SierraAMD_VM.zip.torrent.zip
  2. Next, you’ll need to install VMware. Download and install it from the VMware official website.
  3. Open VMware and click on Create a New Virtual Machine.
  4. Select Typical and click Next.
  5. Check I will install the operating system later and click Next.
  6. For the guest operating system, select Other and Other (64-bit).
  7. Edit the virtual machine name and choose its location.
  8. Set the disk size; a larger size like 60GB is recommended, but 40GB should suffice. Choose Store virtual disk as a single file.
  9. Click Finish.
  10. Click Edit Virtual Machine Settings.
  11. Increase the memory size to 2048MB (2GB) or more.
  12. Uncheck Connect at power on under CD/DVD (IDE).
  13. Click on Hard Disk (IDE) and then click the Remove button below.
  14. Click the Add button.
  15. Select Hard Disk and click Next.
  16. Choose SCSI.
  17. Select Use an existing virtual disk.
  18. Click Browse and locate the downloaded file from step 1. Open it.
  19. Click Finish.
  20. Choose Keep Existing Format.
  21. Click OK.
  22. Click Power on this virtual machine.
  23. Press Enter twice and wait for it to load to the Welcome page.
  24. Check Show all and select China, then click Continue.
  25. Choose the appropriate input method.
  26. Select Don't transfer any information now.
  27. Click Continue, then choose Don't use.
  28. Select Don't sign in, then choose Skip.
  29. Click Agree and then click Agree again.
  30. Enter your username and password.
  31. Choose your time zone on the map.
  32. Uncheck Share Mac Analytics with Apple, and wait a moment to enter the system.

About Software

Here’s a list of software I’ve gathered:

  • Be cautious - CPU-S: Do not install if you have a Ryzen CPU. I tried to test CPU frequency, but it caused my system to crash and restart. After logging in, it continued to restart, and I had to reinstall the system.
  • Cloud Sync - OneDrive: For synchronizing common documents.
  • FTP - Transmit: Connects to various cloud services like Dropbox and Google Drive.
  • Hardware Monitoring - iStat Menus: Monitor your system’s hardware status.
  • Backup - Carbon Copy Cloner: Use it for backups as Time Machine tends to freeze around 400MB.
  • Study tools? - Steam has a macOS client as well.
  • Ad Blocker for Browsers - Safari’s Adblock Plus Extension.
  • Media Player - Movist: Unlike most media players, which are like PowerPoint for video playback, QuickTime’s format support is limited. Movist, based on QuickTime, resolves this issue.
  • Note-taking - OneNote: Syncs seamlessly across three platforms.
  • Uninstaller - App Cleaner: A cleaner uninstaller.
  • Download Manager - Free Download Manager: It’s in the name, free.
  • Video Downloader - Downie: Download YouTube videos.
  • Window Manager - Magnet: It’s not related to torrents, but it helps manage windows. Windows has had this feature for a while, but Mac relies on third-party software.
  • Translation - EuDic: It’s a habit; iOS can sync dictionaries.
  • Swiss Army Knife - VS Code: Not just for coding; it’s great for Markdown too.
  • VPN - ShadowsocksX-NG: The small plane version.
  • 3D Rendering - VRayX: For heavyweight tasks.
  • Benchmarking - CINEBENCH: Ryzen is supposed to score high; why doesn’t it feel that way?
  • Office Software - Office: Microsoft’s suite works better, with Keynote being the exception.
  • Screenshot - Snipaste: Capture and annotate.
  • Smooth Scrolling - MOS: Say goodbye to choppy mouse wheel scrolling.
  • Cheat Sheet - Cheatsheet: Hold Command to view shortcuts.
  • iPhone Touchpad - FullControl: Control your Mac with your iPhone.
  • Workhorse - Xcode: If you’re installing Hackintosh, you probably want to use it.

Keyboard Shortcuts

Keyboard shortcuts can drive dual-boot users insane. On macOS, copy is Command+C, while on Windows, it’s Ctrl+C. However, the keyboard’s Command key corresponds to the Windows key.

  • Most Ctrl shortcuts on Windows work with Command on macOS.
  • Show/Hide hidden files: Command + Shift + .

References: AMD OS X VanillaHackintosher