Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

*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

  • Screen Shot 2020-01-05 at 1.47.53 PM.png
    Screen Shot 2020-01-05 at 1.47.53 PM.png
    672.3 KB · Views: 84
Last edited:
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:
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

  • Screen Shot 2020-01-06 at 1.56.11 PM.png
    Screen Shot 2020-01-06 at 1.56.11 PM.png
    580.4 KB · Views: 127
  • Screen Shot 2020-01-06 at 1.56.03 PM.png
    Screen Shot 2020-01-06 at 1.56.03 PM.png
    484 KB · Views: 135
  • Screen Shot 2020-01-06 at 1.55.59 PM.png
    Screen Shot 2020-01-06 at 1.55.59 PM.png
    556 KB · Views: 125
  • Screen Shot 2020-01-06 at 1.55.26 PM.png
    Screen Shot 2020-01-06 at 1.55.26 PM.png
    336.2 KB · Views: 125
  • Screen Shot 2020-01-06 at 1.55.49 PM.png
    Screen Shot 2020-01-06 at 1.55.49 PM.png
    613.1 KB · Views: 120
Last edited:
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
 
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:
Hello,

I just finished setting up Catalina on my PC. I wanted to move forward and creat a custom ssdt for my USB ports to avoid future problems. There's no USB limits patch applied on my system atm.

My XHC controller behave normally OOB even in IOregisteryexplorer.
Screen Shot 2020-01-14 at 1.43.19 PM.png

My EH01 and EH02 "behave normally" I had few times my mouse turn off I had to switch port and it's the reason I wanted to map my USB ports also because I want to make sure they fonction correctly to add a WIFI Bluetooth pcie card that requires to be connected to a usb 2.0 internal port.

However while doing the port discovery steps I found my self stuck in the process because IORgisteryExplorer return this on my EH01 and EH02. I repeat the port are "working normally" without any patch (see EFI folder attached) but with just these USB 2.0 port I have 15 ports + 8 port on the XHC 23 total I don't understand why they are working if the limit is 15 and I wanted to fix EH01 EH02 to prevent future trouble.
Screen Shot 2020-01-14 at 1.47.44 PM.png

Since they aren't any numbers ex. (HS01@XXX) I'm not sure how to proceed from this point.

I tried searching forum/guides on the internet but nothing comes up similar to this or I haven't found it.
IF someone could point me in the right direction for the next step that would be greatly appreciated.
 

Attachments

  • EFI.zip
    3.4 MB · Views: 167
Hello,

I just finished setting up Catalina on my PC. I wanted to move forward and creat a custom ssdt for my USB ports to avoid future problems. There's no USB limits patch applied on my system atm.

My XHC controller behave normally OOB even in IOregisteryexplorer.
View attachment 445000
My EH01 and EH02 "behave normally" I had few times my mouse turn off I had to switch port and it's the reason I wanted to map my USB ports also because I want to make sure they fonction correctly to add a WIFI Bluetooth pcie card that requires to be connected to a usb 2.0 internal port.

However while doing the port discovery steps I found my self stuck in the process because IORgisteryExplorer return this on my EH01 and EH02. I repeat the port are "working normally" without any patch (see EFI folder attached) but with just these USB 2.0 port I have 15 ports + 8 port on the XHC 23 total I don't understand why they are working if the limit is 15 and I wanted to fix EH01 EH02 to prevent future trouble.
View attachment 445001
Since they aren't any numbers ex. (HS01@XXX) I'm not sure how to proceed from this point.

I tried searching forum/guides on the internet but nothing comes up similar to this or I haven't found it.
IF someone could point me in the right direction for the next step that would be greatly appreciated.

Hi there.

Don't worry that IORegistryExplorer shows HSP01 instead of HS01. That's just the way ASUS have set things up.:thumbup:

The reason your EH01/EH02 ports look the way they do, is because PR01 on each is a single port carrying a "hub". So as far as the 15-limit is concerned there are just 2x USB ports, not the 14x you might expect..

:)
 
Hi there.

Don't worry that IORegistryExplorer shows HSP01 instead of HS01. That's just the way ASUS have set things up.:thumbup:

The reason your EH01/EH02 ports look the way they do, is because PR01 on each is a single port carrying a "hub". So as far as the 15-limit is concerned there are just 2x USB ports, not the 14x you might expect..

:)

I understand why they look like that now! Thanks! Is it still worth it to make a custom ssdt in my situation?
 
RehabMan my EnglishFU is not bad, but you are a freaking Yoda in this post of yours. Darn complicated thing.
 
Hi guys,
ASRock Z370 Extreme 4 here. Unfortunately It seems I'm not able to inject the USB ports. I only see the USB 2.0. No USB 3.0 showing.
I have Catalina 10.15.2 installed, applied the 2 USB Port Limit patches required via CC, I have USBInjectAll in my kext/Other Folder along with XHCI-unsupported on the EFI.

Any help would be much appreciated.

Thanks!
 
Back
Top