Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
Pending updates to the backend by DosDude, I have overridden the patch updater to allow using recent MouSSE versions without warnings as attached below.
  1. Download and extract attached FixPatchUpdate093.zip or FixPatchUpdate095.zip file for the MouSSE version upgrade
    1. This will expand into an OverrideUpdater folder
    2. Navigate into this folder
  2. Copy the myDosDude folder to your Documents folder
    1. This contains an amended version of the updates.plist file from the DosDude server
    2. This file is what is checked by the DosDude Patch Updater and will be hosted locally instead
    3. DosDude uses a SHA1 hash of AAAMouSSE.kext/Contents/MacOS/MouSSE to identify changes and this has been updated here to match the new versions
    4. Also changed cosmetic issue which appears to suggest the patch adds SSE 4.1 support to say SSE 4.2 instead
  3. Open the com.dosdude1.Patch-Updater.plist file in the OverrideUpdater folder using a plist or plaintext editor
    1. This is amended to point to your locally hosted updates.plist file
    2. Add your user name to the indicated location
    3. Save and close
  4. Copy the amended com.dosdude1.Patch-Updater.plist file
  5. Go to ~/Library/Preferences and rename the com.dosdude1.Patch-Updater.plist file there to x-com.dosdude1.Patch-Updater.plist
  6. Paste in the amended com.dosdude1.Patch-Updater.plist file
  7. Reboot and no more messages

If/When DosDude updates things, you can delete the myDosDude folder and the amended com.dosdude1.Patch-Updater.plist file, rename x-com.dosdude1.Patch-Updater.plist file back to com.dosdude1.Patch-Updater.plist and reboot to be back in line ... I would actually just keep mine for flexibility myself.

NOTE:
  • This updates.plist file is for Mojave.
  • If on another OS version, first carry out Steps 1 & 2 then look in ~/Library/Preferences/com.dosdude1.Patch-Updater.plist file for the path to the updates.plist file on DosDude server
  • Navigate to that file, copy the contents and overwrite your ~/Documents/myDosDude/updates.plist file
  • Search for MouSSE and under the patchedFileSums key, change the hex value to:
    • For v093:- 66938b1e0264653d89d649fe2519fd1066919e94
    • For v095:- 112acf92995e1016ee70acf51053f62bec593bfa
  • Continue from Step 3
 

Attachments

  • FixPatchUpdate093.zip
    4 KB · Views: 388
  • FixPatchUpdate095.zip
    4.1 KB · Views: 470
Last edited:

Syncretic

macrumors 6502
Original poster
Apr 22, 2019
311
1,533
I forgot to throw this out there: I've found that on my installation of Catalina 15.4, MouSSE is not required for the AMD drivers (I have run normal operations for long periods with MouSSE not installed). I don't know if this is somehow unique to my system, or if Apple/AMD have re-worked the drivers (AMDMTLBronzeDriver.bundle still contains a PCMPGTQ instruction, but it never seems to execute under 15.4), or if something else is afoot. Catalina 15.0-15.3 definitely required MouSSE. (And, needless to say, there's no way to know if this will persist into the future; 15.5+ might go back to using PCMPGTQ - or worse.)

Can anyone else with a MP3,1/AMD GPU/Catalina 15.4 confirm this to be the case (i.e. unload MouSSE and see if Catalina 15.4 works without it)?
 
  • Like
Reactions: Prophet96ix

vit9696

macrumors member
Jun 4, 2014
50
147
Syncretic, out of curiosity, did you try investigating what is going on with com.apple.telemetry? Last time I checked it did not directly use any SSE4.2 instructions.
 

Syncretic

macrumors 6502
Original poster
Apr 22, 2019
311
1,533
Syncretic, out of curiosity, did you try investigating what is going on with com.apple.telemetry? Last time I checked it did not directly use any SSE4.2 instructions.
I didn't see any SSE4.2 instructions in its execution path, either. Telemetry isn't high on my priority list, but I did make a Telemetry blocker kext (telemetrap) that @jackluke incorporated into one or more of his packages. Search the forum for telemetrap.kext to find his related posts.
 

vit9696

macrumors member
Jun 4, 2014
50
147
Ah, so you use a MAC policy to prevent its exec? Quite clever. Is that the latest version? I attached it here, so that our people could also download it not just for Macs, ideally there is a thread for it here though.
 

Attachments

  • telemetrap-0.22.zip
    11.3 KB · Views: 5,448

Svenisak

macrumors newbie
Jul 11, 2011
20
4
I see what may be a problem. The dosdude1 Catalina installer appears to automatically install the "Legacy Video Card Patch"! I'm told that the MouSSE patch won't work when this is installed. How do we get around this?
 

Syncretic

macrumors 6502
Original poster
Apr 22, 2019
311
1,533
I see what may be a problem. The dosdude1 Catalina installer appears to automatically install the "Legacy Video Card Patch"! I'm told that the MouSSE patch won't work when this is installed. How do we get around this?
It's not that MouSSE won't work, it's that the Legacy Video Patch breaks acceleration on (all? most?) Metal graphics cards (as the name implies, it's intended for older, non-Metal cards).

I haven't reinstalled in a while, so my memory is hazy - perhaps @dosdude1 or someone with more recent patcher experience can chime in. During install, the patcher will determine what sort of system you have (e.g. MP3,1), then choose what it thinks are the best patches for your system. The older patcher versions presented this as a checklist, and you could choose which ones got applied. As I recall, the newer patchers do this silently (probably to avoid user confusion), and you have to go to the menu bar and choose something to get that checklist - and from there, prior to installation, you can choose which post-install patches will get applied. At that point, un-check the Legacy Video patch, and it won't get installed. (If you already have that patch installed, I'm pretty sure you'll need to reinstall MacOS to get rid of it - the patcher doesn't provide a way to uninstall that particular patch.)

Basically, before hitting "Install", look for an option to choose which patches to apply, and un-check the Legacy Video patch.
 

Svenisak

macrumors newbie
Jul 11, 2011
20
4
Syncretic. You remember correctly. So, changing the settings of the "macOS Post Install" before installing the OS should prevent the "Legacy Video Card Patch" from installing? I will definitely try that. Thanks.
 

dosdude1

macrumors 68030
Feb 16, 2012
2,779
7,413
Syncretic. You remember correctly. So, changing the settings of the "macOS Post Install" before installing the OS should prevent the "Legacy Video Card Patch" from installing? I will definitely try that. Thanks.
Legacy Video Card Patch is NEVER installed by default on any Mac Pro. Re-install the OS, and the Legacy Video Card Patch will be removed.
 

Syncretic

macrumors 6502
Original poster
Apr 22, 2019
311
1,533
Minor bug fix, new version is v0.93 (attached to first post in this thread). Since (1) this bug didn't affect the AMD drivers, and (2) normal testing didn't expose it, I consider this a low-priority update (basically, update at your leisure, or don't even bother, unless you have a particular issue).
Tagging @dosdude1 and @0403979 so they'll know to update their respective patchers whenever they see fit. (Again, there should be no real urgency here.)
 

Martain

macrumors newbie
Jun 12, 2020
2
0
Just wondering: Would this technique also be valid for the AMD hackintosh scene and more specific for the Intel instructions the AMD Ryzen processors are lacking? Some apps on catalina and more specific apps created with a certain type of Intel compiler for mac crash on AMD with a specific intel fast memset error (see log here: https://pastebin.com/Sa3a2hU9)
 

joevt

macrumors 604
Jun 21, 2012
6,971
4,262
Just wondering: Would this technique also be valid for the AMD hackintosh scene and more specific for the Intel instructions the AMD Ryzen processors are lacking? Some apps on catalina and more specific apps created with a certain type of Intel compiler for mac crash on AMD with a specific intel fast memset error (see log here: https://pastebin.com/Sa3a2hU9)
That log shows a recursion problem. The _intel_fast_memset.A is calling itself 512 times then the stack guard catches the problem before the computer can blow up. Examining the function might give a clue to what's wrong with it. A disassembly is required (using otool or Hopper.app or whatever that will show the instructions).

You can install Waves Central.app, and sign up for a free trial of the Z-Noize add on. Then look at the GenericMacIntel.dylib.
Code:
void __intel_fast_memset(int arg0, int arg1) {
    rsi = arg1;
    rdi = arg0;
    rsp = rsp - 0x8;
    rax = ___intel_cpu_feature_indicator;
    goto loc_21cf2;

loc_21cf2:
    if ((*rax & 0x7189d97ff) != 0x7189d97ff) goto loc_21d06;

loc_21cfd:
    __intel_fast_memset.Z();
    return;

loc_21d06:
    if ((*(int32_t *)rax & 0x9d97ff) != 0x9d97ff) goto loc_21d22;

loc_21d19:
    __intel_fast_memset.V();
    return;

loc_21d22:
    if ((*(int8_t *)rax & 0x7f) != 0x7f) goto loc_21d38;

loc_21d2f:
    __intel_fast_memset.J();
    return;

loc_21d38:
    if ((*(int8_t *)rax & 0x1) == 0x0) goto loc_21d46;

loc_21d3d:
    __intel_fast_memset.A(rdi, rsi);
    return;

loc_21d46:
    rax = ___intel_cpu_features_init();
    goto loc_21cf2;
}

It looks like __intel_cpu_feature_indicator has in invalid value which causes __intel_fast_memset.A to be called (which just calls __intel_fast_memset again).
__intel_cpu_feature_indicator is set by __intel_cpu_features_init which is some complicated thing that does a lot of stuff with the "cpuid" assembly instruction result and sysctlbyname of the following:

sysctlbyname("hw.optional.avx512f",
sysctlbyname("hw.optional.avx512cd",
sysctlbyname("hw.optional.avx512dq",
sysctlbyname("hw.optional.avx512bw",
sysctlbyname("hw.optional.avx512vl",
sysctlbyname("hw.optional.avx512ifma",
sysctlbyname("hw.optional.avx512vbmi",

You can look at the sysctl stuff by using sysctl hw.optional in Terminal.app. Note that this SSE4.2 emulator does not set any flags including "hw.optional.sse4_2"

Since the problem is not caused by an illegal instruction, the MouSSE method is not the way to fix this. Maybe Lilu.kext and a patch to the GenericMacIntel.dylib would work. That would only fix the one plugin though. Or maybe, since intel_cpu_features_init is a generic Intel library function, all occurrences can be patched in the same way.

There's a document at https://tfetimes.com/wp-content/uploads/2015/04/optimizing_cpp.pdf which describes __intel_cpu_features_init. It says that __intel_cpu_features_init_x should be called for non-Intel CPUs. The document has a download link to some source code describing a patch.
http://www.agner.org/optimize/asmlib.zip (decompress the included zips inside the zip, then look at intel_cpu_feature_patch.c ). I don't know if this patch will fix AMD compatibility though.

More info at https://www.agner.org/optimize
 
  • Like
Reactions: XLNC and Martain

Martain

macrumors newbie
Jun 12, 2020
2
0
That log shows a recursion problem. The _intel_fast_memset.A is calling itself 512 times then the stack guard catches the problem before the computer can blow up. Examining the function might give a clue to what's wrong with it. A disassembly is required (using otool or Hopper.app or whatever that will show the instructions).

You can install Waves Central.app, and sign up for a free trial of the Z-Noize add on. Then look at the GenericMacIntel.dylib.
Code:
void __intel_fast_memset(int arg0, int arg1) {
    rsi = arg1;
    rdi = arg0;
    rsp = rsp - 0x8;
    rax = ___intel_cpu_feature_indicator;
    goto loc_21cf2;

loc_21cf2:
    if ((*rax & 0x7189d97ff) != 0x7189d97ff) goto loc_21d06;

loc_21cfd:
    __intel_fast_memset.Z();
    return;

loc_21d06:
    if ((*(int32_t *)rax & 0x9d97ff) != 0x9d97ff) goto loc_21d22;

loc_21d19:
    __intel_fast_memset.V();
    return;

loc_21d22:
    if ((*(int8_t *)rax & 0x7f) != 0x7f) goto loc_21d38;

loc_21d2f:
    __intel_fast_memset.J();
    return;

loc_21d38:
    if ((*(int8_t *)rax & 0x1) == 0x0) goto loc_21d46;

loc_21d3d:
    __intel_fast_memset.A(rdi, rsi);
    return;

loc_21d46:
    rax = ___intel_cpu_features_init();
    goto loc_21cf2;
}

It looks like __intel_cpu_feature_indicator has in invalid value which causes __intel_fast_memset.A to be called (which just calls __intel_fast_memset again).
__intel_cpu_feature_indicator is set by __intel_cpu_features_init which is some complicated thing that does a lot of stuff with the "cpuid" assembly instruction result and sysctlbyname of the following:

sysctlbyname("hw.optional.avx512f",
sysctlbyname("hw.optional.avx512cd",
sysctlbyname("hw.optional.avx512dq",
sysctlbyname("hw.optional.avx512bw",
sysctlbyname("hw.optional.avx512vl",
sysctlbyname("hw.optional.avx512ifma",
sysctlbyname("hw.optional.avx512vbmi",

You can look at the sysctl stuff by using sysctl hw.optional in Terminal.app. Note that this SSE4.2 emulator does not set any flags including "hw.optional.sse4_2"

Since the problem is not caused by an illegal instruction, the MouSSE method is not the way to fix this. Maybe Lilu.kext and a patch to the GenericMacIntel.dylib would work. That would only fix the one plugin though. Or maybe, since intel_cpu_features_init is a generic Intel library function, all occurrences can be patched in the same way.

There's a document at https://tfetimes.com/wp-content/uploads/2015/04/optimizing_cpp.pdf which describes __intel_cpu_features_init. It says that __intel_cpu_features_init_x should be called for non-Intel CPUs. The document has a download link to some source code describing a patch.
http://www.agner.org/optimize/asmlib.zip (decompress the included zips inside the zip, then look at intel_cpu_feature_patch.c ). I don't know if this patch will fix AMD compatibility though.

More info at https://www.agner.org/optimize
This looks very promising! Thank you for the detailed description! Greatly appreciated. Sadly my technical knowledge is too limited to actually do something with this information, even though i know code, i have no idea how kext development on osx works. Do you have any idea how to proceed? Any devs here that might have a crack at this? It would benefit the AMD OSX scene greatly and would be worth a donation from my side.

I could certainly help with testing and will give a crack at running with a disassembler and report back.
 

theritz

macrumors newbie
Aug 10, 2020
4
0
@Syncretic I am trying desperately to get Catalina to run on a 3,1 with AMD RX550 (device code 0x67ff). DosDude1's Mojave runs on it no problem, didn't need to do anything additional to get that working. I spoofed the 3,1 as an iMac Pro 2017 and was able to install Catalina on it. Now I am still lacking SSE 4.2. Catalina boots up until about 66% and then the screen goes dark and a reboot is done. I think I am an idiot and not installing MouSSE properly. Tried putting it on the exact location you indicated in the OT but no luck. Also tried to be creative and put it in /Volumes/EFI/EFI/OC/Kexts and put this in the config.plist under the kernel array:

<dict>
<key>BundlePath</key>
<string>AAAMouSSE.kext</string>
<key>Comment</key>
<string>MouSSE 0.93</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/MouSSE</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>

..but no joy yet.

I am doing something wrong no doubt.
 

LuisN

macrumors 6502a
Mar 30, 2013
738
688
Torres Vedras, Portugal
@Syncretic I am trying desperately to get Catalina to run on a 3,1 with AMD RX550 (device code 0x67ff). DosDude1's Mojave runs on it no problem, didn't need to do anything additional to get that working. I spoofed the 3,1 as an iMac Pro 2017 and was able to install Catalina on it. Now I am still lacking SSE 4.2. Catalina boots up until about 66% and then the screen goes dark and a reboot is done. I think I am an idiot and not installing MouSSE properly. Tried putting it on the exact location you indicated in the OT but no luck. Also tried to be creative and put it in /Volumes/EFI/EFI/OC/Kexts and put this in the config.plist under the kernel array:



..but no joy yet.

I am doing something wrong no doubt.
Why don't you use dosdude1 installer for Catalina? I almost sure it will install mousse just like the Mojave one.
 
  • Like
Reactions: Otis White

Otis White

macrumors newbie
Jun 29, 2020
5
3
Somewhere in Texas
@theritz You should try @Dayo’s boot manager. The Boot EFI by reFind will load Catalina w/o OC and it boots up Catalina just fine. You can put the kext in the kext folder under Catalina and it should load it if you use the DOSDUDE patcher & force rebuild the cache. It worked for me.
 

theritz

macrumors newbie
Aug 10, 2020
4
0
That's right. I am doing it the hard way. By now I am less and less sure why though :) Mainly because I think it should be working eventually.
@Otis White I have OC running now and don't want to be messing about removing it, installing reFind etc
By now I also figured out my OC 0.6 has MouSSE 0.92 and that has the SSE 4.2 instructions needed to run Catalina in it already. So no need to get 0.93 running. SSE 4.2 emulation cannot be my problem.
So not sure what is ...
 

Dayo

macrumors 68020
Dec 21, 2018
2,257
1,279
That's right. I am doing it the hard way ... Mainly because I think it should be working eventually.
How did you pull the spoofing thing off to install Catalina in the first place? I presume this was using the OpenCore VM Spoofing.

I only ask because all the forum experts say this can't be done on a 3,1. Also, I read somewhere else that the 3,1 CPU just doesn't have the Hypervisor Capability needed to leverage this feature which seemed to confirm what they said.
 
Last edited:

theritz

macrumors newbie
Aug 10, 2020
4
0
@Dayo Yeah, I did that with OC. It should also have the necessary SSE 4.2 instructions but I cannot get Catalina booting fully, just a bit. Which isn't enough obviously :)
So I decided to stop messing about and just go for the DosDude1 Catalina Patcher. Installed it already but unfortunately when I now try to install the post-installation things using the patcher, the patcher doesn't start any more. Another issue. Maybe my 3,1 has some other issue that intermittently messes up my efforts. I lost the will to look into it tbh. Maybe tomorrow :)
 

jon66

macrumors newbie
Apr 11, 2014
12
0
Hi:
Is there any chance to run Mojave-Catalina on a MacBook Pro 8.2 without disable AMD Radeon HD 6750M 1024 MB?
Thanks!
 

tsialex

Contributor
Jun 13, 2016
13,461
13,611
Hi:
Is there any chance to run Mojave-Catalina on a MacBook Pro 8.2 without disable AMD Radeon HD 6750M 1024 MB?
Thanks!
This question has nothing to do with SSE4.2 emulation, your MBP i5/i7 CPU supports it.

Your GPU is not compatible with any macOS release after High Sierra, btw. Ask for details on the Mojave unsupported thread:

 
  • Like
Reactions: Ludacrisvp

cloober2099

macrumors newbie
Oct 15, 2020
6
0
I forgot to throw this out there: I've found that on my installation of Catalina 15.4, MouSSE is not required for the AMD drivers (I have run normal operations for long periods with MouSSE not installed). I don't know if this is somehow unique to my system, or if Apple/AMD have re-worked the drivers (AMDMTLBronzeDriver.bundle still contains a PCMPGTQ instruction, but it never seems to execute under 15.4), or if something else is afoot. Catalina 15.0-15.3 definitely required MouSSE. (And, needless to say, there's no way to know if this will persist into the future; 15.5+ might go back to using PCMPGTQ - or worse.)

Can anyone else with a MP3,1/AMD GPU/Catalina 15.4 confirm this to be the case (i.e. unload MouSSE and see if Catalina 15.4 works without it)?

Hello Syncretic:

I trust you are well. Am I understanding that by downloading your patch I can now install Radeon Cards into my Macpro 3,1 running Mojave without a problem? If so, do I just download your script first, remove my old card, install the new card, and then restart my computer?

Please advise when you have a moment.

Thank you.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.