Contribute
Register

XHC USB Kext Creation Guideline

Status
Not open for further replies.

kgp

Retired
Joined
May 30, 2014
Messages
6,783
Motherboard
ASUS WS X299 Sage 10G
CPU
i9-7980XE
Graphics
Vega 64
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. iOS
I'm sorry for being unclear.

The guide says "especially as you will subsequently distribute your board-specific XHC USB Kext to the community". So I assumed there was a repository of some sort in place, where kexts could be shared with the community.

Well I collected some kexts indeed. However a XHC USB kext for the Gigabyte Z97-D3H was not part of it. As with 10.13 SU, AppleIntelPCHPMC and the working port limit patch, all USB ports on X299 motherboards also have been implemented by macOS without any XHC USB kext, I outsourced the respective XHC USB kext creation guideline to this thread, as previously it was part direct part of my X299 main guide. I did not totally drop it, as it is also very useful and works for any other motherboard model and brand different from X299 or ASUS.

Now with the failing USB port limit patch approach under 10.14.1, the XHC USB kexts again becomes deemed necessary. If there does not popup any solution for the failing USB port limit patch in the near future, gathering a collection of board-specific XHC USB kexts again gains in importance.

You can be the first one contributing with a XHC USB kext for the Gigabyte Z97-D3H ;)..

The XHC USB kext approach is not easer or more complicated than the USBInjextAll + SSDT approach, and bases and the same technical background and principles.

Thus, studying my XHC USB kext creation guideline might be of help, even though you finally decide to remain with the USBInjextAll + SSDT approach.

I would just give it a try. You will see that it is not difficult at all as soon you are familiar with it. And you just need one kext, which subsequently is very flexible and adaptable.
 
Joined
Sep 23, 2012
Messages
35
Motherboard
ASRock Z370 Pro4
CPU
i7-8700K
Graphics
Sapphire Nitro+ RX 5700 XT
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. iOS
You can be the first one contributing with a XHC USB kext for the Gigabyte Z97-D3H
All right. I'll give it a try.
 
  • Like
Reactions: kgp
Joined
Sep 23, 2012
Messages
35
Motherboard
ASRock Z370 Pro4
CPU
i7-8700K
Graphics
Sapphire Nitro+ RX 5700 XT
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. iOS
You can be the first one contributing with a XHC USB kext for the Gigabyte Z97-D3H ;)..

I think I'm stuck at raising the port limit. IOService shows me HS01-HS14 and SS01, but it does not show SS02-SS06. My guess is that the port number limit needs to be increased from 15 to 20, but although I've been googling this for the past 45 minutes, I can't figure out what to do about the port number limit. Where should I look?

I have macOS Mojave 10.14.1 and my system definition is iMac 18,1.
 

kgp

Retired
Joined
May 30, 2014
Messages
6,783
Motherboard
ASUS WS X299 Sage 10G
CPU
i9-7980XE
Graphics
Vega 64
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. iOS
I think I'm stuck at raising the port limit. IOService shows me HS01-HS14 and SS01, but it does not show SS02-SS06. My guess is that the port number limit needs to be increased from 15 to 20, but although I've been googling this for the past 45 minutes, I can't figure out what to do about the port number limit. Where should I look?

I have macOS Mojave 10.14.1 and my system definition is iMac 18,1.

The problem is definitely 10.14.1.. Can you downgrade to 10.14.0 and use the respective working port limit patch?
 
Joined
Sep 23, 2012
Messages
35
Motherboard
ASRock Z370 Pro4
CPU
i7-8700K
Graphics
Sapphire Nitro+ RX 5700 XT
Mac
  1. MacBook Pro
  2. Mac mini
Mobile Phone
  1. iOS
The problem is definitely 10.14.1.. Can you downgrade to 10.14.0 and use the respective working port limit patch?
I copied my EFI folder to a spare SSD I have and did a clean install of macOS Mojave 10.14. In macOS Mojave 10.14 all the ports (HS01-HS14 and SS01-SS06) are available in IOService. I haven't had time to run benchmark test on the USB3 ports yet, though. I'd prefer to wait until there is a port limit fix for macOS Mojave 10.14.1.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,728
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
I think I'm stuck at raising the port limit. IOService shows me HS01-HS14 and SS01, but it does not show SS02-SS06. My guess is that the port number limit needs to be increased from 15 to 20, but although I've been googling this for the past 45 minutes, I can't figure out what to do about the port number limit. Where should I look?

I have macOS Mojave 10.14.1 and my system definition is iMac 18,1.
The problem is definitely 10.14.1.. Can you downgrade to 10.14.0 and use the respective working port limit patch?
I copied my EFI folder to a spare SSD I have and did a clean install of macOS Mojave 10.14. In macOS Mojave 10.14 all the ports (HS01-HS14 and SS01-SS06) are available in IOService. I haven't had time to run benchmark test on the USB3 ports yet, though. I'd prefer to wait until there is a port limit fix for macOS Mojave 10.14.1.

No need for the port limit patch.
Read here:
https://www.tonymacx86.com/threads/guide-creating-a-custom-ssdt-for-usbinjectall-kext.211311/
 

kgp

Retired
Joined
May 30, 2014
Messages
6,783
Motherboard
ASUS WS X299 Sage 10G
CPU
i9-7980XE
Graphics
Vega 64
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. iOS

@RehabMan ,

the port limit patch would be just required for the initial XHC USB kext creation. That's why I suggested to create the XHC USB kext under 10.14.0 or 10.13.6. One can then subsequently drop specific ports from the kext to stay within the 15 port limit and of course subsequently use the truncated kext under 10.14.1 without any necessity for a USB port limit patch. I guess no difference to your SSDT approach.

No idea if you even read my initial post #19 of the current discussion, or if you also followed the previous conversation with @kukuluku in the other thread, as your current quotations do not represent the entire story and could be easily interpreted in a totally wrong way...

Disadvantage of dropping ports: Not all onboard USB connectors can be implemented without the port limit patch. E.g. on the ASUS Prime X299 Deluxe all 14 HS and 6 SS ports are assigned to onboard USB connectors.

Code:
 Internal Connectors - Frontpanel: 4x USB 3.0

     2x USB 3.1 Gen1

left                                     right

U31G1-56                            U31G1-78

HS01@14100000                HS02@14200000

SS1@14d00000                  SS2@14e00000

+++++++
[/COLOR]

     2x USB 3.1 Gen1

left                                     right

U31G1-12                            U31G1-34

HS03@14300000                HS04@14400000

SS3@14f00000                  SS4@15000000

+++++++

Internal Connectors -  Frontpanel: 2x USB 2.0

                  USB78

HS08@14800000  HS07@14700000

+++++++

       Back-Panel, 1st row at the top: 2x USB 3.0

                USB 3.1 Gen 1
 
port E2_5                                         port  E2_5

HS06@14600000                      HS06@14600000

SS6@15200000                        SS6@15200000
+++++++

       Back-Panel, 2nd row from top: 2x USB 3.0

                USB 3.1 Gen 1
 
port E34                                         port E34

H05@14500000                     H06@14600000

SS5@15100000                     S6@15200000

+++++++

       Back-Panel, 3rd row from top:  4x USB 2.0  ports 9-12

port 9                          port10                          port11                        port12

HS12@14c000000     HS11@14b00000       HS10@14a00000      HS09@14900000
+++++++

2x Internal USB 2.0

port 13                       port 14

HS13@14d000000.      HS14@14e000000

You need to drop 5 ports from the kext to stay within the 15 port limit. Which ports to drop is up to the user's taste. One usually would drop one out of two internal USB3.0 connectors (2x HS port and 2x SS ports) as well as one USB2.0 connector (1x HS port). Such truncated 15-port XHC USB kexts are now attached to my X99 and X299 Mojave guides and work flawless without any port limit patch under 10.14.1. See e.g. Section E.4) of https://www.tonymacx86.com/threads/...ful-build-extended-guide.255082/#post-1769074.

One question though: Internal USB3.0 connectors usually have 2x HS ports and 2x SS ports assigned. If you just drop the two assigned HS ports from the kext but you leave the two SS ports implemented, the respective USB3.0 connector continues working with USB3.0 devices, but just fails with USB2.0 devices? Did not check this yet as up to now there was no need to truncate the kext at all.

Edit: Initially I implemented a link to the wrong guide. I now updated the link above, which now correctly directs to my X299 Mojave guide (see Section E.4 of this latter guide).
 
Last edited:

kgp

Retired
Joined
May 30, 2014
Messages
6,783
Motherboard
ASUS WS X299 Sage 10G
CPU
i9-7980XE
Graphics
Vega 64
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. iOS
Just a quick question, is Xcode really required or plist editor enough? Will dive into this guideline and try to fix my USB issue.

Just install Xcode via the Appstore and also add Command Line Tools with the following terminal command:

Code:
xcode-select --install
 

kgp

Retired
Joined
May 30, 2014
Messages
6,783
Motherboard
ASUS WS X299 Sage 10G
CPU
i9-7980XE
Graphics
Vega 64
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. iOS
I copied my EFI folder to a spare SSD I have and did a clean install of macOS Mojave 10.14. In macOS Mojave 10.14 all the ports (HS01-HS14 and SS01-SS06) are available in IOService. I haven't had time to run benchmark test on the USB3 ports yet, though. I'd prefer to wait until there is a port limit fix for macOS Mojave 10.14.1.

@kukuluku,

I guess there is a basic misunderstanding.

Once you created your complete XHC USB kext under 10.14.0, you should drop some ports from the kext to stay within the 15-port limit. See e.g. respective approach detailed in Section E.4) of https://www.tonymacx86.com/threads/...ful-build-extended-guide.255082/#post-1769074.

Once you have a truncated 15-port XHC USB kext for your particular motherboard, you can use it of course also under 10.14.1 without any need for a port limit patch.

I suggested to downgrade to 10.14.0 or 10.13.6 only for the initial XHC USB kext creation. I never said that you have to remain with 10.14.0 after having a truncated 15-port XHC USB kext available for your particular mainboard. The latter will of course properly implement all non-truncated USB connectors, which will work just flawless also under 10.14.1 without any further need of a port limit patch. Only disadvantage: the truncated connectors will not be functional or only partly functional, depending on the port truncation applied.

Edit: Initially I implemented a link to the wrong guide. I now updated the link above, which now correctly directs you to my X299 Mojave guide (see Section E.4 of this latter guide).
 
Last edited:
Status
Not open for further replies.
Top