• Become a Premium Member for $25/year with no ads to improve your community experience. Upgrade to Pro Account for faster response and no wait times!

GUIDE How to Fix Apps Crashing on AMD Systems: Patching Binary on AMD Builds

How to Fix Apps Crashing on AMD Systems: Patching Binary on AMD Builds

This guide describes how to fix apps crashing on AMD systems running macOS. By following this guide, you'll be able to fix the app crash on your AMD systems running macOS.


Overview

If you have configured the EFI correctly for your AMD build, and a few apps you use are still crashing, then you're at the right place and this is the guide you're looking for!

If you're still wondering despite having a proper EFI, why some of your apps are crashing on your AMD systems, it's not the EFI or your hardware. Certain Mac apps use the infamous Intel Math Kernel Library (MKL) libraries (now Intel OneAPI). Although these libraries are x86_x64 compliant, but when porting to macOS, certain functions are intended to only work on genuine Intel CPUs. These are __intel_fast_memset.A and __intel_fast_memcpy.A.

As Apple never used AMD CPUs for their Mac lineups, these libraries are not available under macOS if you're using AMD CPUs. However, using the Kernel Patches, it is now possible to install macOS without the need for manual Kernel modification. This new style of patching patches the Kernel on the fly using Clover or OpenCore. Before the introduction of these patches, it was quite difficult to use macOS on AMD builds. The new patches have made significant improvements and reliability same as Intel machines. In fact, it's very easy now to boot the macOS installer on the AMD platforms.

Although macOS works completely fine, provided that you have a compatible Graphics Card, some of the apps work normally but on the other hand, apps that require the Intel MKL libraries do not work at all. A few of these apps can still work (such as Adobe) but at the cost of disabling some particular functions with the app. For example, Photoshop will work if you remove the camera.raw module from the app. While this works up to an extent, it's not very feasible as you might need these particular modules/functions at a later stage or from the start.

In addition, these particular apps may perform slower (such as MATLAB) than expected on AMD CPUs in general (including Windows and Linux) for the operations that use the Intel Math Kernel Library (MKL). This is because the Intel MKL uses a discriminative CPU Dispatcher that does not use efficient codepath according to SIMD support by the CPU, but based on the result of a vendor string query. If the CPU is from AMD, the MKL does not use SSE3-SSE4 or AVX1/2 extensions but falls back to SSE1 no matter whether the AMD CPU supports more efficient SIMD extensions like AVX2 or not.

We can simply fool these libraries, redirecting their calls to __intel_fast_memset.J and __intel_fast_memcpy.J which works perfectly on AMD CPUs running macOS and as fast as possible, provided the fact that the CPU still lacks AVX512 instruction set. But we also need to fool them by changing the function __mkl_serv_intel_cpu_true returning TRUE even when running on AMD CPUs!

This fix is based on Daniel de Kok's hint in his brilliant article, where the old trick of setting the environmental variable MKL_DEBUG_CPU_TYPE to 5 has been deprecated by Intel for obvious reasons on rather recent MKL libs implementations.

To overcome this issue, we have two options: (i) use macOS in a Virtualized environment which will bypass the and (ii) patch the binary. The second option is our preferred choice as you'll get the pure bare metal performance and is quite easy to patch the binary than setting up macOS in a virtualized environment using the industry standard hypervisors (such as VMware ESXI). As we've already discussed regarding running macOS in Virtualization, this guide will specifically focus on binary patching.

By patching the app binaries, you can make every Intel only run on AMD systems running macOS without using any hypervisor and without bypassing or deleting important functions for the specific app. Although we do have published guides for running macOS (along with PCIe Passthrough) in a virtualized environment, it can be still complex for AMD users and requires at least 6 cores for optimal performance (2 reserved for the host and 4 for the guest). We don't recommend running macOS in a virtualized environment unless you have any special use case or just to run the apps nicely, just because you have an AMD CPU. Moreover, patching the binary is easier! With the introduction of AMD Kernel patches, the macOS is almost Vanilla, without losing any CPU/GPU performance.

Using a Hex Editor and Hopper Disassembler, these apps can be patched manually and made to work on AMD systems running macOS. However, this can be quite tedious for beginner users but there is AMDFriend to automate the binary patching, thus making the process easier. Using AMDFriend, any apps causing problems can be patched in a few clicks and made to work on AMD systems without any issue. The success rate is very high so far!

Patching Binaries

Not every app on AMD build requires patching as some of them will work without any problems. Before you jump to patch the binaries, you must determine whether the app needs to be patched or not. To determine if patching is needed, follow the steps below:

1. Install the apps you need. If the app requires a license, activate it using the license key.
2. Try to launch the App, if it crashes during the initialization, this indicates we need to patch the binaries for this app. To patch the binaries, follow the steps below:

1. Disable SIP.
2. Download AMDFriend.
3. Extract AMDFriend to your preferred location.
4. Open the Terminal and execute the following commands:

Bash:
#Scan for patchable files in a directory
amdfriend --dry-run --directories /path/to/dir /path/to/another/dir | grep "Routines found"

#Patch files in a directory
sudo amdfriend --in-place --backup --sign --directories /path/to/dir /path/to/another/dir

The first command will list the patchable files in a directory and the second one will patch the binaries in a given directory.

5. When prompted, enter your pass

If the App is patched successfully, you should see something similar:

6. Quit Terminal.
7. Run your App. The app should function normally now.

NOTE: A few directories of the particular app may not be owned by the current user, hence using sudo is necessary.

Examples

Below are a few examples of the apps that crashed prior to the binary patching on the AMD system running macOS Sonoma 14.X via OpenCore.

Adobe

Known to be problematic on AMD builds running macOS, Currently, the recent version of Adobe Apps works with no problem on AMD Systems running macOS. However, there are several plugins (such as Topaz), which might need to be patched. The patching procedure is the same as above. In our test, we did not need to patch any of the Adobe apps including Ps, Lr, LrC, Pr, Ae, Xd, and Media Encoder.

Autodesk Maya

Unlike Adobe, the recent version of AutoCAD Maya 2025.1 works with no problem on AMD Systems running macOS. For AutoCAD to work, the license server must be running and the binaries must be patched. The patching procedure is the same as above.

1. Disable SIP.
2. Open the .dmg file and install AutoDesk Maya. Accept license terms and select the location to install.
3. Once the installation is completed, click on Close.
Now when you try to launch the App, it will crash during the initialization. This indicates we need to patch the binaries for this app.
8. Check for patchable files using
9. Patch the binaries using
10. Run AutoDesk Maya from the Applications directory.

Matlab

For running Matlab on AMD systems, the app needs to be patched in two parts. This is because the installer also needs to be patched otherwise the launcher/installer will not start. Once the installer is patched, you'll have to patch the installed app as well.

1. Disable SIP.
2. Download MATLAB.
3. Open the .dmg file and copy InstallForMacOSX to Desktop.
4. Install Keka.
5. Navigate to Desktop/InstallForMacOSX/Contents/MacOS/
6. Right-click on InstallForMacOSX and click on Extract using Keka
7. Copy the archives directory from Desktop/InstallForMacOSX/Contents/MacOS/
8. Check for patchable files using
9. Patch the binaries using
10. Execute Install from Desktop/InstallForMacOSX 3/Contents/MacOS directory. When prompted, enter the password to launch the installer.
11. Select the components you want to install. Confirm the selections and click on Begin Install to proceed with the installation. The installation will take some time.
12. Once the installation is completed, click on Close.
13. Patch the binaries using
14. Run MATLAB from the Applications directory.

Topaz Gigapixel AI


Waves

PyTorch

Krisp

Discord
The recent version of Discord works with no problem on AMD Systems running macOS.

If you have any app which is patched and confirmed to be running without any problems, report in this thread and it will be added to the list.
 
Last edited:
how to Extract AMDFriend to my location
 
how to Extract AMDFriend to my preferred location
 

Forum statistics

Threads
1,935
Messages
18,091
Members
27,832
Latest member
klklkllkl