Asus X670E Gene EFI -- Adaptable to Other X670, X670E, B650 and B650E Boards

leesurone

Donator
Donator
AMD OS X Member
Joined
May 6, 2020
Messages
328
Disabeling Thunderbolt/usb4 patch seemed to help, but evening still ended with a crash. So it is something else somewhere...

I tried also install fresh Monterey, but install loops at famous "29 minutes boot loop".
Maybe try this version with Big Sur, I'm doubtful it will help but I'm curious if it boots and provides stability. It's basically the same as yours but with different ACPI files I use on my Asus Hero. It could still easily be your USB Mapping that it causing the crash, not uncommon at all which but you haven't seemed to want to deal with it, of course it could be a hardware issue too but less likely.
 

Attachments

  • EFI-3.zip
    8.5 MB · Views: 9

suur13

New member
AMD OS X Member
Joined
Aug 16, 2021
Messages
29
Thank you for the EFI. As it was it did not boot, but I saw SSDT-CPUR.aml missing and added this. Then it booted. But alone it was not more stable, had 2 quick crashes.
It is not that I do not want to deal with mapping, it is about available time and my own analyze regarding needed pain vs possible gain and it really did not seem like a low hanging fruit. I had USBPorts.kext done and working, altough not maybe not perfect. Also, I had used USBMap before and I know it is diffucult tool to work with. Results in the past were not better than Hackintool USBPorts.kext or even some manually created maps.

Anyway, took the task. Boy, spent some hours and was not easy :)
All things said (file attached) my missing USB2 from front panel still has not shown up and I also lost some USB3 ports in the back. Even they were visible in Detection screen (that reminded why I abandoned USBMap in the past - resulting kext did not correspond what was detected and defined in program).
TBH - I do not care about ports itself, but stability. So far so good, but I have had full day w/o crash before, it needs longer time to judge.

Also, when I booted with my own EFI, USBMap Tool said in Main screen - XHC1 needs renaming (in red letters). When I booted with your EFI, all was green (I did maping with your EFI), so maybe there was some issue with USB controller ?

Yesterday, when I had crash during boot, error mesage was about missing com.apple_iomfb_fdr_loader. Could it be USB related ?
 

Attachments

  • USBMap.kext.zip
    1.8 KB · Views: 1
Last edited:

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,397
You have a significant number of USB ports disabled in your USBMap.kext, maybe this is why you have lost use of the front panel USB2 ports and some of your rear USB3 ports.

You need to be aware that the 15 port limit imposed by Apple is for each USB controller. All native Apple systems work within this limit usually with a max of 2 x USB controllers.

Your MSI board has 4 x USB controllers, none of these exceed the 15 port limit, so you have no logical reason for disabling any of the USB ports in your system.

The following ports have been disabled under each controller.
Screenshot 2024-02-13 at 22.33.31.png XH00 controller
SS01, SS02, SS04 & SS05 all are physical USB3 ports, highlighted in Red box.
HS03 - virtual USB2 port served from physical USB3 port, highlighted in Red box.

Screenshot 2024-02-13 at 22.39.12.png XHC0 controller
HS01, SS01 & SS02 are all disabled and again you have set them as USB3 virtual and physical ports
HS02 is active but is set as physical USB2 (0), which makes no sense seeing as the other three in this controller are set as USB2!

Screenshot 2024-02-13 at 22.41.39.png XHC1 controller
SS01 is disabled as highlighted in Red box.
This controller has a mixed bag of port types associated with the 4 x USB ports, none of which match.

Screenshot 2024-02-13 at 22.41.50.png XHC2 controller
HS01 is disabled, it is the only port under this controller.

If you have worked to keep within the 15 port limit, which I would guess you have, then this is wrong for your system. You don't need to disable any ports to keep within this limit as your system has 4 x USB controllers.

These are the USB ports available on your MSI Pro X670-P WiFi motherboard, with the connector type for each set indicated by the number in brackets, i.e. (3) for USB3.
  • 4x USB 2.0 (Front) - Connector type 'Internal' (255) Does your case have 4 x USB2 physical ports? If not then not all of these internal ports will be needed.
  • 4x USB 3.2 Gen1 Type A (Rear) - Connector type USB3 (3) (4 x virtual USB2 & 4 x physical USB3)
  • 4x USB 3.2 Gen1 Type A (Front) - Connector type USB3 (3) (4 x virtual USB2 & 4 x physical USB3)
  • 2x USB 3.2 Gen2 Type A (Rear) - Connector type USB3 (3) (2 x virtual USB2 & 2 x physical USB3)
  • 1x USB 3.2 Gen2 Type C (Rear) - Connector type Type-c+sw (9) (1 x virtual USB2 & 1 x physical Type-c)
  • 1x USB 3.2 Gen2 Type C (Front) Connector type Type-c (10) (2 x virtual USB2 & 2 x physical Type-c)
  • 1x USB 3.2 Gen2x2 Type C (Rear) - Connector type Type-c+sw (9) (1x virtual USB2 & 1 x physical Type-c)
From experience and reviewing the specifications for your motherboard I would add at the following:
  1. Your motherboard will also have a USB2 (Internal - 255) port connected to the M.2 connector serving the WiFi/BT module. This should be discoverable and set as (255).
  2. Your motherboard doesn't contain any physical USB2 ports, so none of the ports in your USBMap.kext should be set with connector type USB2 (0).
  3. You have 4 UB2 ports served from the internal headers (two headers each serving two ports) Plus the port from the WiFi/BT M.2 connector, meaning you should have a maximum of 5 x ports set with connector type Internal (255).
  4. You have a maximum of 10 physical USB3 ports available, depending on your front case configuration. This means:
    1. you could have 20 x ports set as USB3 (3). These would be made up oas follows:
    2. 10 x physical USB3 ports, plus
    3. 10 x virtual USB2 ports, served from the USB3 physical ports.
    4. All of these virtual and physical ports should be set a USB3 with connector type (3).
  5. You have probably got 2 x Type-C ports that when tested using the flipped device, result in the same port number being highlighted. This would mean they should both be set with connector type 'Type-C Plus Switch' (9). Including the USB2 virtual ports associated with each port, if you included and detected them.
  6. If you use the internal Type-c connector at the front of your case, this is likely to provide a Type-C port connection, where the using the flipped device test results in two different ports being highlighted, depending on which orientation is inserted in the front Type-C port. These should be set with connector type - 'Type-C' (10), including the virtual USB2 ports if you included them in your USBMap.kext.
You need to go back and discover all the ports again, and make sure that the correct Connector Type is associated with each port.
You also need to ensure that you use the option to 'Enable all Populated Ports' this is Option 'P' and the 'Disable all empty ports' option 'D' during the Create & Edit kext phase.
You would also be advised to add details/comments for each port, as it makes life easier when troubleshooting the kext, after you have exported it. This is done by making use of the options at the base of the terminal window, highlighted in Blue box.

Screenshot 2024-02-13 at 23.24.16.png USBMap options during Create and Edit phase.

You can select each port and add a comment, as shown in the example below.
Screenshot 2024-02-13 at 23.26.36.png The Magenta coloured text below each port was added by me, using the custom name option, i.e.C:23:Rear top USB3/2 left.

Hope this gives you some idea of what you need to do to fix your USBMap.kext.
 

leesurone

Donator
Donator
AMD OS X Member
Joined
May 6, 2020
Messages
328
Nice job as usual, very insightful. In your opinion @Edhawk how important is it to map your USB Ports? @suur13 has questioned how necessary it is to be accurate and or if that could possibly cause his system to panic and reboot.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,397
I think that next to installing macOS, the configuration of the system USB ports is the most important part of getting the OS to run correctly. If the USB Ports are misconfigured then you have absolutely no chance of having the system run correctly. Common issues as a result of a defective USB configuration being system not sleeping, instant wake on shutdown, unexpected reboots and random kernel panics.
 

leesurone

Donator
Donator
AMD OS X Member
Joined
May 6, 2020
Messages
328
I think that next to installing macOS, the configuration of the system USB ports is the most important part of getting the OS to run correctly. If the USB Ports are misconfigured then you have absolutely no chance of having the system run correctly. Common issues as a result of a defective USB configuration being system not sleeping, instant wake on shutdown, unexpected reboots and random kernel panics.
I could not agree more, thanks for that.
 

suur13

New member
AMD OS X Member
Joined
Aug 16, 2021
Messages
29
You have a significant number of USB ports disabled in your USBMap.kext
Yes, that is desired. But thank you for your huge effort first !
maybe this is why you have lost use of the front panel USB2 ports
Nope, we come to that
and some of your rear USB3 ports.
That was due my clumsyness working with USBMap and mistakes I made
Your MSI board has 4 x USB controllers, none of these exceed the 15 port limit,
That looks to be not true. Controller XH00 has 15 ports to boot and at least last one, the one after POTF (or HS10 after remapping) do not show up. It does not show up even after I disable some ports before it (like useless POT1 or SS01 after remap). It does not show up even when following USBMap guide at: GitHub - corpnewt/USBMap: Python script for mapping USB ports in macOS and creating a custom injector kext.
between steps 6, 7 and 8 when only 1 port with keyboard is active.
These are the USB ports available on your MSI Pro X670-P WiFi motherboard, with the connector type for each set indicated by the number in brackets, i.e. (3) for USB3.
  • 4x USB 2.0 (Front) - Connector type 'Internal' (255) Does your case have 4 x USB2 physical ports? If not then not all of these internal ports will be needed.
They are connected to XH00 and are needed. Please see above - one port do not show up.
  • 4x USB 3.2 Gen1 Type A (Rear) - Connector type USB3 (3) (4 x virtual USB2 & 4 x physical USB3)
Those are OK now after mapping again.
Because I'm stupid, I'm not completely understand point 6 in USBMap guide above. I messed something up in steps 7 and 8.

Guys - every day you learn something new. SINCE YEARS I have mapped internal usb2 headers as Type 0 (USB2) and virtual usb2 ports connected to actual usb3 port also as Type 0. Actually I even thought that this is whole point of mapping... and my systems so far have been stable with working sleep and everything. That is the reason why I can not at all agree with your very harsh judgement:
"If the USB Ports are misconfigured then you have absolutely no chance of having the system run correctly."
I have well documented, enough and years long proof, that I DO have a chance.

But anyway - corrected now. Thank you.

  • 4x USB 3.2 Gen1 Type A (Front) - Connector type USB3 (3) (4 x virtual USB2 & 4 x physical USB3)
I do not have headers and can not test them. I want them disabled.
  • 2x USB 3.2 Gen2 Type A (Rear) - Connector type USB3 (3) (2 x virtual USB2 & 2 x physical USB3)
Done
  • 1x USB 3.2 Gen2 Type C (Rear) - Connector type Type-c+sw (9) (1 x virtual USB2 & 1 x physical Type-c)
Done
  • 1x USB 3.2 Gen2 Type C (Front) Connector type Type-c (10) (2 x virtual USB2 & 2 x physical Type-c)
Not needed. Disabled.
  • 1x USB 3.2 Gen2x2 Type C (Rear) - Connector type Type-c+sw (9) (1x virtual USB2 & 1 x physical Type-c)
Done.
  1. Your motherboard will also have a USB2 (Internal - 255) port connected to the M.2 connector serving the WiFi/BT module. This should be discoverable and set as (255).
This famous AMD/Mediatek RZ616 does not work with Hackintosh, I have disabled it in BIOS.

Observation:
When booting with USBMapDummy.kext all ports show up as UK** as they should, besides 3 ports in XHC1 show as HS02, HS03 and HS04.
I do not know is that important.
 

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,397
Based on the above answers you should only have ports designated as USB3 (3), Type-C+SW (9) &/or Type-C (10) in your USBMap.kext.
You should not have any ports set as USB2 (0) or Internal (255).

Is that how you have now re-configured your USBMap.kext?

Observation:
When booting with USBMapDummy.kext all ports show up as UK** as they should, besides 3 ports in XHC1 show as HS02, HS03 and HS04.
I do not know is that important.
Cosmetic and not important. As long as they are set with the correct connector type.

Not wanting to use all the ports is a personal choice, just make sure they are not included with the wrong connector type, as that would just cause issues.
 

suur13

New member
AMD OS X Member
Joined
Aug 16, 2021
Messages
29
Based on the above answers you should only have ports designated as USB3 (3), Type-C+SW (9) &/or Type-C (10) in your USBMap.kext.
You should not have any ports set as USB2 (0) or Internal (255).
No.I'm bit confused now. You yourself said:
* 4x USB 2.0 (Front) - Connector type 'Internal' (255)
From those 4 I have 3 available and working, but 1 mysteriously missing (which I do not consider huge issue, I have enough ports...).
4th 255 is the ALC4080
Is that how you have now re-configured your USBMap.kext?
Yes, otherways all good. Thank you a lot !

More stuff :)
In the meantime I managed to install copy of Ventura (previously I failed to install Monterey) in parallel. I did it as kind of stability check and also maybe my Big Sur is corrupted. It works well with SSDT-EC-USBX-DESKTOP.aml from Dortania guide, but does not boot with 2 new SSDT's from post #401
Forget it, it also boots with those 2 aml's. I just copied those 2 entries to my old config.plist and it's OK. Maybe some other difference in this plist file...

But the system is still not stable. Even when using 2 aml's from post 401 and configured USB ports. Usually it crashes under multitasking (doing several things same time) or quite sure crash is when I boot up to desktop, do nothing and let system start doing some background stuff (indexing or whatever it does), I see (using AMD Power Gadget and/or hearing vents spin up and HDD light flashing) CPU load and in 5 mins it crashes.

Also I still see occasionally crash during boot, error message is about missing com.apple_iomfb_fdr_loader.
 
Last edited:

Edhawk

Guru
Guru
Joined
May 2, 2020
Messages
2,397
Try removing AMD Power Gadget app and the AMDRyzenCPUPowerManagement and SMCAMDProcessor sensor kexts, see if that helps. Not only is this app a resource hog, the kexts are also known to cause other issues.

Remove all three items and use the ResetNvramEntry.efi driver from the OC boot screen.
 

suur13

New member
AMD OS X Member
Joined
Aug 16, 2021
Messages
29
Thanks, will try (just in theory, will my rig consume more power w/o it, or ?).

At the moment testing DisableIOMapper = true setting, hint what I read somewhere...
 

suur13

New member
AMD OS X Member
Joined
Aug 16, 2021
Messages
29
DisableIOMapper = true setting seemed to help, but I still had 1 or 2 crashes. But disabeling AMDRyzenCPUPowerManagement and friends really killed the system. Crashes in minutes. I can not explain that, maybe just a coincedence, but for sure it did not help.
There must be something else in my system or config.plist which I'm missing and can not figure out...

I have 2 different windowses, 2 linuxes and now 2 hacks (Big Sur and Ventura) and only MacOS give issues. Completley stable at win/linux.
 

leesurone

Donator
Donator
AMD OS X Member
Joined
May 6, 2020
Messages
328
DisableIOMapper = true setting seemed to help, but I still had 1 or 2 crashes. But disabeling AMDRyzenCPUPowerManagement and friends really killed the system. Crashes in minutes. I can not explain that, maybe just a coincedence, but for sure it did not help.
There must be something else in my system or config.plist which I'm missing and can not figure out...

I have 2 different windowses, 2 linuxes and now 2 hacks (Big Sur and Ventura) and only MacOS give issues. Completley stable at win/linux.
So it crashes while you are using it or does it crash if you leave it and it tries to sleep?
 

suur13

New member
AMD OS X Member
Joined
Aug 16, 2021
Messages
29
No, sleep works well (another reason I'm quite confident that USB ports are correctly defined).

It crashes when idling 5-10 mins (I have sleep set at 1 hour) OR when using it. So both. Does not depend on program - can crash on Safari, Chrome, when playing music or video, even in Finder.

And it is mostly so called "Beachball death". First active program freezes, but for 1 minute still can move my mouse, clock seconds are ticking, if AMDRyzenCPUPowerManagement and Gadget are active, I see temperature changing, but CPU activity does NOT skyrocket... then in 30 sec time Beachball appears and starts spinning, then everything freezes and in few seconds restarts.
 
Last edited:

leesurone

Donator
Donator
AMD OS X Member
Joined
May 6, 2020
Messages
328
No, sleep works well (another reason I'm quite confident that USB ports are correctly defined).

It crashes when idling 5-10 mins (I have sleep set at 1 hour) OR when using it. So both. Does not depend on program - can crash on Safari, Chrome, when playing music or video, even in Finder.
Okay, what brand and type SSD's are you using for Windows, Linux and macOS?
 

suur13

New member
AMD OS X Member
Joined
Aug 16, 2021
Messages
29
Crucial T700
 

suur13

New member
AMD OS X Member
Joined
Aug 16, 2021
Messages
29
Why all ? 1 is enough.
 

leesurone

Donator
Donator
AMD OS X Member
Joined
May 6, 2020
Messages
328

leesurone

Donator
Donator
AMD OS X Member
Joined
May 6, 2020
Messages
328
Last edited:
Back
Top Bottom
  AdBlock Detected
Sure, ad-blocking software does a great job at blocking ads, but it also blocks some useful and important features of our website. For the best possible site experience please take a moment to disable your AdBlocker.