Jump to content

[WIP] Photoshop, After Effects CC 2021, Premiere Pro CC 2021 15.4 AMD hackintosh fix


tomnic

Recommended Posts

  • Moderators

FINAL UPDATE: Now you just need to patch the offending executables, no more libfakeintel, no more plists to preload... just direct patching where needed. Post the requested files of the requested app and a patched executable will be released: replace and recodesign it, done!

 

QUICK UPDATE: Put the libfakeintel.dylib in your Application folder, put environment.plist in your $HOME/Library/LaunchAgents, overwrite libiomp5.dylib in Contents/Frameworks into AE CC 2020/2021 application with the one provided and we have the best working solution available for all actual adobe's products. Premiere Pro works with this method until CC 2020 version 14.3.1. AE CC 2021 18.4 works by replacing even libmkl_intel_thread.1.dylib with the one provided.

 

UPDATE: Premiere Pro CC 2021 15.4 works by manually patching AEFilterStabilizer and AEFilterMorphCut binaries inside the respective bundles, as dylib injection doesn't seem to work inside macOS bundles. Details in my last post. Need to generalize it for versions between 14.4 - 15.4 and up. 

 

Hi everybody! Trying to solve the remaining issues of running macOS with AMD cpus when certain apps expect strict intel code (Adobe Suite, Discord, Matlab and some older DaVinci Resolve versions) I randomly came reading this article:

 

https://danieldk.eu/Posts/2020-08-31-MKL-Zen.html

 

This works perfectly in Linux in order to run optimized x86_64 Intel code but with AMD cpus... but can we port this to macOS I asked myself? We could solve the compatibility issues I've talked about earlier. I'm a real rookie in programming but I managed to get some interesting results anyway!!!

 

At first I installed brew, a real bridge between Linux and macOS, just issue this command in terminal:

 

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

 

Then I installed GCC using brew and this mini-guide: https://discussions.apple.com/thread/8336714

 

Then I compiled as a dylib (dynamic library) for macOS this little trivial C program with gcc:

 

int mkl_serv_intel_cpu_true() {
  return 1;
}

 

I used this command, fakeintel.c is the file in which I typed and saved the above code:

 

 gcc -dynamiclib /Users/tomnic/Desktop/fakeintel.c -o libfakeintel.dylib

 

...so I got the libfakeintel.dylib I attach.

 

To get the code injecting effect in macOS you need to use the environmental variable DYLD_INSERT_LIBRARIES, same effects of the Linux counterpart LD_PRELOAD

(http://web.archive.org/web/20121108142727/https://blogs.oracle.com/DatabaseEmporium/entry/where_is_ld_preload_under).

 

We can inject automatically this library with each unix executable using this command:

 

launchctl setenv DYLD_INSERT_LIBRARIES /Users/tomnic/Desktop/libfakeintel.dylib

 

As you can infer, I put the injected library on my desktop, change your path according to your needs 😉 

 

Experimenting with Adobe After Effects with camera tracking function (older tricks no longer work) I got these results:

 

1. Without injecting libfakeintel.dylib analysis stops at 0%, then AE stops;

2. With libfakeintel.dylib injected tracking starts and completes at 100% but then AE crashes with this error:

 

<1641966> <Tracciatore videocamera 3D Profile Data> <5> Analysis Started (Tutorial - Tracking.mov)
selector.max_count: 500.000000

selector.spacing: 29.000000

selector.half_winx: 15.000000

selector.half_winy: 15.000000

selector.border: 12.000000

selector.threshold: 0.010000

selector.min_eig: 1.000000

selector.max_eig: 6000.000000

selector.presmoothing: 1.000000

selector.presmooth_factor: 0.100000

selector.eig_ratio_threshold: 15.000000

selector.down_sample_factor: 1.000000

tracker.max_iterations: 25.000000

tracker.tolerance_translation: 0.100000

tracker.tolerance_affine: 0.050000

tracker.pyramidal_levels: 5.000000

tracker.half_win_x: 15.000000

tracker.half_win_y: 15.000000

tracker.color_correction_translation: 0.000000

tracker.color_correction_affine: 2.000000

tracker.affine_verification: 1.000000

tracker.tolerance_color_lambda: 0.050000

tracker.tolerance_color_delta: 1.000000

tracker.tolerance_min_correlation: 0.700000

tracker.tolerance_primary_color_threshold: 5.000000

tracker.kill_tracks_shorter_than: 5.000000

<1641966> <StateBinaryConverter> <5> solveCompleteB = 0
<1642537> <StateBinaryConverter> <5> solveCompleteB = 0
<1641966> <AnalyzerServer> <5> Create Temp Project: /var/folders/qw/wdfjy1tx0z3569g9v0gygxw80000gn/T/tmpAEProject-569fa6b4-c9fb-43f2-a2a4-5ea9f85fde5b.aep
<1641966> <AnalyzerServer> <5> Start 7fa4a8b1-fb7a-4570-b4f7-fc33bfce2803
<1641966> <Tracciatore videocamera 3D Profile Data> <5> Analysis Time (seconds) : 5,22 (Tutorial - Tracking.mov)
<1641966> <AnalyzerServer> <5> End 7fa4a8b1-fb7a-4570-b4f7-fc33bfce2803
<1641966> <AnalyzerServer> <5> Delete Temp Project: /var/folders/qw/wdfjy1tx0z3569g9v0gygxw80000gn/T/tmpAEProject-569fa6b4-c9fb-43f2-a2a4-5ea9f85fde5b.aep
<1642537> <StateBinaryConverter> <5> solveCompleteB = 0
[19817:1642194:20210530,203115.482236:WARNING process_memory_mac.cc:93] mach_vm_read(0x7ffeefbff000, 0x2000): (os/kern) invalid address (1)
[19817:1642194:20210530,203115.593841:WARNING mach_o_image_segment_reader.cc:173] section.segname incorrect in segment __TEXT, section 
???
???
???
???,
???
???
???
??? 0/11, load command 0x19 0/22, module /Applications/Adobe After Effects 2021/Adobe After Effects 2021.app/Contents/Frameworks/LogSession.framework/Versions/A/Resources/libConfigurer64.dylib, address 0x12f534000
LaunchHeadlightsCrashProcessor result: -11
[19817:1642194:20210530,203119.056962:WARNING crash_report_exception_handler.cc:346] UniversalExceptionRaise: (os/kern) failure (5)

[1]  + illegal hardware instruction  DYLD_INSERT_LIBRARIES=/Users/tomnic/Desktop/libfakeintel.dylib 

 

...help me finding out why 😉 

 

Instead in Adobe Photoshop everything seems to work happily, since the name of this thread (by now).

 

To revert everything back just reboot!

 

libfakeintel.dylib.zip

environment.plist.zip libiomp5.dylib.zip

libmkl_intel_thread.1.dylib.zip AEFilterMorphCut.bundle.zip AEFilterStabilizer.bundle.zip

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • Moderators

Little update: even without reboot you can undo the effects of code injection using this command in terminal:

 

launchctl unsetenv DYLD_INSERT_LIBRARIES

 

  • Like 2
Link to comment
Share on other sites

I've entered the command line and put the location of the dylib no error showed but still warp stabilizer not working! what should I exactly do and do I need any patches? I have the SIP disabled 

Screen Shot 2021-06-04 at 2.48.55 PM.png

Ryzen 7 3700x

MSI X570 UNIFY

32GB HyperX FURY 3200mhz

MSI RX5600XT GAMING X

CRUCIAL P1 500GB NVME

 

UPDATE: i Have compleatly disabled the SIP and tried the Environment.plist method and didn't work but the plist is loaded.... idk what's wrong but the Warp Stabilizer for premiere not working and camera tracking for After Effects that's what I tried the app crashes for premiere 15.2 and After Effects 18.2 

Screen Shot 2021-06-04 at 4.39.58 PM.png

Screen Shot 2021-06-04 at 4.40.36 PM.png

Screen Shot 2021-06-04 at 4.41.05 PM.png

Screen Shot 2021-06-04 at 4.46.48 PM.png

Edited by xmaromoorex
Link to comment
Share on other sites

  • Supervisor
21 hours ago, xmaromoorex said:

I've entered the command line and put the location of the dylib no error showed but still warp stabilizer not working! what should I exactly do and do I need any patches? I have the SIP disabled 

Screen Shot 2021-06-04 at 2.48.55 PM.png

Ryzen 7 3700x

MSI X570 UNIFY

32GB HyperX FURY 3200mhz

MSI RX5600XT GAMING X

CRUCIAL P1 500GB NVME

 

UPDATE: i Have compleatly disabled the SIP and tried the Environment.plist method and didn't work but the plist is loaded.... idk what's wrong but the Warp Stabilizer for premiere not working and camera tracking for After Effects that's what I tried the app crashes for premiere 15.2 and After Effects 18.2 

Screen Shot 2021-06-04 at 4.39.58 PM.png

Screen Shot 2021-06-04 at 4.40.36 PM.png

Screen Shot 2021-06-04 at 4.41.05 PM.png

Screen Shot 2021-06-04 at 4.46.48 PM.png

If you see this thread's title the author talks about a solution for Photoshop..

we are trying some other steps with AE like you can see in YouTube video..

I think @tomnicwill update his solutions as soon as he can

meanwhile e you can try:

launchctl setenv DYLD_INSERT_LIBRARIES /Users/tomnic/Desktop/libfakeintel.dylib
launchctl setenv DYLD_FORCE_FLAT_NAMESPACE 1

Change tomnic with your username or path 

 

 

  • Like 1
Link to comment
Share on other sites

On 6/5/2021 at 11:15 PM, tomnic said:

Hi, please try replacing libiomp5.dylib in Contents Frameworks with the one of the "classic" patch, then warp stabilizer in AE seems to work.

 

I attach it for simplicity 😉

 

Please report any issue!!! You're precious!

libiomp5.dylib.zip 520.83 kB · 7 downloads

Amazeballs! I knew someone would be able to link Daniels solution within MacOS eventually

After Effects works (mostly) I still get random crashes sometimes

 

I've tried the same with premiere pro and unfortunately was not successful. I wonder why that is, as warp stabilizer function is the same across both application frameworks

  • +1 1
Link to comment
Share on other sites

  • Moderators
3 hours ago, nikoel said:

Amazeballs! I knew someone would be able to link Daniels solution within MacOS eventually

After Effects works (mostly) I still get random crashes sometimes

 

I've tried the same with premiere pro and unfortunately was not successful. I wonder why that is, as warp stabilizer function is the same across both application frameworks

 

It seems that using the same routine as an effect in Premiere involves other libraries to be "patched"... not easy to learn which one 😉 I'll keep on trying!

  • Like 1
Link to comment
Share on other sites

I tested everything again, all photoshop functions works and after effects Tracking and Warp Stabilizer Working for me I didn't have any crashes.

for Premiere I use v14.3.1 warp Stabilizer Still works because it has the old MKL library as if anyone needs a version that works and I use the this command to make this version works

launchctl setenv MKL_DEBUG_CPU_TYPE 5

I automated the three codes to start with my machine automatically

here is a note I've been searching for which file is responsible for the Warp Stabilizer in premiere and I found this I tried to switch files from the v14.3.1 that works with the 15.2 and the plugin it self doesn't have to do anything with Stabilization but the AEFilterStabilizer.bundle it does the Stabilization process I tried to use the normal patch which is this 

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Premiere\ Pro\ 2021/Adobe\ Premiere\ Pro\ 2021.app/Contents/Plug-Ins/Common/AEFilterStabilizer.bundle/Contents/MacOS/AEFilterStabilizer

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' /Applications/Adobe\ Premiere\ Pro\ 2021/Adobe\ Premiere\ Pro\ 2021.app/Contents/Plug-Ins/Common/AEFilterStabilizer.bundle/Contents/MacOS/AEFilterStabilizer

BUT IT DIDN'T WORK 

I'm just telling what I've reached till now as anyone can patch this bundle 

 

here the Warp Stabilizer running fine in v14.3.1 if someone needs it

Screen Shot 2021-06-08 at 3.41.52 AM.png

 

Here the Automation If anyone needs it to start after booting you save the app and start it with login start apps

Screen Shot 2021-06-08 at 3.43.17 AM.png

Edited by xmaromoorex
  • Like 1
  • Thanks 1
  • +1 1
Link to comment
Share on other sites

  • Supervisor
4 hours ago, xmaromoorex said:

 I tested everything again, all photoshop functions works and after effects Tracking and Warp Stabilizer Working for me I didn't have any crashes.

thanks for testing

if you want, in latest AE try this:

use warp stabiliser on a video

then use camera tracking 

and post your results 

thank you

Link to comment
Share on other sites

  • tomnic changed the title to Photoshop and After Effects CC 2021 AMD hackintosh fix

hi! i´m very focused in AE, since Photoshop and premiere worked for me with this method: https://forum.amd-osx.com/index.php?threads/amd-adobe-fixes.6/ , and after installing camera raw separatedly...
Testing your method in AE (18.2 build 37) works, and it works quite stable (camera tracker and warp stabilizer), but then i can´t run photoshop or Spark (mail manager). (premiere works as well)

i didn´t try all programs, but it seems like the injection causes some executing issues in some other programs...

i tried to run this comand 

launchctl unsetenv DYLD_INSERT_LIBRARIES

to "undo" de inyection and run those programs with no success, only way is rebooting...

 

This kind of "hack or patch" to run AE properly looks so promising, congratulations!

i hope you or someone following your work can finally make adobe suite work absolutely perfect with AMD because this problems with adobe is an absolute head ache... if i knew it before, i would buy intel for sure....

 

i hope this helps! thank you a lot for your work!! if i can help somehow tell me (i don´t know a shit about programming)

 

Keep on it boss!!!

Edited by neich03
Link to comment
Share on other sites

On 6/8/2021 at 11:43 AM, xmaromoorex said:

I tested everything again, all photoshop functions works and after effects Tracking and Warp Stabilizer Working for me I didn't have any crashes.

for Premiere I use v14.3.1 warp Stabilizer Still works because it has the old MKL library as if anyone needs a version that works and I use the this command to make this version works


launchctl setenv MKL_DEBUG_CPU_TYPE 5

I automated the three codes to start with my machine automatically

here is a note I've been searching for which file is responsible for the Warp Stabilizer in premiere and I found this I tried to switch files from the v14.3.1 that works with the 15.2 and the plugin it self doesn't have to do anything with Stabilization but the AEFilterStabilizer.bundle it does the Stabilization process I tried to use the normal patch which is this 


sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Premiere\ Pro\ 2021/Adobe\ Premiere\ Pro\ 2021.app/Contents/Plug-Ins/Common/AEFilterStabilizer.bundle/Contents/MacOS/AEFilterStabilizer

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' /Applications/Adobe\ Premiere\ Pro\ 2021/Adobe\ Premiere\ Pro\ 2021.app/Contents/Plug-Ins/Common/AEFilterStabilizer.bundle/Contents/MacOS/AEFilterStabilizer

BUT IT DIDN'T WORK 

I'm just telling what I've reached till now as anyone can patch this bundle 

 

here the Warp Stabilizer running fine in v14.3.1 if someone needs it

Screen Shot 2021-06-08 at 3.41.52 AM.png

 

Here the Automation If anyone needs it to start after booting you save the app and start it with login start apps

Screen Shot 2021-06-08 at 3.43.17 AM.png

 

 

I'm scratching my head here. V14.X.X is Premiere Pro 2020 - your code is for Premiere Pro 2021

Is there an error in the code, or error in the version you're running?

 

 

EDIT: Downloaded PP2020 14.3.1 and changed the code @xmaromoorex so kindly provided. Works flawlessly - thank you. Here is the amended code

 

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Premiere\ Pro\ 2020/Adobe\ Premiere\ Pro\ 2020.app/Contents/Plug-Ins/Common/AEFilterStabilizer.bundle/Contents/MacOS/AEFilterStabilizer

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' /Applications/Adobe\ Premiere\ Pro\ 2020/Adobe\ Premiere\ Pro\ 2020.app/Contents/Plug-Ins/Common/AEFilterStabilizer.bundle/Contents/MacOS/AEFilterStabilizer

 

 

Edited by nikoel
Link to comment
Share on other sites

More Testing

 

So, I can confirm that Spark and Firefox do not work when the commands are applied

 

The PP2020 hack works, but there is a further problem that it can not read project files that PP2021 has created. Even the downgrade trick no longer works - tried via GZIP method and half a dozen converter tools. You can however export as a XML file, but this loses a lot of other things (eg Masks and colour effects)

 

You can circumvent the issue by launching firefox and spark before applying the command

 

In After Effects warp stabilization and camera tracking can be applied at the same time

 

So close - frustrating

 

 

Link to comment
Share on other sites

  • Moderators

For sure issues to other non-adobe apps are led by this command:

launchctl setenv DYLD_FORCE_FLAT_NAMESPACE 1

You can undo it by typing (it works for me):

launchctl unsetenv DYLD_FORCE_FLAT_NAMESPACE

 

I found out that if you change libiomp5.dylib you don't need this second "destructive" line of code, injection will work the same.

 

Make me know!

Link to comment
Share on other sites

14 hours ago, nikoel said:

 

 

I'm scratching my head here. V14.X.X is Premiere Pro 2020 - your code is for Premiere Pro 2021

Is there an error in the code, or error in the version you're running?

 

 

EDIT: Downloaded PP2020 14.3.1 and changed the code @xmaromoorex so kindly provided. Works flawlessly - thank you. Here is the amended code

 


sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Premiere\ Pro\ 2020/Adobe\ Premiere\ Pro\ 2020.app/Contents/Plug-Ins/Common/AEFilterStabilizer.bundle/Contents/MacOS/AEFilterStabilizer

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' /Applications/Adobe\ Premiere\ Pro\ 2020/Adobe\ Premiere\ Pro\ 2020.app/Contents/Plug-Ins/Common/AEFilterStabilizer.bundle/Contents/MacOS/AEFilterStabilizer

 

 

You didn't get me the PP2020 14.3.1 just needs this to run 

launchctl setenv MKL_DEBUG_CPU_TYPE 5

but what I was talking about using this 

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x6A\x00|\x90\x90\x90\x90\x56\xE8\x3A\x00|sg' /Applications/Adobe\ Premiere\ Pro\ 2020/Adobe\ Premiere\ Pro\ 2020.app/Contents/Plug-Ins/Common/AEFilterStabilizer.bundle/Contents/MacOS/AEFilterStabilizer

sudo perl -i -pe 's|\x90\x90\x90\x90\x56\xE8\x4A\x00|\x90\x90\x90\x90\x56\xE8\x1A\x00|sg' /Applications/Adobe\ Premiere\ Pro\ 2020/Adobe\ Premiere\ Pro\ 2020.app/Contents/Plug-Ins/Common/AEFilterStabilizer.bundle/Contents/MacOS/AEFilterStabilizer

I was trying to patch premiere pro 2021 and I said it didn't work.... I was telling what I discovered about the Warp Stabilizer what's  the actual file which does the Stabilizing job

Link to comment
Share on other sites

  • Moderators

383172918_Schermata2021-06-13alle17_38_01.thumb.png.59b89a30d3404df9f5a3bd8625504f40.png

2084301633_Schermata2021-06-13alle17_33_50.thumb.png.d49ee3361ef3ccd736fd5dca167db225.png

That's a really nice Tracking Score 😉

 

I also managed to run Adobe Premiere Pro 2020 14.3.1 just using:

launchctl setenv MKL_DEBUG_CPU_TYPE 5

If you put my lib in Applications folder you can use this customized environment.plist file to apply the environment variables to be set for the fixes to work.

 

Just put it in your Home / Library / LaunchAgents folder.

environment.plist.zip

  • Like 1
Link to comment
Share on other sites

  • Supervisor
On 6/9/2021 at 10:16 AM, tomnic said:

For sure issues to other non-adobe apps are led by this command:


launchctl setenv DYLD_FORCE_FLAT_NAMESPACE 1

You can undo it by typing (it works for me):


launchctl unsetenv DYLD_FORCE_FLAT_NAMESPACE

 

I found out that if you change libiomp5.dylib you don't need this second "destructive" line of code, injection will work the same.

 

Make me know!

@muifahatry to read here

  • +1 2
Link to comment
Share on other sites

  • tomnic changed the title to [WIP] Photoshop, After Effects CC 2021, Premiere Pro CC 2021 15.4 AMD hackintosh fix
  • fabiosun featured and pinned this topic
  • fabiosun unpinned this topic
  • fabiosun locked this topic
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • There are no registered users currently online
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.