Skip to content

Latest commit

 

History

History
329 lines (226 loc) · 18.6 KB

README.MD

File metadata and controls

329 lines (226 loc) · 18.6 KB

OpenCore EFI for AMD Ryzen Hackintosh tests

Table of contents

Software Compatibility

  • Sonoma (14.x)
  • Ventura (13.x)
  • Monterey (12.x)
  • Big Sur (11.x)

Used OpenCore version: 0.9.9

Hardware Compatibility

Central Processing Unit (CPU)

This EFI is compatible with all Ryzen and Athlon 2xxGE processors with macOS-compatible peripherals.

Support for 15h (FX series), 16h (A series) and Threadripper CPUs is not covered here.

Graphical Processing Unit (GPU)

Model Compatible?
Integrated Yes* 0
Nvidia No* 1 2
AMD Yes 2 3 4

0 For VEGA iGPU's (up to Ryzen 5xxx series) use NootedRed and remove WhatEverGreen.kext.

1 Support for Nvidia 10xx GPUs was dropped in Mojave. The only way to use these GPUs is by using High Sierra or older with WebDrivers.

2 Support for Nvidia GPUs up to GTX 10xx was dropped in Monterey Beta 7, you can still use it with some patches, but support for this is not covered here.

3 Some R7 and R9 GPUs require FakeID. More details here

4 Lexa series GPUs are not supported. Older than 7000 series are supported up to High Sierra (10.13), their support is not covered here.

5 For unsupported RDNA 2 GPU's (Navi 21, 22, 23) use NootRX and remove WhatEverGreen.kext.

For AMD Navi 10 Series GPUs (RX 5500, RX 5600, RX 5700) you need to add agdpmod=pikera to boot-args to fix the black screen issue.

PAT Patch made by Shaneee is used by default. It improves GPU performance but it has a few caveats. Audio passed by HDMI or DisplayPort won't work or will be unstable. It also may not work with Nvidia GPUs.

If you want to control monitor's brightness or HDMI/DP audio volume you need to use MonitorControl for that.

Laptops

All laptops with AMD CPUs are not supported due to some required additional steps, try on your own.

Motherboards

Chipset Details
B550, A520 Requires SSDT-CPUR to boot. Details here.
B550, A520, B450, X470, X570 SetupVirtualMap has to be disabled.
Other Should be compatible out of the box.

SSDT-CPUR

Follow these steps to properly install SSDT-CPUR.

  • Download from here.
  • Install it to your OC/ACPI directory.
  • Add it to your configuration file. Use ProperTree for simplicity.

AM5 Socket

On AM5 motherboards with on-board Thunderbolt/USB4, macOS Ventura may not enumerate devices on the PCI bus properly when on-board WiFi and on-board Thunderbolt are both enabled. Patch CaseySJ | IOPCIIsHotplugPort | Fix PCI bus enumeration on AM5 | 13.0+ bypasses the problem. This patch is disabled by default. If you have described issue you have to enable this patch.

Disabling SetupVirtualMap

To disable SetupVirtualMap simply go to Booter -> Quirks -> SetupVirtualMap in your configuration file and disable it. (Should be false).

PCI Express

If you have the Above 4G Decoding option in your BIOS settings, enable it and remove the npci=0x2000 parameter from the boot-args (NVRAM section).

Audio

Follow these steps if your audio chipset is different than the one specified in the Specification.

  • Go here to find your audio chipset codec. (Under Codec)
    • If you can't find your codec on the list, then you probably have to use VoodooHDA. This repository does not cover or support the use of VoodooHDA.
  • Under Revisions and layouts you'll see bunch of numbers and layout ids.
  • Go to NVRAM -> Add -> 7C436110... -> boot-args in your config and add alcid=_x_.
  • Try every layout id (except 0x values) one by one until it works.
    • Example: alcid=10 if layout 10

External (USB) audio cards should work out of the box.

Network

If you experience any issues with your network connection, then your best bet would be to install a different kext, preferably from here. Remember to remove RealtekRTL8111.kext before adding another network kext.

If you have issues with network card on Monterey or newer try adding e1000=0 to boots-args.

WiFi and Bluetooth

Only Apple Airport and Fenvi cards work out of the box. For Intel cards you have to use itlwm or AirportItlwm.AirportItlwm partially supports Airport features but is less stable. For Bluetooth support you need IntelBluetoothFirmware. Please read guide before installing these kexts as additional steps are required depending on macOS version.

Here you can check list of other supported cards and needed kexts for them.

Rembember that AirDrop, Handoff, etc. works only on cards with Broadcom chip.

BIOS Settings

Option Status
SATA Mode AHCI
Above 4G Decoding Enabled 1
EHCI/XHCI Hand-off Enabled
SVM Enabled
CSM Disabled
Resizable BAR Support Disabled
Secure Boot Disabled
Serial Port Disabled
Parallel Port Disabled

1 If you have this option in BIOS you must also remove npci=0x2000 from boot-args in your configuration file.

Some of these options may not exist in your firmware, just try to match it as closely as possible.

Before booting macOS remember to update BIOS to the latest version.

Installation

Bootable USB

  1. Follow this guide to create your bootable USB.

  2. Clone this repository and copy "BOOT" & "OC" directories to your "EFI" directory on your bootable USB. The structure should look somewhat like this: EFI -> BOOT, OC.

Modifying kernel patches

  1. Modify Core Count patches to match your CPU's cores amount.
  • Find four algrey - Force cpuid_cores_per_package patches under Kernel -> Patch in your config.

  • Modify these patches for your CPU physical cores. Change first pair of 00 in Replace of these patches to Hex value from below table.

    • e. g. for Ryzen 7 1700 with 8 Cores three modified patches should look like:
      • B8 00 0000 0000 -> B8 08 0000 0000
      • BA 00 0000 0000 -> BA 08 0000 0000
      • BA 00 0000 0090 -> BA 08 0000 0090
      • BA 00 0000 00 -> BA 08 0000 00
Physical CPU cores Hex value
4 Cores 04
6 Cores 06
8 Cores 08
12 Cores 0C
16 Cores 10
24 Cores 18
32 Cores 20

SMBIOS

  1. Use this tool to generate your unique SMBIOS info.
  • SMBIOS has to be unique, you cannot use one present in this repository.

  • Run the tool and select Generate SMBIOS.

  • Select the appropriate model for your hardware using the table below.

  • Go to Apple Coverage and paste generated Serial. You need "Invalid Serial" or "Purchase Date not Validated" message. If you get something another you have to generate SMBIOS data and check it again.

  • Open config.plist and search for PlatformInfo -> Generic and replace these values:

    • SystemProductName - Model
    • MLB - Board Serial
    • SystemSerialNumber - Serial
    • SystemUUID - SmUUID
  • ROM entry should be set to your network card's MAC address, without separators (e. g. :, -).

GPU Series Model
AMD Navi Series iMacPro1,1 or MacPro7,1
AMD Vega Series iMacPro1,1 or MacPro7,1
AMD Polaris Series iMacPro1,1 or MacPro7,1
AMD Radeon R5/R7/R9 MacPro6,1
AMD HD 8000 Series MacPro6,1
AMD HD 7000 Series MacPro6,1
Nvidia Kepler Series MacPro7,1

Configuration

  1. You should update your BIOS to the latest version and configure it appropriately. See BIOS Settings for details.
  2. Remember to verify your hardware and apply appropriate changes to your configuration file. See Hardware Compatibility for details.
  3. Map your USB ports with USBToolBox. Guide about it is available here. You have to do it from Windows.
  4. That's it! Now you can boot macOS installer.

Post-Installation

  1. Copy your EFI directory onto your main drive EFI partition, you'll be able to boot the system without your bootable USB.
  2. Apply Ryzen patch script - it solves MKL (Math Kernel Library) issues and sets correct sleep parameters.
  3. If you have Unknown instead of your CPU name in About this Mac go to PlatformInfo -> Generic -> ProcessorType in your configuration file. Set it to 3841 if your CPU has 8 or more physical cores, else set it to 1537.
  4. When everything work you can disable verbose mode - then you will see Apple's logo instead of logs while booting. To do it you have to remove -v debug=0x100 keepsyms=1 from boot-args in your configuration file.

Optional steps

  1. Install SMCAMDProcessor kext for improved CPU power management. It's not installed by default because it may cause some issues (freezes, kernel panics, etc.). If you encounter no problems after installation, keep using it.

Bootstrap

In general, enabling Bootstrap is not required, but it will protect your OpenCore from being overriden.
Remember to do not enable Bootstrap on pendrive - do it only after copying OpenCore to your disk's EFI.

  1. Go to Misc -> Boot -> LauncherOption in your configuration file and set it to Full.
  2. Reboot your computer.
  3. Reboot PC again and go to your BIOS settings. In boot options you will see new boot entry named OpenCore. Set BIOS to boot from it, instead of your drive.

PAT Patch

Shaneee's Algrey's
Much better GPU performance Worse GPU performance
May not work with Nvidia GPUs Compatible with all GPUs
HDMI/DP audio may not work HDMI/DP audio works
Enabled by default Disabled by default

To switch to another patch look for mtrr_update_action in config.plist. Then set Enabled to true for the patch you want to use. Remember to set Enabled to false on the other PAT patch. Do not try to enable both at the same time, trust me, it won't work.

MKL and Intel Fast Memset Patch

Some applications for macOS use MKL - Math Kernel Library. Unfortunately, it does not work on AMD CPUs natively - we need to patch it with this script.

There's also intel_fast_memset instruction which, obviously, doesn't exist on AMD systems. It's very common in Adobe software - you can simply fix it by running this script. Older versions of Adobe software (e. g. up to 22.3.1 for Photoshop) need it's legacy version. For details about Adobe patching check thead on macos86.it.

If you have problems while running script from file, try to copy and paste it's code to Terminal.

DRMs support

To Have DRM working propertly on Big Sur and never, you need to:

WhatEverGreen users:

  • Add unfairgva=1 to boot-args in your configuration file.

NooterRed users (Experimental):

  • Add -nredvcn revblock=media to boot-args in your configuration file.

If this causes problems for you, you need to remove these arguments and use browsers with Software DRM.

NootRX users:

  • DRM should work Out-of-the-box.

Sleep

Firstly, check if your sleep works out of the box. If it works, you can skip reading this section.

The most common reason of broken sleep on AMD systems are USB problems.
You have to map your USB ports. If you have working Windows instance I recommend this tool, otherwise you have to do it manually.
After mapping remember to disable Kernel -> Quriks -> XhciPortLimit in your configuration file.

If USB fixes does not help, probably something another is broken. You can read more detailed guide about it on Dortania.

Virtualization

Prerequisites

  • Make sure you have SVM enabled in your BIOS settings.
Software Compatibility
Parallels Desktop Up to 13.1 unless AppleHV is used.1 2 3
VirtualBox Up to Virtualbox 6.1. 4
Docker Only Docker in VirtualBox or Docker Toolbox.
Android Emulator Only Android-x86 or NOX Player with compatible VM software.
iOS Emulator Works out of the box.

1 You need to use SYSTEM_VERSION_COMPAT=1 environment variable, it works up to Monterey.

2 Use this launcher package to simplify the Parallels usage.

3 Only Windows 10 Anniversary Update (build 1607) or older systems work.

4 For Ventura and never, you need to Disable SIP and use AMFIPass.kext

Resource management

You shouldn't add too much resources to your virtual machines, as it causes performance issues regardless of your hardware.

Use the following configuration for best results.

  • Parallels Desktop 13.1
  • 4 CPU cores
  • 4GB - 8GB RAM
  • 1GB - 2GB VRAM
  • 3D Acceleration: DirectX 9
  • OS: Windows 8.1.

Guides and troubleshooting

Firstly try to disable AMDRyzenCPUPowerManagement and SMCAMDProcessor kexts - it may cause random kernel panic with some hardware configurations.

If you have any other questions or issues, feel free to ask on AMD-OSX Discord or Forum.

Due to the diversity of configurations, I am unable to assist with issues related to specific computer specifications. For troubleshooting, I recommend starting with inquiries on the AMD-OSX Discord.

Please create an Issue on GitHub primarily for cases concerning more general problems.

Credits

  • Apple for macOS
  • AMD-OSX Developers for kernel patches for AMD CPUs
  • Acidanthera for OpenCore and most of used kexts
  • Trulyspinach for Ryzen power management and monitoring kexts
  • Mieze for RealtekRTL8111 kext
  • DhinakG for USBToolBox
  • XLNC for Adobe patches for AMD CPUs and AppleMCEReportedDisabler kext
  • Pavo for research about AppleMCEReportedDisabler in Monterey
  • tomnic for libfakeintel.dylib used by Adobe patches
  • Dortania for OpenCore configuration guides
  • AMD-OSX Community for support while making my Hackintosh
  • SocketByte for README maintenance and being a great friend :)
  • 4aya for README re-write.

Screenshot