Contribute
Register

[HOW TO] USB ports map for macOS with USBToolBox

Humm then my hypothesis is to be discarded. Are your USBC ports with or without switches ?

I'll look into it a bit better when I have more time (after the week-end) But I advise you to make proper and clear names for all the ports, it will help you greatly and it will be clearer for everyone trying to help (cf. my picture with the blue names).
Yes, they are all type-c with switch. I did the mapping several times to be sure. Mostly because I'm using Raptor Lake and I want to make sure that the problem of system hangs after the second sleep is not caused by incorrect USB mapping. Thanks for the advice
 
Last edited:
Having the USB 2.0 and USB 3.0 personalities on different controllers isn't that unusual. That is how it's configured on my X1 Extreme (3.0 is on the thundebolt controller, 2.0 on the internal usb controller). Not entirely sure why OEMs have this companion port setup. Something similar was done though with EHC and XHC controllers on older systems.
 
From my experience, the Chipsets that have less than 15 ports do not need to be included in the Map.
First: chipsets are all independent. It is 15 max for any. NO More. If less they do not need to be mapped.

Second: Under most conditions you will not see secondary chipsets in Hackintool but if they are recognized by a built-in OS Kext they will most likely work. Asmedia and Intel for-sure.

Third: if you are using the Toolbox in Windows you will note the ports start sequentially, However HS01 for the Mac OS will start at THE FIRST PORT OF THE CHIPSET THAT HAS 26 TOTAL PORTS. So if the first 4 are Thunderbolt or Super Speed, port 5 is HS01 in IOreg.
Normally there a 10 SSXX ports. From 26 backward, Ports 16 through 26 start SS01 to SS10. Ports 14 and 15 are Internal and normally are disabled. So 1 through 10 (5 through 14) are HS01 through HS10 and normally show as companions in the ToolBox screen. Ports 11 through 13 are usually assigned to RGB light, a USB 2.0 hub, and or internal Bluetooth from a WIFI slot. (normally these are 255). [The outside number is the TOOLBOX designation for Disabling, Port designation Type, and Port Comments on location, the inside number after the word PORT is where HS01 through SS10 start and end from the 26 total ports shown.]

Forth: the only accurate way to see what is installed and working on the board as far as USB is concerned is in Windows. The Mac OS will ignore a chipset(s) it does not have a built-in Kernel Extension for. This can be seen clearly in IOreg with what the OS is naming each port. Since the created Kext from the Tool does not use the Mac OS naming nomenclature it has to have the companion Kext to work properly. However, if you compare the created Kext against a Hackintool Created USB Port kext in ProperTree you can see that you can easily rename ports with the Mac OS HSXX and SSXX nomenclature. This will then become a Smbios centric Kext as the lines that are missing and or need corrections must be added in. I have done this and it works. (You do not use the companion USBToolBox kext when you change to this naming method).[UTBMap.kext]

Further, in the settings of the ToolBox I believe you can change to this Mac OS naming process before creating the Kext, but I have not checked how and what it creates when the Tool's setting is changed from its normal default which is not the HSxx, SSxx method Hackintool uses.
Also if you turn off binding you can disable slower companion ports to get to Magic 15 if needed, if you leave it on it will disable the entire port pair, (HS05 and SS05) as an example. This will block a slow flash drive from being seen if only the fast portion of the companion set is left enabled.
 
Last edited:
btw, I checked a kext creation with Mac OS nomenclature You must enter Smbios to create when this setting enabled.

However, Port numbering is wrong! if you blocked HS01 thru HS04 it still lists HS05 AS HS01 sequentially from that point, and if no port numbers are selected in secondary controllers it asks if you want to ignore in Map or Disable.
 
Look in the settings:
settings.jpg

If you enter C you will enter settings window:
settings 2.jpg

Entering N will toggle N setting On of off. This will change to Apple Classes. However, the numbering will need to be adjusted/corrected. You should open a Hackintoool-created USB port Kext by using Propertree to see correct numbering and Smbios entries. This is can be done on a Mac or in Windows. You must use show package contents to get to the Kext's info.plist on a Mac and then open the Plist with Propertree. It will be in the Contents folder. In Windows open Kext/Contents to get to plist file. Here is an example of my ports for my MSI MPG Z490 GAMING PLUS BOARD: (You will note My enabled ports should be as follows: HS01,02,05,06,09,10,12,13. SS01, WHICH IS 17. SS02,03,04,05,06,09.)
PORTS 1.jpg

PORTS 2.jpg

The next window will appear on a Windows machine where you enter your system identifier in my case: iMac 20,2
1675787979975.png

this window will appear next:
1675788093684.png

The created Kext with the N setting looks like this:
Here is a portion of the created USBMap.kext with the N setting on: You will note my enabled ports from above:HS01,02,05,06,09,10,12,13. SS01, WHICH IS 17. SS02,03,04,05,06,09.) The numbering error starts at HS03 as I do not have HS03 and HS04 enabled. Also, Comments have # which disables, which is not used in the Hackintool version as comments are just for the creator's reference in the Kext.
1675788749315.png
 
Last edited:
@dasboot5
Excellent explanation.
@Bergier3K
Don’t forget that in this way the info.plist of the kext includes the SMBIOS model, so it must be updated if you try a different SMBIOS. This is not needed when using USBToolBox.
 
@miliuco Yes, the fact that windows nomenclature with the 2 kexts is not SMBIOS dependent was quite compelling.

@dasboot5 Thanx for the detailed explanations ! I had entirely missed that option, guess I'm reading too fast. I might try that also, see how it behaves. Do you know why the port count of the kext (yours is 19, mine is 18) is not 15? I counted the activated ports in my kext and of course it is 15, not 18... (Unless port-count = 19000000 or 18000000 doesn't mean 19 or 18...).

If I understand correctly I could choose to ignore my 4 tb ports for this kext because they are under another controller and only 4. Macos will take care of that on its own ?
 
1st, I am not a coder.
Comparing IOKitPersonalities with a Headsoft version against a USBToolBox.map version:
1. The XHC line is missing the Smbios value iMac20,1- before it
2. It should have 8 key/value pairs, not 6
3. CF bundle and IO class should have "properties" replacing Nub in the Value column
4. Keys under XHC should be CFBundleIdentifier, IOClass,IONameMatch,IOPCIPrimaryMatch, IOProbeScore, IOProviderClass then IOProviderMergeProperties (with the power USB power sibling lines that are missing not part of the 8 key count) and finishing with model the 8th key.
5. Port count is the last port (value) in the ports key list. But since the port numbering is wrong the value 19000000 may not be not correct if the Apple port name is incorrect, based on Headsoft's version. In my example, SS07 should really be SS09 and that port value should be 19000000 which I believe is a hexadecimal value for SS09. IOreg may contain the proper port values to check for correctness. (or you would need to use Hackintool)
6. Under each port the "name" key is missing in the ToolBox kext. Headsoft's keys are Comment, UsbConnector, name, and port; 4key/value pairs, vs 3.

If the MacOS recognizes the Controller with a built-in kext then yes. It does not need to be mapped.
If I understand correctly I could choose to ignore my 4 tb ports for this kext because they are under another controller and only 4. Macos will take care of that on its own ?
 
Back
Top