Contribute
Register

<< Solved >> Huananzhi Hackintosh USB problems and optimization

Joined
Jun 14, 2021
Messages
53
Motherboard
Huananzhi X99 F8
CPU
E5 2678 V3
Graphics
RX 580
The USBPorts.kext was already in the Clover folder (kexts/other).
 

Feartech

Moderator
Joined
Aug 3, 2013
Messages
23,327
Motherboard
Asus N752VX-OpenCore
CPU
i7-6700HQ / HM170
Graphics
HD 530 1920 x 1080
Mac
  1. iMac
Mobile Phone
  1. iOS
The USBPorts.kext was already in the Clover folder (kexts/other).
from where though? it is not part of clover, it is made after the user has installed macOS. where did you get this from or did you make this yourself ?
 
Joined
Jun 14, 2021
Messages
53
Motherboard
Huananzhi X99 F8
CPU
E5 2678 V3
Graphics
RX 580
The macOS instalation was done by another person, and now I´m having problems with the USBs (some of them don´t work, some devices don´t work, and each time I restart one device is not recognized).
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
6,586
Motherboard
Gigabyte Z490i Aorus Ultra - OC 0.6.8
CPU
i5-10600K
Graphics
GT710 - 1920x1080
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
Joined
Jun 14, 2021
Messages
53
Motherboard
Huananzhi X99 F8
CPU
E5 2678 V3
Graphics
RX 580
Sure, where are the serial numbers I should delete? I searched for "serial" into the config.plist but there aren´t.
 
Last edited:
Joined
Oct 4, 2018
Messages
157
Motherboard
Gigabyte C246-WU4
CPU
E-2278G
Graphics
WX7100
Mac
  1. MacBook Pro
  2. Mac mini
You should have entries for "BoardSerialNumber", "SerialNumber" and "SmUUID" under "SMBIOS" key. Delete those to avoid that someone with the same board finds your EFI and takes the lazy road of using it as it is, without changing the serial numbers—that would land both of you in trouble when Apple sees two different computers logging in to the App store with the same serial number.

Code:
<key>port-count</key>
               <data>
               FwAAAA==
               </data>

               <key>ports</key>
               <dict>

                   <key>HS01</key>
                   <dict>
                       <key>UsbConnector</key>
                       <integer>10</integer>
                       <key>port</key>
                       <data>
                       AQAAAA==
                       </data>
                   </dict>

"port-count" is the highest port number which will be in use. It may be higher that 15 if some lower numbers are not in use.
Then, each of the HSxx/SSxx keys under "ports" defines an active port with its port number and connection type. HS01 is a USB 2 port but "10" is the type for a type C USB 3 port without a switch (i.e. the physical port uses two logical ports, one when the device is plugged one way, and another port when the device is turned 180°—plus two further logical ports for USB 2 personalities, so such a connector potentially takes up 4 logical ports out of your precious 15!). This plainly cannot be right (especially as your board does not have USB-C at all), so you have to remove the existing USB map (including copies under /System) and do a proper map.

Fortunately, you do not have to understand the plist or write one by hand, as there are tools which can automate the process (Hackintool, or USBMap, which is recommended by OpenCore), but reading the source was very telling.

4 USB3 ports + 1 header = 6 ports, 12 logical
4 USB2 ports + 2 headers = 8 ports, 8 logical
If all are on a single controller from the chipset, if there's no further internal USB device (sound, Blutooth), and all headers are wired, that's 5 too many. Which is easily solved by dropping USB 2 personalities for some USB 3 ports—and then you have to be careful to plug USB 2 devices on USB 2 ports and USB 3 devices on USB 3 ports, but all should work with a proper map.
 
Joined
Jun 14, 2021
Messages
53
Motherboard
Huananzhi X99 F8
CPU
E5 2678 V3
Graphics
RX 580
My USB peripherals are:
  • Audio interface
  • 4 synths with USB 2.0
  • MIDI interface (also works as a 8 port USB 2.0 hub)
  • 7 port USB 3.0 hub (this is the only USB3 thing I have, there are plugged the 4 synths and the MIDI interface, for now)
  • MIDI keyboard (plugged into MIDI interface)
  • MIDI pads (plugged into MIDI interface)
  • MIDI encoders
  • MIDI surface
  • 2x MIDI faders
  • Keyboard and mouse (for now)
  • 2x webcams
  • Another 4 port USB hub.
You can imagine how I´m juggling now with all these to make them work.

Later I´ll continue with the process.
 
Joined
Oct 4, 2018
Messages
157
Motherboard
Gigabyte C246-WU4
CPU
E-2278G
Graphics
WX7100
Mac
  1. MacBook Pro
  2. Mac mini
I see… that artists have very different settings than regular users. :crazy:

As you found out, hackintoshes are hacks. You may save money over a real Mac, but then you spend time setting it and keeping it up instead of just using it.

Set some time aside. Read the guide (again). Remove the old map (everywhere), add USBInjectAll and the port removal patch. Unplug all devices but keyboard and mouse, and then use the USB 3 hub (no device attached) to probe all ports, one by one. Write down all personalities (HSxx/SSxx) and their port number (very important!); make a sketch; use the comments in Hackintool to record which is what ("back USB3 left, top", "header 1", etc.). If some headers are not connected, switch the connectors so you can probe everything at least once instead of guessing.
Make sure that the connector type is set correctly ("0"/"USB 2" for "HS"; "3"/"USB 3" for "SS"). OS X behaves erratically when there is a mismatch.

Then decide what to drop to get down to 15 active ports (per controller!).
I normally drop USB 2 personalities of USB-C and "red" (SS10) USB 3 ports (not applicable in your case), then USB 2 personalities of back USB 3 ports, so I can casually plug anything in the front ports without caring whether it is USB 2 or 3. If some of your audio devices are sensitive to latency and prefer to be attached directly rather than through a hub, you may have to sacrifice USB 3 personalities to have enough USB 2 ports, at risk of having a confusing setup (USB 3 device not seen at all when plugged into certain USB 3 ports) or having to redo a map if you later evolve to use more USB 3 peripherals.

Save the new map, install, remove the port limit removal patch (important!). Reboot, and re-probe everything with the USB 3 hub and Hackintool. If it always show up as expected (USB 2 and/or 3), the map is working correctly. Pat yourself on the back, bring back all of your devices and enjoy. :clap:

In my opinion, the OpenCore process is somewhat easier than the Clover process (just a quirk to set, no USBInjectAll.kext, and then USBMap.command) but switching from Clover to OpenCore would be a major undertaking.
 
Joined
Oct 4, 2018
Messages
157
Motherboard
Gigabyte C246-WU4
CPU
E-2278G
Graphics
WX7100
Mac
  1. MacBook Pro
  2. Mac mini
I´m thinking of buying a Mac Mini but I´ll have to wait for the new M1X/M2 and for some plugins updates before.
Cannot argue with that if you're not tied to Mojave and can work with the limited amount of USB ports that real Macs provide.

How can I know how many USB controllers does this motherboard have? In this link there´s no such info:
Yes, the manufacturer is short on technical details but this question is very easy to answer! Different controllers will show up in Hackintool or IORegistryExplorer with different names: XHC0, XHC1, XHC2, XHCI, PSXM, etc.
I suspect you only have one, which goes by XHC1.
 
Top