Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

Joined
Mar 9, 2017
Messages
34
Motherboard
Asrock x99m Extreme 4
CPU
i7-6800K
Graphics
Gigabyte GTX960 GV-N960IXOC-2GD
Mobile Phone
Android
hi, i am back on track and I need some help, don't have success with that. are you available?
i am unable to patch usb limits with clover and I am unable to trace all corresponding all xhc ports

at the moment I am on 17G9016
USB settings- USB Controller -Enabled/ Intel USB 3.0 Mode -Auto/ Legacy USB Support - Enabled/ Legacy USB3 Support -Enabled/ USB Compatibility Patch -Disabled.
Using latest USBInjectAll and x99_XHC kexts
 
Joined
Jun 16, 2010
Messages
233
Motherboard
Gigabyte GA-Z270X-Gaming-K7
CPU
i5-7600K
Graphics
RX 5500 XT
hi, i am back on track and I need some help, don't have success with that. are you available?
i am unable to patch usb limits with clover and I am unable to trace all corresponding all xhc ports

at the moment I am on 17G9016
USB settings- USB Controller -Enabled/ Intel USB 3.0 Mode -Auto/ Legacy USB Support - Enabled/ Legacy USB3 Support -Enabled/ USB Compatibility Patch -Disabled.
Using latest USBInjectAll and x99_XHC kexts
@blackmailswitch. Just a general forum tip for you as it appears you're trying to get @UtterDisbelief's attention. To do so (for pretty much anyone on the forums here), type the @ symbol and then start typing their username (without a space) to bring up someone in particular that you are trying to contact or have read your post/reply. This will then bring up a small pop-up menu with either that person's name or a list of them - if you can't remember the exact spelling of it. They should then get a notification that you're trying to contact them, instead of just trusting that they'll check the forums for your comment. It is a pretty busy site, after all.
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
4,328
Motherboard
Gigabyte Z390M Gaming
CPU
i5-9600K
Graphics
RX 570
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
hi, i am back on track and I need some help, don't have success with that. are you available?
i am unable to patch usb limits with clover and I am unable to trace all corresponding all xhc ports

at the moment I am on 17G9016
USB settings- USB Controller -Enabled/ Intel USB 3.0 Mode -Auto/ Legacy USB Support - Enabled/ Legacy USB3 Support -Enabled/ USB Compatibility Patch -Disabled.
Using latest USBInjectAll and x99_XHC kexts
Hi there.

Way back at the beginning of this thread @RehabMan explains how to include or exclude certain ports so you can complete your port discovery - even without a port-limit patch in place.

Unfortunately the PLR-Patches often become broken with each new Security Update to High Sierra. And because most developers have moved on to Mojave and Catalina, the new versions of High Sierra, because that's what they become, get ignored. However if the PLR-Patches aren't working you can still work around it.

@RehabMan explains you can exclude all HS ports, except your keyboard and mouse ones, so the SS ports show up in IORegistryExplorer. I won't repeat that here, it's all back in post #1. There is another way too, that should work for an X99. See my earlier post.

Remember too that Hackintool was not available back when the guide was written and it has a few idiosyncrasies in operation. Mixing the two can cause confusion.

A few tips:

1) Your X99 chipset has both XHCI and EHCI controllers. The USB3.0 ports are attached to the XHCI and the USB2.0 attached to 2x EHCI controllers.

2) The ASRock motherboard you have implements 6x USB3.0 ports and 8x USB2.0 (the X99 itself actually supports 14x USB2.0). This means that the USB3.0 ports are on the XHCI and the USB2.0 divided between the two EHCI controllers, 4x on each.

3) I don't see a reason you might use the FakePCIID_XHCIMux.kext so if you have installed it, remove it and rebuild kext-caches.

4) You should have HS01 to HS14 even though your motherboard doesn't make any available after HS08, and SS01 to SS06, plus maybe a couple of other ports with USR names.

Other than that I don't have enough information on your system to be more specific. Perhaps consider uploading a IOReg export file and list of installed kexts in EFI and L/E. Your choice.

:)
 
Joined
Dec 18, 2019
Messages
28
Motherboard
Acer Aspire A715-74G-78KF
CPU
i7-9750H
Graphics
UHD 630
Mac
MacBook Pro
Please assist, have done the mapping correctly and applied the SSDT-UIAC.aml patch.

Rebooting still shows all the ports like my boot flag is still set to -uia_ignore_rmcf. I have removed the boot flag, but all ports including the ones NOT used are still listed both in IORegistryExplorer and Hackintool.

Why is that ?
 

Attachments

Joined
Sep 27, 2012
Messages
349
Motherboard
Asrock Z270X ITX Fatality
CPU
I7-7700K
Graphics
HD 630 + RX 560
Mac
MacBook Air
Mobile Phone
Android
*Solved at #3150
Opencore so I'm not using the debug packer, hope the dropbox link below covers all.

If I use USB Mapping, USB3 ports are sporadic, the devices will show up in HS at USB2.0 speeds but not always in the SS pair, replugging solves it, and if I replug again, it's a toss whether it will show up in HS or SS. If I have a monitor hub plugged in, the computer wakes immediately from sleep. With injectall and basic limit removal, they are working correctly.

Here is what I run into with just a vanilla usbinjectall + limit removal, I don't understand why the IOSUBHostDevice(monitor hub, usb3.0) doubles up on ss07. See below for mapping questions
Screen Shot 2020-01-05 at 1.53.53 AM.png


Here(click for dropbox link) is my OpenCore EFI and DSDT dump

When I used USPMap.py it made a SSDT-UIAC with a EH01 to accomodate legacy hub for some reason so I reverted to manual and double checked via hackintool. Here's what it wanted me to put in.


Code:
DefinitionBlock ("", "SSDT", 2, "hack", "_UIAC", 0x00000000)
{
    Device (UIAC)
    {
        Name (_HID, "UIA00000")  // _HID: Hardware ID
        Name (RMCF, Package (0x04)
        {
            "EH01",
            Package (0x04)
            {
                "port-count",
                Buffer (0x04)
                {
                     0x01, 0x00, 0x00, 0x00                      
                },

                "ports",
                Package (0x02)
                {
                    "SS07",
                    Package (0x04)
                    {
                        "UsbConnector",
                        Zero,
                        "port",
                        Buffer (0x04)
                        {
                             0x01, 0x00, 0x00, 0x00                      
                        }
                    }
                }
            },

            "8086_a2af",
            Package (0x04)
            {
                "port-count",
                Buffer (0x04)
                {
                     0x10, 0x00, 0x00, 0x00                      
                },

                "ports",
                Package (0x1E)
                {
                    "HS03",
                    Package (0x04)
                    {
                        "UsbConnector",
                        0x03,

If I do this, EC shows up with power management
Code:
DefinitionBlock ("", "SSDT", 2, "APPLE ", "SsdtEC", 0x00001000)
{
    External (_SB_.PCI0.LPCB, DeviceObj)    // (from opcode)

    Scope (\_SB.PCI0.LPCB)
    {
        Device (EC)
        {
            Name (_HID, "ACID0001")  // _HID: Hardware ID
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                If (_OSI ("Darwin"))
                {
                    Return (0x0F)
                }
                Else
                {
                    Return (Zero)
                }
            }
        }
    }
}
 
Last edited:
Joined
Sep 27, 2012
Messages
349
Motherboard
Asrock Z270X ITX Fatality
CPU
I7-7700K
Graphics
HD 630 + RX 560
Mac
MacBook Air
Mobile Phone
Android
*Solved at #3150 To update, I tried downgrading my bios to 1.2(original release) which solves the usb eject issue, but this introduced a new problem, USB2.0 devices populate both HXC(SS/HS) ports, creating 22 ports total. There is also the USR1 that gets simultaneously populated by some devices. The Rubber 3.0 device is the USB3.0 one, g600 and i1display are USB2.0.

It wakes to a coma from sleep and can only be turned back on by holding power button down to kill it and booting from scratch. It woke up once on the first boot (unsure how) but won't anymore. It also keeps the blinking power led of sleep forever, as in after post as well. Coming back from sleep had solved it that once but another coma put it right back to always blinking. I tried with my old SSDT-UIAC to no avail.

How do I prune them, do I just get rid of the extra SS ports that the usb2.0 devices map to and keep only the SS that showed up when I plugged in a usb device? Likewise for the HS? You can see in the usbmap screenshot

Here's a link to ioreg, dsdt, efi folders. The EFI contains a ssdt-uiac but is disabled as I wasn't sure it would map after the bios update. The screenshot is with limit removal + EC/USBX patches.

*Further Update #1
Updating the bios to beta 1.21 (from shortly after the release of the motherboard, original being 1.20) fixes sleep and wakeup, and USB devices appear like they did with Bios 2.5 Where SS06 => HS11 in terms of plugging usb2 and usb3 in the same drive. Unfortunately, it also brings back the eject issue. I got ACPI dumps and Ioreg copies saved for 1.20 and 1.21 thinking maybe it would help solve the usb eject issue in the future since the only difference between them is small bios wise. Mainly visible in osx is that HS and SS ports match in number for the same port
 

Attachments

Last edited:
Joined
Sep 27, 2012
Messages
349
Motherboard
Asrock Z270X ITX Fatality
CPU
I7-7700K
Graphics
HD 630 + RX 560
Mac
MacBook Air
Mobile Phone
Android
As promised here are two zip files, each containing ACPI dumps and Ioreg for BIOS 1.20 and 1.21 for the Asrock z270 ITX, though the change is supposed to be minute, the 1.20 did not have the usb-eject issue while 1.21 does, perhaps someone can figure out a difference we can patch? In 1.20, HS SS numbers match for the same port, in 1.21 they do not.

*update: plot thickens. Updated back to 2.5, and if I set the ram to run 2133mhz(rather than 3200 which it is XMP specced at), the machine wakes up with one click instead of two and does not eject drives. If I set it to say 2533 however, it does not! Set it back to 2400, it works. What is going on?

FINAL UPDATE
After years, I have sleep working, usb drives not ejecting, and usb ports all mapped. Two lessons:
1) Perhaps it is by CPU spec, but usb eject and double click to wake is solved by dropping memory speed (7700k is 2400mhz, so I set it to that and lowered latency)
2) When you make your SSDT-UIAC, don't change the port numbers or the total number of ports that come in the SSDT-UIAC-ALL template, this was causing conflicts in my setup.
 
Last edited:
Joined
Sep 27, 2012
Messages
349
Motherboard
Asrock Z270X ITX Fatality
CPU
I7-7700K
Graphics
HD 630 + RX 560
Mac
MacBook Air
Mobile Phone
Android
My final question. The system works as noted above, except when I boot with my monitor (hardware calibration + built in usb 3.0 hub, EIZO CS2420). If I boot with the monitor plugged in, it auto-wakes from sleep without the display and ejects drives. Any ideas? If I boot with the monitor in rather than plug it after, it mounts it to a HS port rather than a SS port as it should and I screenshotted below.

Below is what the hub device looks like in IOreg. Here's my ssdt-uiac

Here's what the log looks like if I put it to sleep and it auto-wakes up with usb hub(display) plugged in. It doesn't always auto-wake, just sometimes. Pmset -g below as well

Code:
System-wide power settings:
Currently in use:
 standby              1
 Sleep On Power Button 1
 womp                 0
 autorestart          0
 hibernatefile        /var/vm/sleepimage
 proximitywake        0
 powernap             0
 networkoversleep     0
 disksleep            10
 standbydelayhigh     86400
 sleep                1
 autopoweroffdelay    28800
 hibernatemode        0
 autopoweroff         1
 ttyskeepawake        1
 displaysleep         10
 highstandbythreshold 50
 standbydelaylow      86400
Code:
Time stamp                Domain                  Message                                                                        Duration      Delay    
==========                ======                  =======                                                                        ========      =====    
UUID: 105933A6-09E4-4BB8-8BB1-4BD515B292DD
2020-01-06 14:17:24 -0500 Notification            Display is turned off                                                                   
2020-01-06 14:17:24 -0500 Assertions              PID 112(hidd) Summary UserIsActive "com.apple.iohideventsystem.queue.tickle.4294968306.17" 00:00:00  id:0x0x900008081 [System: DeclUser kDisp]         
2020-01-06 14:17:24 -0500 Assertions              Kernel Idle sleep preventers: -None-         
2020-01-06 14:17:24 -0500 Assertions              PID 64(powerd) Created InternalPreventSleep "com.apple.powermanagement.darkwakelinger" 00:00:00  id:0x0xd000082ac [System: PrevIdle DeclUser SRPrevSleep kCPU kDisp]         
2020-01-06 14:17:39 -0500 Assertions              PID 64(powerd) TimedOut InternalPreventSleep "com.apple.powermanagement.darkwakelinger" 00:00:14  id:0x0xd000082ac [System: DeclUser SRPrevSleep kCPU kDisp]         
2020-01-06 14:17:39 -0500 Assertions              Summary- [System: DeclUser kDisp] Using AC         
2020-01-06 14:17:39 -0500 Sleep                   Entering Sleep state due to 'Software Sleep pid=106': Using AC (Charge:0%) 26 secs  
2020-01-06 14:17:41 -0500 PM Client Acks          Delays to Sleep notifications: [com.apple.apsd is slow(1608 ms)]          
2020-01-06 14:17:56 -0500 Kernel Client Acks      Delays to Sleep notifications: [AppleHDADriver driver is slow(msg: SetState to 0)(1015 ms)] [AMDFramebufferVIB driver is slow(msg: SetState to 1)(2104 ms)] [BroadcomBluetoothHostControllerUSBTransport driver is slow(msg: SetState to 1)(361 ms)] [AppleAHCIDiskQueueManager driver is slow(msg: SetState to 0)(1148 ms)] [en0 driver is slow(msg: WillChangeState to 0)(5279 ms)]          
2020-01-06 14:17:56 -0500 Assertions              PID 200(mDNSResponder) Created MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd000082bf [System: PrevIdle DeclUser BGTask SRPrevSleep kCPU kDisp]         
2020-01-06 14:17:56 -0500 Assertions              PID 200(mDNSResponder) Released MaintenanceWake "mDNSResponder:maintenance" 00:00:00  id:0x0xd000082bf [System: PrevIdle DeclUser BGTask kDisp]         
2020-01-06 14:18:05 -0500 Assertions              PID 112(hidd) TurnedOn UserIsActive "com.apple.iohideventsystem.queue.tickle.4294968306.17" 00:00:00  id:0x0x900008081 [System: DeclUser kDisp]         
2020-01-06 14:18:05 -0500 Assertions              PID 64(powerd) Created InternalPreventSleep "PM configd - Wait for Device enumeration" 00:00:00  id:0x0xd000082c1 [System: DeclUser SRPrevSleep kCPU kDisp]         
2020-01-06 14:18:05 -0500 DarkWake                DarkWake from Normal Sleep [CDN] due to /HID Activity: Using AC (Charge:0%) 1 secs   
2020-01-06 14:18:05 -0500 WakeDetails             DriverReason:PXSX - DriverDetails:                                        
DriverReason:WiFi.ScanOffload - DriverDetails:                            
2020-01-06 14:18:05 -0500 HibernateStats          hibmode=0 standbydelay=86400                                                             18           
2020-01-06 14:18:05 -0500 WakeTime                WakeTime: 9.182 sec                                                                     
2020-01-06 14:18:05 -0500 Kernel Client Acks      Delays to Wake notifications: [en0 driver is slow(msg: DidChangeState to 1)(863 ms)] [PRT1 driver is slow(msg: SetState to 2)(1167 ms)] [PRT0 driver is slow(msg: SetState to 2)(1168 ms)] [PRT3 driver is slow(msg: SetState to 2)(1171 ms)] [PRT2 driver is slow(msg: SetState to 2)(1171 ms)] [PRT4 driver is slow(msg: SetState to 2)(7268 ms)] [AMDFramebufferVIB driver is slow(msg: SetState to 1)(345 ms)]          
2020-01-06 14:18:05 -0500 Assertions              PID 64(powerd) Created InternalPreventSleep "com.apple.powermanagement.acwakelinger" 00:00:00  id:0x0xd000082c2 [System: DeclUser SRPrevSleep kCPU kDisp]         
2020-01-06 14:18:05 -0500 Assertions              Kernel Idle sleep preventers: IODisplayWrangler         
2020-01-06 14:18:05 -0500 Notification            Display is turned on                                                                    
2020-01-06 14:18:06 -0500 Wake                    DarkWake to FullWake from Normal Sleep [CDNVA] due to HID Activity: Using AC (Charge:0%)          
2020-01-06 14:18:06 -0500 WakeDetails             DriverReason:PXSX - DriverDetails:                                        
DriverReason:WiFi.ScanOffload - DriverDetails:                            
2020-01-06 14:18:06 -0500 HibernateStats          hibmode=0 standbydelay=86400                                                             18           
2020-01-06 14:18:06 -0500 WakeTime                WakeTime: 1.493 sec                                                                     
2020-01-06 14:18:06 -0500 Kernel Client Acks      Delays to Wake notifications: [AppleHDADriver driver is slow(msg: SetState to 1)(1490 ms)]          

Total Sleep/Wakes since boot at 2020-01-06 13:51:10 -0500 :5

2020-01-06 14:18:13 -0500 : Showing all currently held IOKit power assertions
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             0
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
   InternalPreventSleep           1
Listed by owning process:
   pid 112(hidd): [0x0000002600098081] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968502.3"
    Timeout will fire in 600 secs Action=TimeoutActionRelease
   pid 64(powerd): [0x00000603000d82c1] 00:00:08 InternalPreventSleep named: "PM configd - Wait for Device enumeration"
    Assertion applied on Battery power also
   pid 64(powerd): [0x00000603000d82c2] 00:00:08 InternalPreventSleep named: "com.apple.powermanagement.acwakelinger"
    Timeout will fire in 37 secs Action=TimeoutActionRelease
Kernel Assertions: 0xc=USB,BT-HID
   id=502  level=255 0x4=USB mod=12/31/69, 7:00 PM description=com.apple.usb.externaldevice.14200000 owner=Gaming Mouse G600
   id=503  level=255 0x8=BT-HID mod=12/31/69, 7:00 PM description=com.apple.driver.IOBluetoothHIDDriver owner=AppleBluetoothHIDKeyboard
   id=508  level=255 0x4=USB mod=12/31/69, 7:00 PM description=com.apple.usb.externaldevice.14500000 owner=IOUSBHostDevice
   id=509  level=255 0x4=USB mod=12/31/69, 7:00 PM description=com.apple.usb.externaldevice.14f00000 owner=IOUSBHostDevice
Idle sleep preventers: IODisplayWrangler
jajas-iMac:~ jajanene$
 

Attachments

Last edited:
Joined
Dec 18, 2019
Messages
28
Motherboard
Acer Aspire A715-74G-78KF
CPU
i7-9750H
Graphics
UHD 630
Mac
MacBook Pro
Please assist, have done the mapping correctly and applied the SSDT-UIAC.aml patch.

Rebooting still shows all the ports like my boot flag is still set to -uia_ignore_rmcf. I have removed the boot flag, but all ports including the ones NOT used are still listed both in IORegistryExplorer and Hackintool.

Why is that ?
Mark resolved !!

Edit USBInjectAll.kext/Content/info.plist
Search for entry: MacBookPro15,2
Copy and paste (duplicate) all sections mark as MacBookPro15,2
Rename the pasted entries to MacBookPro15,3

Now only my active ports are showing in IOREG. see here:

USB Inject all.png
 
Joined
Feb 10, 2015
Messages
106
Motherboard
Strawberry 5D
CPU
i5-4200U
Graphics
HD 4400,1366x768
Mac
MacBook Pro, Mac Pro
Mobile Phone
Android
Hello,

what should I do if I only have HSxx and no SSxx entries? The ports of connector type 0x3 only work with USB2.0 devices (Mouse/Keyboard) while I can only use my USB3.0 drives on 0x0 with slower speed. I attached my problem reporting files below. What would be approach to this getting to work? Hardware in Signature (Desktop #2)

Thanks in advance


used USBInjectAll + port limit patch then did usb mapping. Works fine now
 
Last edited:
Top