Contribute
Register

[Guide] Creating a Custom SSDT for USBInjectAll.kext

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
108
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:
Joined
Jan 14, 2020
Messages
2
Motherboard
Asus P8Z77-Vdeluxe
CPU
Intel i7-3770k
Graphics
NVIDIA GeForce GTX 650 Ti 2 GB
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

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
3,660
Motherboard
Gigabyte Z390M Gaming
CPU
i5-9600K
Graphics
RX 560
Mac
iMac, Mac mini
Classic Mac
eMac, iBook
Mobile Phone
iOS
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..

:)
 
Joined
Jan 14, 2020
Messages
2
Motherboard
Asus P8Z77-Vdeluxe
CPU
Intel i7-3770k
Graphics
NVIDIA GeForce GTX 650 Ti 2 GB
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?
 
Joined
May 31, 2013
Messages
1
Motherboard
Gigabyte Z370M Aorus Gaming
CPU
i5-9400
Graphics
UHD 630
Mac
Mac mini
Mobile Phone
Android
RehabMan my EnglishFU is not bad, but you are a freaking Yoda in this post of yours. Darn complicated thing.
 
Joined
Oct 18, 2013
Messages
3
Motherboard
ASRock Z370 Extreme 4
CPU
i7-8700K
Graphics
RX 5700 XT
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!
 
Joined
Dec 20, 2018
Messages
38
Motherboard
NUC 7i7DNHE
CPU
i7
Graphics
UHD 620
Mac
MacBook Pro
SOLVED. See final note.

Hi Folks. Recently built a Lenovo M93p hackintosh.

OS: Mojave 10.14.6
Clover 5.9.3.0

I identified and mapped the USB ports using the instructions in Hackintool. Everything seems to work and look correct to the best of my knowledge.
However, I tried to plug an SSD drive into the external USB ports, and it will not "register". What seems to happen, if you look at the USB ports list in Hackintool, the port lights up, but the device name flashes on and off randomly, and the device never mounts.

I know the device hardware is fine because I plugged into another Mac and successfully formatted the drive in drive utility.

I popped a number of USB2 and USB3 devices (including a card reader with card) and they mount just fine.

Any ideas? Let me know what files you'd like to see.

Thanks!

P.S.
Ugh, found this thread. Not sure if this is the root cause, but very interesting read through: Lenovo Support

P.P.S.
So I picked up a powered drive adapter for the SSD, and whala! worked.
 
Last edited:
Joined
Jul 26, 2018
Messages
670
Motherboard
Asus Z370-A Prime II
CPU
i7-8700
Graphics
RX 580
Mac
MacBook Pro
Mobile Phone
iOS
Deleted comment. Wrong thread. Sorry.
 
Last edited:
Top