Contribute
Register

ASUS 100 Series and Later Custom SSDT for XHCI USB Port Control

Joined
Feb 27, 2015
Messages
148
Motherboard
ASUS Z370 Prime P
CPU
i7-8700K
Graphics
RX-580
Mac
MacBook Air
Mobile Phone
iOS
my motherboard is asus z370 prime-p
- 8 x USB 3.1 Gen 1 ports (4 ports at mid-board; 4 ports at back panel, blue, Type A)
- 6 x USB 2.0/1.1 ports (4 ports at mid-board; 2 ports at back panel)
this is a port config i tried to follow this guid, my issue is that even usb 2.0 ports is recognized as 3.0 i tried to edit ssdt

SSDT-3-xh_rvp08.dsl was generated SSDT-3.dsl is my edit i don't have usbinjectall installed

what i am doing wrong ?
 

Attachments

Joined
Feb 27, 2015
Messages
148
Motherboard
ASUS Z370 Prime P
CPU
i7-8700K
Graphics
RX-580
Mac
MacBook Air
Mobile Phone
iOS
my motherboard is asus z370 prime-p
- 8 x USB 3.1 Gen 1 ports (4 ports at mid-board; 4 ports at back panel, blue, Type A)
- 6 x USB 2.0/1.1 ports (4 ports at mid-board; 2 ports at back panel)
this is a port config i tried to follow this guid, my issue is that even usb 2.0 ports is recognized as 3.0 i tried to edit ssdt

SSDT-3-xh_rvp08.dsl was generated SSDT-3.dsl is my edit i don't have usbinjectall installed

what i am doing wrong ?
i was putting dsl files in patched folder aml works :headbang:
 
Joined
Aug 8, 2011
Messages
26
Motherboard
GB-BXi7-4770R
CPU
i7-4770R 3.90 GHz
Graphics
Intel® Iris™ Pro graphics 5200
Mac
iMac, MacBook Air, MacBook Pro
Mobile Phone
iOS
my motherboard is asus z370 prime-p
- 8 x USB 3.1 Gen 1 ports (4 ports at mid-board; 4 ports at back panel, blue, Type A)
- 6 x USB 2.0/1.1 ports (4 ports at mid-board; 2 ports at back panel)
Just a quick question for you. In your file it has the "data dictionary" method where you change the value in the table.

Original SSDT-3-xh-rvp08.dsl. Glossry: USSD = USB3 Super Speed; UHSD = USB2 High Speed
Code:
Name (USSD, Package (0x10)
{
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero
})
Name (UHSD, Package (0x10)
{
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    Zero,
    Zero
})
Your modified .dsl Glossry: USSD = USB3 Super Speed; UHSD = USB2 High Speed
Code:
Name (USSD, Package (0x10)
{
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero
})
Name (UHSD, Package (0x10)
{
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    Zero,
    Zero
})
They both appear to be identical. When I count the ports set to "One" it sums to 22 ports total. This exercise is for a port count less than or equal to 15.

Are you sure you have all of the ports working? At a minimum, a picture of IORegistryExplorer showing 15 ports would be a good artifact of success.

Thanks.
 
Joined
Feb 27, 2015
Messages
148
Motherboard
ASUS Z370 Prime P
CPU
i7-8700K
Graphics
RX-580
Mac
MacBook Air
Mobile Phone
iOS
Just a quick question for you. In your file it has the "data dictionary" method where you change the value in the table.

Original SSDT-3-xh-rvp08.dsl. Glossry: USSD = USB3 Super Speed; UHSD = USB2 High Speed
Code:
Name (USSD, Package (0x10)
{
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero
})
Name (UHSD, Package (0x10)
{
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    Zero,
    Zero
})
Your modified .dsl Glossry: USSD = USB3 Super Speed; UHSD = USB2 High Speed
Code:
Name (USSD, Package (0x10)
{
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero,
    Zero
})
Name (UHSD, Package (0x10)
{
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    One,
    Zero,
    Zero
})
They both appear to be identical. When I count the ports set to "One" it sums to 22 ports total. This exercise is for a port count less than or equal to 15.

Are you sure you have all of the ports working? At a minimum, a picture of IORegistryExplorer showing 15 ports would be a good artifact of success.

Thanks.
in this sample i sent i was trying to start alter port my final file looks like this
 

Attachments

Joined
Aug 8, 2011
Messages
26
Motherboard
GB-BXi7-4770R
CPU
i7-4770R 3.90 GHz
Graphics
Intel® Iris™ Pro graphics 5200
Mac
iMac, MacBook Air, MacBook Pro
Mobile Phone
iOS
in this sample i sent i was trying to start alter port my final file looks like this
Sorry, I don't think it is correct or working as expected. What I see is that you changed the "_UPC: USB Port Capabilities" and not the (example) Return (GPLD (DerefOf (Index (UHSD, Zero)), One)).

Example: The DerefOf (Index (UHSD, Zero)) value is derived from the table I outlined in my previous post.

To control the ports, you need to set the Zero or One value in "Name (USSD, Package (0x10)" and/or "Name (UHSD, Package (0x10)" In your lucky case because of the "Name" table, the balance of the settings will be configured according to that "Name" table Zero or One value. Starting at line 119 -> 156 of your file.



EDIT: Strike this suggestion. Confusion on my part. mthvnela's edits were correct.


An IORegistryExplorer screen snip will confirm.
 
Last edited:
Joined
Mar 3, 2014
Messages
547
Motherboard
Gigabyte Z390 I AORUS PRO WIFI
CPU
i9-9900K
Graphics
RX-580
Mac
MacBook Air
Classic Mac
Power Mac
No success here. I have attached screenshots of 1) my "original" (RehabMan's) IORegistryExplorer result using USBInjectALL.kext, 2) a corresponding result using the current (MacMan's/Lauderdale's) process, and 3) a PlistEditPro result of adding "Automerge" to the ACPI portion of config.plist. I have noted the following weirdnesses:
1. The USB ports shown in the current IORegistryExplorer have reverted to the original DSDT assignments.
2. Whenever I generate a disassembled SSDT ".dsl" file from my compiled ".aml" file, the "Definition Block" (which was "SSDT-5" in my original ".dsl" file) has changed to "", as if I had never added it. This is repeatable forever. Consequently I believe my ".aml" file in my ACPI/patched folder in CLOVER is missing that Definition Block designator.

Please note that in your response to a poster above you mentioned that the "PLD" entries in the SSDT for the undesired ports needed to be set to "Zero," but in your illustration in your previous post to me you show only the "UPC" entries changed to "Zero." Do the "PLD" entries have to be changed also? (See also the attached .jpg file showing one example of an undesired port.)
 

Attachments

Last edited:
Joined
Feb 27, 2015
Messages
148
Motherboard
ASUS Z370 Prime P
CPU
i7-8700K
Graphics
RX-580
Mac
MacBook Air
Mobile Phone
iOS
Sorry, I don't think it is correct or working as expected. What I see is that you changed the "_UPC: USB Port Capabilities" and not the (example) Return (GPLD (DerefOf (Index (UHSD, Zero)), One)).

Example: The DerefOf (Index (UHSD, Zero)) value is derived from the table I outlined in my previous post.

To control the ports, you need to set the Zero or One value in "Name (USSD, Package (0x10)" and/or "Name (UHSD, Package (0x10)" In your lucky case because of the "Name" table, the balance of the settings will be configured according to that "Name" table Zero or One value. Starting at line 119 -> 156 of your file.

An IORegistryExplorer screen snip will confirm.
bit confused here, this last one i sent works as i wanted actually is it still incorrect ?
 
Joined
Aug 8, 2011
Messages
26
Motherboard
GB-BXi7-4770R
CPU
i7-4770R 3.90 GHz
Graphics
Intel® Iris™ Pro graphics 5200
Mac
iMac, MacBook Air, MacBook Pro
Mobile Phone
iOS
No success here. I have attached screenshots of 1) my "original" (RehabMan's) IORegistryExplorer result using USBInjectALL.kext,
The definition block seems to not save after compilation/de-compile from .aml. Don't worry about it. My thought is that it's either a compiler issue or a compiler directive and should not affect the outcome. Just ensure the definition block is populated as discussed before you compile.

Based on your IORegistryExplorer snip, the ports you want enabled are contained in the attached modified SSDT-5.dsl which I pulled from your original post once clover extracted it for you (a few posts back). I took the liberty of modifying that file on your behalf (can't do this for everyone, but as an example only for others to learn from). Search within the file for the text "// MODIFIED" and you will see 9 edits marking ports as Zero to disable. This file should now mirror the IORegistryExplorer snip. It is impossible to edit the SSDT file without knowing exactly which ports need to be turned off; the port experimentation exercise is mandatory regardless of the method (this way or RehabMan's way).

You should ensure the SSDT from RehabMan's suggestion is not contained in the patched directory. Compile the attached with RehabMan's MaciASL version (take the latest).
ACPI 6.2a must be set in preferences/iASL. Then compile the .dsl to .aml (save as and select the file type as ACPI Machine Language Binary
Place the compiled version (.aml) file in the patched directory. Ensure the 15 port limit patch limit and USBInjectAll KEXT are disabled in config.plist (disabled in clover configuator with the check box as previously discussed).

The other post 35 are apples and oranges in terms of DSDT. That post uses a "Data Dictionary" type "Name" table making the configuration simple by changing just the values within the tables (no direct edits required except for the two Name tables). What you and I have do not use a data dictionary and require the manual edits. Please do not confuse the two.

I also got to the bottom of the black screen mystery. It appears that when you have more than one Clover EFI partition, like we both do, then the black screen problem occurs. I proved that by turning off the other two drives in my system that have Clover EFI partitions, booted, then pressed F4 and had no problems; worked as expected and wanted to pass that along.

Give the attached a go.
 

Attachments

Joined
Aug 8, 2011
Messages
26
Motherboard
GB-BXi7-4770R
CPU
i7-4770R 3.90 GHz
Graphics
Intel® Iris™ Pro graphics 5200
Mac
iMac, MacBook Air, MacBook Pro
Mobile Phone
iOS
bit confused here, this last one i sent works as i wanted actually is it still incorrect ?
Humor me here please.

USB has been an issue since 10.11.x forward and I'm personally tired of being dependent upon others to find the right values to patch a KEXT that might or might not work and it does not address the 15 port limit. This KEXT'less approach wins hands down! Granted you have to do the port discovery work up front but having survivorship between macOS releases is well worth the effort and people learn that you have 15 ports maximum.

The way your SSDT is configured is fantastic in terms of maintenance. In your scenario you should only need to set the Zero or One value in the two referenced "Name" tables starting at line 119 -> 156. I don't have hardware that matches your rig, however my reading and experiments tell me that you got the Lexus verses the Toyota (both good cars, have owned them both, but the Lexus was more plush).

Since I'm going through all of this to teach others, please allow me to teach you and others a better/simpler way for those lucky enough to have the same style SSDT as you. I have no clue which ports you want disabled because you have not supplied any viable detail and I cannot provide an example for the benefit of others. The only thing you need to do is flip the values in those two name tables and nothing more. The SSDT code will look up the values based on the "Name" entries and set everything up for you without the tedious and mistake prone line by line edit.



EDIT Wrong information on my part. Disregard.


Can you please attach a working IORegistryExplorer screen snip so I can produce an example based on your port usage?

Thanks.
 
Last edited:
Joined
Mar 3, 2014
Messages
547
Motherboard
Gigabyte Z390 I AORUS PRO WIFI
CPU
i9-9900K
Graphics
RX-580
Mac
MacBook Air
Classic Mac
Power Mac
The definition block seems to not save after compilation/de-compile from .aml. Don't worry about it.
Thank you, that is comforting.

Search within the file for the text "// MODIFIED" and you will see 9 edits marking ports as Zero to disable. This file should now mirror the IORegistryExplorer snip.
Thanks for your effort. I used "MaciASL" to do an A-B comparison between your "MODIFIED" SSDT-5 and the one I made. They match exactly. Apparently I didn't miss anything.

It is impossible to edit the SSDT file without knowing exactly which ports need to be turned off; the port experimentation exercise is mandatory regardless of the method (this way or RehabMan's way).
Yes, I know that. As I wrote, your "MODIFIED" version of the SSDT-5 is an exact match with mine. And the ports I have "dropped" are the same ones I previously dropped using RehabMan's guide. So the current IORegistryExplorer readout (that I attached in my post #36 above) from after I used this new procedure should have matched what I had using RehabMan's procedure, but it doesn't. Something else is wrong.

You should ensure the SSDT from RehabMan's suggestion is not contained in the patched directory. Compile the attached with RehabMan's MaciASL version (take the latest).
I had removed my previous SSDT from ACPI/patched before adding in my SSDT-5 file. I have used Rehabman's version RM-1.31 (252.3) for all my work up until now. I just downloaded version RM-1.31 (252.4) from your link. If you think that might make a difference, I can repeat everything with that one.

Place the compiled version (.aml) file in the patched directory. Ensure the 15 port limit patch limit and USBInjectAll KEXT are disabled in config.plist (disabled in clover configuator with the check box as previously discussed).
Yes, did that. I presume you refer to the patch that removed the 15-port limit in config.pist; I had removed that after using RehabMan's procedure, and it hasn't been present for months. But the "USBInjectAll.kext" files are in separate folders in CLOVER called "kexts/10.13" and also "kexts/other" from which I removed them. As far as I know there is no such "check box" in Clover Configurator... at least I could not find one.

The other post 35 are apples and oranges in terms of DSDT. That post uses a "Data Dictionary" type "Name" table making the configuration simple by changing just the values within the tables (no direct edits required except for the two Name tables). What you and I have do not use a data dictionary and require the manual edits. Please do not confuse the two.
Understood, thank you. But since things are still not working, what is your answer to the question I posed in my uploaded (port #36) "Undesired USB Port HS04.jpg" file? Should that "One" be changed to a "Zero" for all the undesired USB ports? Or left alone?

I also got to the bottom of the black screen mystery. It appears that when you have more than one Clover EFI partition, like we both do, then the black screen problem occurs. I proved that by turning off the other two drives in my system that have Clover EFI partitions, booted, then pressed F4 and had no problems; worked as expected and wanted to pass that along.
Okay, thanks for that.

As far as I can tell I have complied with all the procedure requirements, but still IORegistryExplorer is wrong. Any further suggestions?

Edit: Sorry to bury the lead here, but I found the problem and fixed it. There was one more instance of "USBInjectAll.kext" that I missed. It was in /Library/Extensions. Once I removed that one, now the XHC section of IORegistryExplorer reports the correct USB ports. (See attached screenshot.) So all is now copacetic and there is a cloudless sky.
Thanks once again for your patience and invaluable help!]
 

Attachments

Last edited:
Top