Contribute
Register

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

I have a draft version of this guide for Gigabyte that I haven't had a chance to do final a proofread of. This will get me going to finish it and publish.

Glad I could be part of your inspiration to get you next guide out. Most of my post can be copied hence the reason it is so long winded and to further help the less experienced forum member know exactly what to do and what keys to press and when. It seems I do way too much teaching at work these days to the younger workers and I do find a lack of retention or interest to learn by many. Over the last seven years being a member of this community, I have learned and have retained more macOS knowledge than I choose to disclose. Time is my limiting factor in participation.

Thanks again MacMan and for your kind words.
 
Clover version 4658

wstrohm, I would start by updating your version of Clover as I have never experienced an issue with pressing F4 to obtain the dumps and log (there was a very old bug with F4 that has been fixed long ago). I am using Clover version 4741. Obviously having an off computer backup (like a separate USB stick) of your EFI directory is suggestion number one prior to updating Clover or for that fact anything you touch in the EFI partition. I would not be concerned with the "Apple" directory.

EDIT: F4 is not pressed at the boot option (like hitting space on the selected OS instance) but at the very first main screen that lists all of your boot partitions.

With regard to the black screen, I wonder if you are bumping up against multiple monitors not being recognized. Could you try just a single monitor and repeating the F4 keypress? F4 is a Clover command and is not machine specific. When I press F4 it does take time and seems to freeze for maybe ten seconds (I use the "metal" theme and the animation stops during the process and resumes once complete). You can further validate the command existence by press F1 where you should see the supported keypresses (careful pressing R will reboot the system). In the end, it's all about getting the .dsl to edit for your machine for sure.

When I started my process it was a clean install without any added kext's applied. I'm not saying that is your problem as RehabMan's kext should not interfere.

Just for my curiosity, if you go to a terminal window and enter the command "df -h" does the output show a mounted "ESP" volume? Also, did you once install with MultiBeast and update Clover after the fact? Although MultiBeast is a great tool in general, I prefer to go old school and do it myself. I would expect to see a full path of /Volumes/EFI/EFI/CLOVER once you mount the EFI partition with the tool of your choice (I use "EFI Mounter 3" available in the forum downloads). The double EFI is really not double since the first is the volume label and the second is the EFI directory where Clover installs.

Good luck.
 
Last edited:
F4 is not pressed at the boot option (like hitting space on the selected OS instance) but at the very first main screen that lists all of your boot partitions.

My boot-up sequence begins with an "American Megatrends" splash screen and then transitions to my Clover boot options screen. I have a built-in 2-second delay on that screen that allows me to pick one of three boot options... my Samsung 970 Pro NVMe SSD or either of my two Crucial M500 SATA SSDs. What I did was change boot options (which pauses the boot-up) and then press F4. At that point nothing happens. Then pressing "Return" which normally completes the boot sequence, I get the black screen. This time I waited for 30 seconds, but nothing further happened. When I manually restarted (used the Restart button on my SD 101 chassis), and using EFI Mounter v3 to mount my EFI partition, once again I had an added "APPLE" folder in my EFI/EFI folder. I (once again) investigated that folder and found nothing useful, so I deleted it.

With regard to the black screen, I wonder if you are bumping up against multiple monitors not being recognized. Could you try just a single monitor and repeating the F4 keypress? F4 is a Clover command and is not machine specific. When I press F4 it does take time and seems to freeze for maybe ten seconds (I use the "metal" theme and the animation stops during the process and resumes once complete).

I have only one monitor, a 24" gaming monitor, driven by the "Display Port" output of my Gigabyte nVidia GTX 1050 TI OC graphics card. So all my tries have been with that. My Clover screen is per the "tonymacx86" theme which is not animated.

You can further validate the command existence by press F1 where you should see the supported keypresses (careful pressing R will reboot the system).

Thanks for that tip; have not tried that, but will now.

Just for my curiosity, if you go to a terminal window and enter the command "df -h" does the output show a mounted "ESP" volume? Also, did you once install with MultiBeast and update Clover after the fact?

1. My "ESP" volume will only show as mounted if I use EFI Mounter to mount it. I haven't tried that before mounting it, though.
2. Yes, I have used Multibeast at the beginning of installation, updated Clover some time afterwards (with Clover Configurator) and even used Multibeast after that. Is there a problem there?

I appreciate your thoughtful and well-presented comments! I will re-post after trying "F1."
 
I have only one monitor, a 24" gaming monitor, driven by the "Display Port" output of my Gigabyte nVidia GTX 1050 TI OC graphics card. So all my tries have been with that. My Clover screen is per the "tonymacx86" theme which is not animated.

Then pressing "Return" which normally completes the boot sequence, I get the black screen.

I have tried to reproduce the issue locally and found that I was able to get just a black screen. I am running two monitors on the RX 580 card being used in this experimental build of Mojave 10.14.1. Since you are using an Nvidia card I must assume you are on a lower version of macOS due to the lack of Nvidia drivers for Mojave.

What I tried after pressing F4 (waited 10 seconds) and then enter to boot (got the black screen) was to unplug the second monitor, nothing happened. Then I unplugged the primary monitor, waited 5~10 seconds and then plugged it back in. Low and behold I then saw the Apple logo and loading progress bar at which point I then plugged in the second monitor. The machine booted correctly. I then mounted the EFI partition and checked the origin folder and the expected content was there. I know you say that you delete the "Apple" folder but in my estimation, that folder is benign and is unnecessary to remove; I guess just personal preference.

2. Yes, I have used MultiBeast at the beginning of installation, updated Clover some time afterwards (with Clover Configurator) and even used Multibeast after that. Is there a problem there?

First and foremost, MultiBeast is a great starting point and all due respect to the developers, no bashing here! I use it to get started myself, but then learn from the general installation and duplicate the core requirements using Clover directly. I never stick with any initial build and do it all myself after learning what's required, this way I am in control of my installation with a future Clover upgrade path. I have always been confused as to what MultiBeast does with Clover in EFI mode (never installed in Legacy mode). I'm sure there are others that know much more on this subject but I don't spend my valuable time on those details. I can say that I don't think I was ever really successful updating any of my many machines to a later version of Clover once I used MultiBeast. As for Clover Configurator, I try my best to not use it. I have read too many post stating how it messed up their systems. The only thing I will use it for is the SMBIOS values so I can get iMessage working (95+% of the time). I typically go out to SourceForge and pull the Clover .pkg file directly. I don't think I every tried to do it the way you mentioned.

On this experimental build, I have installed literally no less than 20 times ensuring I have everything just right and that I can repeat the process in my sleep. Also, since this particular build will go to my Son who is 352 miles from home attending college, and I will need to support him remotely, brain muscle memory is critical to my support process. He's a power user but not a hacker (he leaves that to me). I am dedicating a SSD drive (Intel 128GB) as rescue for this support process. It was on sale at NewEgg and far outweighs my consulting labor costs plus keeps him up and running even if I'm not available to support him (see rescue suggestion below).

I really hope the above monitor unplug/replug works, otherwise it's messy where I would need to suggest reformatting the EFI partition as FAT32 and then attempting to user Clover directly to install the required files. Be warned that if you need to go down this path, you must ensure you have the ability to boot you machine by other means if something fails (a rescue USB stick or even a Carbon Copy Cloner backup). Even if you use Carbon Copy Cloner, you still need to manually install Clover on that backup drive to make it boot. You need to always ensure FakeSMC is in the kext/other folder or you will never boot (Clover does not install that which is a guesstimate reason why lots of people don't use Clover directly). Unfortunately, I cannot support you if you need to opt for this process. Seeing that you have 440 posts listed in your profile, I assume you are experienced enough to handle this independently.

Good luck.
 
Last edited by a moderator:
Since you are using an Nvidia card I must assume you are on a lower version of macOS due to the lack of Nvidia drivers for Mojave.
Correct, I am running High Sierra 10.13.6. I generally wait until the "XX.xx.6" or later of any Mac OS before upgrading to it (past experience). I am also still using HFS+ even though all my storage devices are SSD, since it has worked well for me since its adoption by Apple. (See this article by RehabMan. And RehabMan's method no longer applies in Mojave.) My rationale for avoiding APFS stems from a video from OWC explaining how it works (can't find it now).

I know you say that you delete the "Apple" folder but in my estimation, that folder is benign and is unnecessary to remove; I guess just personal preference.
Correct; you could call me a "minimalist." This frequently gets me into trouble, but so be it. I want just barely enough software on my computer to run it without incident. Which is why I am interested in this "kextless" method of setting <= 15 USB ports.

It is interesting that you were able to 1) reproduce my problem and 2) recover from it. I find it extremely difficult to understand why disconnecting the output of a graphics card would enable Clover to dump a DSDT into the EFI partition, but I will try your process to see if it works for me. Can't hurt.

I can say that I don't think I was ever really successful updating any of my many machines to a later version of Clover once I used MultiBeast. As for Clover Configurator, I try my best to not use it.
I have built 3 "Hackintoshes;" 4th-gen, 6th-gen, and 8th-gen Mini-ITX'es. I have always used tonymax86's Unibeast/Multibeast procedures, and they always have worked. I have also updated Clover with Clover Configurator (always the latest version) several times with no problems. I have no idea how to manipulate or update Clover in any other way than by Clover Configurtator. That's just ignorance on my part, but I've never needed to do that.

I really hope the above monitor unplug/replug works, otherwise it's messy where I would need to suggest reformatting the EFI partition as FAT32 and then attempting to user Clover directly to install the required files. Be warned that if you need to go down this path, you must ensure you have the ability to boot you machine by other means if something fails (a rescue USB stick or even a Carbon Copy Cloner backup). Even if you use Carbon Copy Cloner, you still need to manually install Clover on that backup drive to make it boot.
Well... I have no idea how to reformat the EFI partition (which looks OK as it always has) or how to use Clover "directly." I have one Unibeast-created USB High Sierra 10.13.6 installer and two SSDs with CCC 5.1.6, and both have got me out of trouble before. Although I am using RehabMan's recommended Clover version 4658 for booting at the moment, no doubt I could update Clover (via Clover Configurator) to the latest version, but no way will I do that without one of these backups.

What is a way to learn how to use Clover directly? Link(s)?

Thanks for all your time and energy in replying to my posts! I will now try the unplug-replug method and report back.

[Edit: No workee. I was able to avoid unplugging the graphics card by using the "restart" circular arrow on the Clover screen to restart my computer after pressing "F4" (instead of the Restart button on my computer), and booting went normally with no black screen. But there is still nothing in the EFI/EFI/CLOVER/ACPI/origin folder.

I read that the DSDT is stored in the BIOS. On the "Insanely Mac" website there is a script that supposedly will extract it if run in Terminal, so I downloaded it and dragged the script "dsdt.sh" into the Terminal window, and Terminal accepted it. But the DSDT table was supposed to show up in Users/ACPI, and nothing was there. Is it possible that it just cannot be extracted, or that there is just no DSDT there?]

[Edit 2: I finally got the DSDT table; it was stored in a 3rd EFI partition, on my 3rd SSD. For some unknown reason although I was looking for it on my boot disk, it got stored on a backup disk. But at least I have it now. (See uploaded file.) Now all I have to do is try and follow MacMan's instructions (if I can). BUT HOW DO I INSTALL THE EDITED TABLE?]

P.S. The statement below in MacMan's section 3 is, for my computer, incorrect:
"But thanks to the Clover developers it is now easy and is done when Clover is booted and at the main menu by pressing the F4 key. This will place the extracted DSDT and SSDT on the boot EFI volume under /EFI/EFI/CLOVER/ACPI/origin/." (Probably true if the boot EFI volume is the only EFI volume.)
 

Attachments

  • DSDT Original Table .zip
    81.8 KB · Views: 106
Last edited:
In my DSDT table, it appears that "SSDT-5-A M I.aml" is the SSDT that controls USB ports (see above uploaded DSDT table). Opening that ".aml" file to a de-compiled ".dsl" file (uploaded below) is somewhat revealing. But how in the world to edit that is totally beyond me. Maybe MacMan can handle that, but I sure can't!
 

Attachments

  • SSDT-5-A M I.dsl.zip
    3.5 KB · Views: 112
In my DSDT table, it appears that "SSDT-5-A M I.aml" is the SSDT that controls USB ports

Progress, congratulations.

The rest is up to you to determine which ports you are using/need. I truly like the method of using the USB3 hub since when you plug it into a port, you will begin to see what ports becomes active (both USB2 & USB3 see my original post about association). You must be using IORegistryExplorer to note what becomes active as you plug devices in and out of your desired USB ports. I would start with your USB2 ports so that you can begin to eliminate some of the unused HS## ports thus bringing the overall port count down. You can enable them again after your process of elimination if they were incorrectly marked disabled. When you begin eliminating ports, you can expect to see more of the SS## ports show up in the IORegistryExplore view. By default since your have fourteen USB2 ports, I think you would only see one SS port (probably SS01). Again, I started with a clean install and do not have RehabMan's kext loaded. You can leave it in your config.plist file and disable it by marking it as disabled using Clover Configurator (check box) and rebooting. If you also have some other .aml file as RehabMan's post suggests, I would further temporarily remove it from the patched directory.

According to your .dsl file, I see your chip has 14 USB2 ports (HS01->HS14) and then 10 USB3 ports (SS01->SS10).

The process to disable an unused port would go like this in your file.

High Speed (USB2) disable a port setting One to Zero
Code:
    Scope (\_SB.PCI0.XHC.RHUB.HS04)
    {
        Method (_UPC, 0, NotSerialized)  // _UPC: USB Port Capabilities
        {
            If (LEqual (And (HUBC, 0x08), 0x08))
            {
                Return (GUPC (Zero))
            }
            Else
            {
                Return (GUPC (One))  /////// <<<< Set the word "One" to "Zero" (less the quotes)
            }
        }

        Method (_PLD, 0, NotSerialized)  // _PLD: Physical Location of Device
        {
            If (LEqual (And (HUBC, 0x08), 0x08))
            {
                Return (GPLD (Zero, Zero))
            }
            Else
            {
                Return (GPLD (One, 0x04))
            }
        }
    }

Super Speed (USB3) disable a port setting One to Zero
Code:
        Scope (\_SB.PCI0.XHC.RHUB.SS07)
        {
            Method (_UPC, 0, NotSerialized)  // _UPC: USB Port Capabilities
            {
                If (LEqual (And (UMAP, 0x40), 0x40))
                {
                    If (LEqual (And (HUBC, 0x40), 0x40))
                    {
                        Return (GUPC (Zero))
                    }
                    Else
                    {
                        Return (GUPC (One)) ///// <<<< Set the word "One" to "Zero" (less the quotes)
                    }
                }
                Else
                {
                    Return (GUPC (Zero))
                }
            }

            Method (_PLD, 0, NotSerialized)  // _PLD: Physical Location of Device
            {
                If (LEqual (And (UMAP, 0x40), 0x40))
                {
                    If (LEqual (And (HUBC, 0x40), 0x40))
                    {
                        Return (GPLD (Zero, Zero))
                    }
                    Else
                    {
                        Return (GPLD (One, 0x07))
                    }
                }
                Else
                {
                    Return (GPLD (Zero, Zero))
                }
            }
        }

If you don't have a USB3 hub, you can use a USB3 stick. Please remember to properly eject it so damage does not occur.

I looked at a picture of your motherboard and see a single USB2 chassis header and a single USB3 chassis header (board rear left). That leads me to believe you only have two USB2 ports, and possibly ten USB3 ports (USB3.1 excluded). Since the board has WiFi and Bluetooth, additional internal USB2 might be expected (for Bluetooth) unless the combo chipset is an integrated PCI-E device. This is most definitely trial and error without a schematic (not a block diagram) in hand to review.

If you have the USB2 chassis header connected to a front panel, I would start by identifying those ports and noting the IORegistryExplorer output from the HSxx ports. You will want to keep those ports active in my opinion.

The rear left stack of 4 ports seems unclear in the documentation. Are they all USB3.1 ports? If they are USB3.1, I would expect them to be out of play in this exercise as they are probably handled by a separate chipset. Plug something into that four port stack and look at "AppleUSBXHCIAR" for a device (using IORegistryExplorer); check all four ports. If they do show up as AppleUSBXHCIAR, then they are not controlled by this .dsl output (out of play for this exercise).

I would continue targeting front panel posts in efforts of identifying where they show up in IORegistryExplorer. I personally want all of my case front panel ports working.

OK, here is the tedious part of the identification process. You must turn down some ports to allow other ports to become exposed. You need to set the "One" to "Zero" value detailed above then place the compiled .aml file in the CLOVER/ACPCI/patched folder.
My original post:
I used RehabMan's MaciASL RM-1.31 (252.4) with ACPI 6.2a set in preferences/iASL to compile the .dsl to .aml (save as and select the file type as ACPI Machine Language Binary).
Also make sure that "AutoMerge" is in your config.plist. You will have to open your config.plist with a proper text editor to add this since Clover Configurator does not have a method to enable this value (at least I could not find it). If you have Xcode use that or you could use Atom too.
Code:
<key>ACPI</key>
   <dict>
       <key>AutoMerge</key>
       <true/>
       <key>DSDT</key>
       <dict>

I do have concerns which drive you actually boot from based on your search for the origin directory containing the dump files. However, I would expect to place the .aml file in the boot disk /Volumes/EFI/EFI/CLOVER/ACPI/patched directory.

Pay attention to the .dsl file DefinitionBlock (line 21 of your file) and add "SSDT-5" in the DefinitionBlock as you have detailed that in your file name (that's how Clover identified the order).
Original
Code:
DefinitionBlock ("", "SSDT", 2, "ALASKA", "A M I", 0x00000000)
Modified
Code:
DefinitionBlock ("SSDT-5", "SSDT", 2, "ALASKA", "A M I", 0x00000000)

Since this is the tedious part, you will have to continue experimenting by disabling ports in the .dsl, compiling into an .aml, placing it in the patch location and then rebooting (shampoo instructions: rinse lather and repeat). With careful note taking you will wind up with a KEXT'less installation.

Give it a go.
 
The rest is up to you to determine which ports you are using/need.
I have already mapped my USB ports per RehabMan's instructions, and have an SSDT in my "ACPI/patched" folder which works as expected using his USBInjectAll.kext kernel extension. So I believe the mapping part of this new process is complete. My IORegistryExplorer app confirms it also.

Again, I started with a clean install and do not have RehabMan's kext loaded. You can leave it in your config.plist file and disable it by marking it as disabled using Clover Configurator (check box) and rebooting. If you also have some other .aml file as RehabMan's post suggests, I would further temporarily remove it from the patched directory.
Excellent points, and I will follow your suggestions.

The process to disable an unused port would go like this in your file.
++++++
Ah, that's exactly what I need, thanks for the examples worth 1000 words! Maybe I won't have to fight the numbers of brackets, end-parentheses, commas, etc. at the end of the file as I had to when using RehabMan's modified SSDT file. It looks like the number of lines in the SSDT won't change; just the "return" values.

Also make sure that "AutoMerge" is in your config.plist. You will have to open your config.plist with a proper text editor to add this since Clover Configurator does not have a method to enable this value (at least I could not find it).
Okay, this will be new for me; I will use "PlistEdit Pro.app" v 1.8.7 to modify my config.plist. Hopefully that will work; what exactly is being "auto merged?"

I do have concerns which drive you actually boot from based on your search for the origin directory containing the dump files.
I verified that I was booted on my 970 PRO SSD by looking at my System Report after I saw that weirdness. Clover allows me to choose any of my 3 SSDs as boot drive, but it is set to automatically boot on the 970 PRO unless I pause in the Clover GUI screen and change it manually. If this procedure works 100%, I will place the new SSDT in all three ACPI/patched EFI partitions. Bit of a pain, but I want everything to match across all three SSDs.

Pay attention to the .dsl file DefinitionBlock (line 21 of your file) and add "SSDT-5" in the DefinitionBlock as you have detailed that in your file name (that's how Clover identified the order).
Now there is something I could easily forget, so thanks again for your detailed message(s)! I've printed my Mail copy so as not to forget anything. Those 3 pages should help reduce my tendency to be mistake-prone.

I'll report on my results, and YOU definitely get all credit if it works out. Thanks very much once again!

[EDIT: What about lines 987 and subsequent in the original SSDT-5-A M I.dsl file? In those "Scope" lines, the "HSxx" is followed by "DPxx." Are all those to be changed in the same way, or should they be left alone?]
 
Last edited:
Okay, this will be new for me; I will use "PlistEdit Pro.app" v 1.8.7 to modify my config.plist. Hopefully that will work; what exactly is being "auto merged?"

The SSDT that you are editing will be merged back into the discovered Clover data thereby overwriting the configuration. This is also why you needed to add the name in the definition block so it knows where to merge the replacement data.

Don't get hung up on config.plist. It is merely a text file with a complicated XML schema. For me it's old hat and in applications I have author at work, it's second nature. The words of caution by many are that some text editors mess with the character set encoding and people don't understand the necessary closing tags to the XML elements. But that's the geek in me talking.

I'll report on my results, and YOU definitely get all credit if it works out. Thanks very much once again!

I did not discover the method but only successfully implemented it in my rig with the acquired knowledge from RehabMan and MacMan. They desire the credit. I'm just trying to be a good community citizen and share the success story.

[EDIT: What about lines 987 and subsequent in the original SSDT-5-A M I.dsl file? In those "Scope" lines, the "HSxx" is followed by "DPxx." Are all those to be changed in the same way, or should they be left alone?]

Just leave all of those entries alone. No modification was needed in my configuration.


Waiting to hear your success story.
 
Back
Top