Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Hi @RehabMan,
Attached is the files you ask for problem reporting.

* ISSUE:

All the USB 3.0 'SS' ports are operating at slow speed
With USB 3.0 HDD enclosure, its 70mb / sec in linux and windows
...Here on MacOS its 14 MB/sec

BTW I only have this one USB 3.0 device to test with. So unfortunately cannot cross-check with other USB devices. But from reading PierAlpha’s blog post comments theres other guys reporting the same issue. It happens on recent version(s) of Sierra, since September 2016.

Here:
======
[EDIT] Noticed that if you have browser text zoomed, then these links do not go to the correct places in the comments. So make sure your 'browser zoom' is set to 100%. You might also have to reload the page again too (CMD+L, Enter).

3rd guy to post

https://pikeralpha.wordpress.com/2016/07/13/simple-skylake-usb-fix-no-kexts-required/#comment-7057

2nd guy to post

https://pikeralpha.wordpress.com/2016/07/13/simple-skylake-usb-fix-no-kexts-required/#comment-7009

https://pikeralpha.wordpress.com/2016/07/13/simple-skylake-usb-fix-no-kexts-required/#comment-6999

1st guy to post

https://pikeralpha.wordpress.com/2016/07/13/simple-skylake-usb-fix-no-kexts-required/#comment-6650


It seems they didn’t find any solution yet. So what do you think about it @RehabMan?

You need to follow the guide here...
You have 20 ports under XHC. Must get at or under 15.
 
You need to follow the guide here...
You have 20 ports under XHC. Must get at or under 15.

Oh sorry @RehabMan, I thought its limit of 15 *physical* USB ports. There are only 13 on this motherboard. That both HS + SS counted as 1 USB port.

OK so I removed HS01, HS02, HS03, HS04, HS05, HS06, and HS09. While keeping only SS01, SS02, SS03, SS04, SS05, SS06 and SS09 for all these USB 3.0 ports. It is now 13 ports in the aml file.

Problem #1:

* Now all my USB 3.0 ports do not work for USB 2 devices (which were using the HS** version of the port).

(then how its possible for all USB ports working properly !!??! It all works on other OSes e.g. windows, linux).

Problem #2:

* For my USB 3.0 device, it is still only 14MB/sec transfer speed.

So unfotunately doing this change did not resolve or fix this USB 3.0 speed issue that I am asking about.
 

Attachments

  • SSDT-UIAC.dsl
    2.8 KB · Views: 118
Oh sorry @RehabMan, I thought its limit of 15 *physical* USB ports.

No.

OK so I removed HS01, HS02, HS03, HS04, HS05, HS06, and HS09. While keeping only SS01, SS02, SS03, SS04, SS05, SS06 and SS09 for all these USB 3.0 ports. It is now 13 ports in the aml file.

If you remove an HSxx port that is associated with a USB3 port, USB2 devices will not work in that USB3 port.

Problem #1:
* Now all my USB 3.0 ports do not work for USB 2 devices (which were using the HS** version of the port).

As expected.

You must eliminate ports you're willing to give up. It is not valid to eliminate "part" of a physical port.
 
You must eliminate ports you're willing to give up. It is not valid to eliminate "part" of a physical port.
Start with eliminating ports that are not actually used by a physical port. Then if you're not at the 15 port limit yet, consider which of the remaining ports you want to remove. Eliminating part of a physical port decreases the port count, but allows that physical port to remain usable.

My XHC on the Gaming 7 motherboard has 13 physical ports. The ports from the XHC are 6 SS&HS and 4 HS only. One of the SS&HS ports is an internal hub that connects 4 of the physical ports on the front of my case using the two USB 3 headers on the motherboard. The 4 HS only ports are connected to the two USB 2 headers on the motherboard (for completeness!).

Physical ports = 6(HS&SS) + 4(HS) -1(hub) + 4 (HS&SS on hub) = 13
XHC ports = 6 * 2(HS&SS) + 4(HS) = 16(HS|SS) (the ports connected to the hub don't count since they are at a different level)

Ignore the two Thunderbolt 3.1 gen 2 ports (SSplus&HS) (one USB-C and one USB-A) - nothing needs to be done for those since they are not part of the XHC.

The XHC defines 26 ports, 16 of them are usable. I exclude the 10 that are unusable, but I need to exclude one more to get to 15. If I exclude a "HS only" port then that would make the port unusable. I chose to exclude the HS part of the SS&HS port next to the Thunderbolt USB-A port because I have plenty of HS only ports. The port is still usable as a SS only port.
 
Eliminating part of a physical port decreases the port count, but allows that physical port to remain usable.

You cannot eliminate "part" of a physical port.
Eliminating the HSxx component of a USB3 port disables the use of USB2 devices in that port.
Eliminating the SSxx component of a USB3 port disables the use of USB3 devices or at least disables USB3 speeds.

My XHC on the Gaming 7 motherboard has 13 physical ports. The ports from the XHC are 6 SS&HS and 4 HS only.
One of the SS&HS ports is an internal hub that connects 4 of the physical ports on the front of my case using the two USB 3 headers on the motherboard.

Hub ports do not count as a physical port. The port the hub is connected to should be considered a single physical port.
A hub is just a device plugged into a controller port. You don't have to worry about the additional physical ports provided by the hub.

The 4 HS only ports are connected to the two USB 2 headers on the motherboard (for completeness!).

Physical ports = 6(HS&SS) + 4(HS) -1(hub) + 4 (HS&SS on hub) = 13
XHC ports = 6 * 2(HS&SS) + 4(HS) = 16(HS|SS) (the ports connected to the hub don't count since they are at a different level)

What you're saying is you have 6 USB3 ports (at the controller level). Those 6 ports count as 12 (HSxx+SSxx).
And your 4 USB2 only ports count as 4.
12+4 is 16.
You only need to eliminate one USB2 only port to get to 15.
Or you could eliminate one of the USB3 ports (HSxx+SSxx) to get to 14.
But probably your USB3 ports are more useful than the USB2 only internal headers, so the choice is easy.

The XHC defines 26 ports, 16 of them are usable. I exclude the 10 that are unusable, but I need to exclude one more to get to 15. If I exclude a "HS only" port then that would make the port unusable. I chose to exclude the HS part of the SS&HS port next to the Thunderbolt USB-A port because I have plenty of HS only ports. The port is still usable as a SS only port.

IMHO, it is a mistake to eliminate the HSxx component of an USB3 port where you've left the SSxx component active.

Not only is it strange to have a physical port that doesn't work with USB2 devices, it is also clearly a scenario that Apple would never use, and therefore a scenario that is not tested.
 
Last edited:
Hub ports do not count as a physical port. The port the hub is connected to should be considered a single physical port.
A hub is just a device plugged into a controller port. You don't have to worry about the additional physical ports provided by the hub.

What you're saying is you have 6 USB3 ports (at the controller level). Those 6 ports count as 12 (HSxx+SSxx).
And your 4 USB2 only ports count as 4.
12+4 is 16.
Right. By physical ports, I mean ports that the user can see and connect devices to. My example illustrates that the relationship between those physical ports is not 1:1 to the ports on the XHC. A physical port that is connected to a hub does not count; and the hub counts only once (one SS and one HS).

You only need to eliminate one USB2 only port to get to 15.
Or you could eliminate one of the USB3 ports (HSxx+SSxx) to get to 14.
But probably your USB3 ports are more useful than the USB2 only internal headers, so the choice is easy.

You cannot eliminate "part" of a physical port.
Eliminating the HSxx component of a USB3 port disables the use of USB2 devices in that port.
Eliminating the SSxx component of a USB3 port disables the use of USB3 devices or at least disables USB3 speeds.

IMHO, it is a mistake to eliminate the HSxx component of an USB3 port where you've left the SSxx component active.

Not only is it strange to have a physical port that doesn't work with USB2 devices, it is also clearly a scenario that Apple would never use, and therefore a scenario that is not tested.
It seems to work. If there was evidence that this causes a problem then I would reevaluate.
 
Right. By physical ports, I mean ports that the user can see and connect devices to. My example illustrates that the relationship between those physical ports is not 1:1 to the ports on the XHC. A physical port that is connected to a hub does not count; and the hub counts only once (one SS and one HS).

This guide is only concerned with controller ports as far as 15-port limit.
Note that you can also inject details for hub ports as is done for the built-in hub ports on EHCx.

It seems to work. If there was evidence that this causes a problem then I would reevaluate.

Your risk to take.
Not recommended by this guide.
 
You need to provide "Problem Reporting" files as requested in post #1.
Use remote desktop to collect the files if necessary.

just to write back and say thank you Rehabman i've copied the fixes to my main boot m.2 drive and everything is working great regarding USB 2 and 3.0. Is anyone updating a repository for these SSDTs so other people can more simply copy and paste?
 
just to write back and say thank you Rehabman i've copied the fixes to my main boot m.2 drive and everything is working great regarding USB 2 and 3.0. Is anyone updating a repository for these SSDTs so other people can more simply copy and paste?

Problem is the USB topology is dependent on how the specific system is built.

For example, the set of ports used might be different with the same motherboard used by two different people simply because the use of internal USB headers may be different. For example, one person may have used a particular header for an internal device (such as bluetooth), which would be marked internal (UsbConnector=255) and yet another person may have used that internal header to attach to external ports on the case (UsbConnector=0 or UsbConnector=3 depending on the type of the header/case ports).
 
Reading through this thread and the "[Guide] 10.11+ USB changes and solutions" thread, I have had trouble finding my answer to this question:

I have an h170 motherboard, with 8 USB 3.0 ports (6 back panel, 2 front panel) and 1 internal USB 2.0 hub (connected to the USB2.0 header) that all USB 2.0 devices (2 front panel USB 2.0 ports, SD Card readers, bluetooth) are connected to. Which is my more realistic port reality:

8 USB 3.0 ports & 1 USB 2.0 port(hub)
------
8 USB3.0 port designations (SSxx)
9 USB2.0 port designations (HSxx)
Total = 17 (still 2 over the port limit)

8 USB 3.0 ports & 5 (or 6) USB 2.0 ports(2 front panel, 2 SD Card readers, bluetooth, & hub)
------
8 USB 3.0 port designations (SSxx)
13 (or 14) USB 2.0 port designations (HSxx)
Total = 21 (or 22) (6 or 7 ports over the limit)

Or maybe I'm not seeing the true configuration. So please point me in the right direction. And thanks for any help on this. I'm just trying to figure out how I should format my custom SSDT.
 
Back
Top