Contribute
Register

A Beginner's Guide to Creating a Custom USB SSDT

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
6,756
Motherboard
Gigabyte Z490i Aorus Ultra - OC 0.6.8
CPU
i5-10600K
Graphics
GT 1030
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
No i never configured them in the past they just work

Okay. That is what I would expect :thumbup:

Looking at your screengrab from IORegistryExplorer you have all USB ports available. I would expect HS02 to also be SS02 but 16 addresses higher for the Z270 chipset, so 02,00,00,00 and 12,00,00,00 etc, unless MSI has done something unusual. HS08 would be SS08 - 08,00,00,00 & 18,00,00,00 etc.

You say you have configured the Internal ports as "UsbConnector" type 255. So have you created an SSDT for all 26 ports?
 
Joined
Dec 16, 2016
Messages
130
Motherboard
Msi z270 pro carbon
CPU
i7 7700k
Graphics
RX 580 + GTX 1080
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. Android
I have all port available because i delete all old SSDT and triyng again to set up, but what is blocking me is the difference between the usb 2 and 3 port i am wondered if is that the problem of my bluetooth and slow external usb after weak up from sleep
 
Joined
Dec 16, 2016
Messages
130
Motherboard
Msi z270 pro carbon
CPU
i7 7700k
Graphics
RX 580 + GTX 1080
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. Android
I just checked port HS13/SS06 . 0d 00 00 00 / 16 00 00 00 i dont understand
HS14/SS05 . 0e 00 00 00 / 15 00 00 00 i dont understand
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
6,756
Motherboard
Gigabyte Z490i Aorus Ultra - OC 0.6.8
CPU
i5-10600K
Graphics
GT 1030
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
I just checked port HS13/SS06 . 0d 00 00 00 / 16 00 00 00 i dont understand
HS14/SS05 . 0e 00 00 00 / 15 00 00 00 i dont understand

I don't see how USB2 port HS13 could also be USB3 port SS06...

Check which version of USBInjectAll.kext you are using.

Next, I would re-test your ports with a USB Flash-drive or hub.

Do you have any other *aml files in the "patched" directory?
 
Joined
Dec 16, 2016
Messages
130
Motherboard
Msi z270 pro carbon
CPU
i7 7700k
Graphics
RX 580 + GTX 1080
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. Android
No i dont have any aml in the patched directory, i am using last USBInjectAll.kext from Multibeast and Kext Updater, i was just creating the new aml file and replacing the port number with correct one, see in red below




// SSDT-UIAC-ALL.dsl
//
// This SSDT can be used as a template to build your own
// customization for USBInjectAll.kext.
//
// This SSDT contains all ports, so using it is the same as without
// a custom SSDT. Delete ports that are not connected or ports you
// do not need.
//
// Change the UsbConnector or portType as needed to match your
// actual USB configuration.
//
// Note:
// portType=0 seems to indicate normal external USB2 port (as seen in MacBookPro8,1)
// portType=2 seems to indicate "internal device" (as seen in MacBookPro8,1)
// portType=4 is used by MacBookPro8,3 (reason/purpose unknown)
//

DefinitionBlock ("", "SSDT", 2, "hack", "_UIAC", 0)
{
Device(UIAC)
{
Name(_HID, "UIA00000")

Name(RMCF, Package()
{
"8086_a2af", Package()
{
"port-count", Buffer() { 26, 0, 0, 0 },
"ports", Package()
{
"HS01", Package()
{
"UsbConnector", 0,
"port", Buffer() { 1, 0, 0, 0 },
},
"HS02", Package()
{
"UsbConnector", 0,
"port", Buffer() { 2, 0, 0, 0 },
},
"HS03", Package()
{
"UsbConnector", 3,
"port", Buffer() { 3, 0, 0, 0 },
},
"HS04", Package()
{
"UsbConnector", 10,
"port", Buffer() { 4, 0, 0, 0 },
},
"HS07", Package()
{
"UsbConnector", 255,
"port", Buffer() { 7, 0, 0, 0 },
},
"HS09", Package()
{
"UsbConnector", 0,
"port", Buffer() { 9, 0, 0, 0 },
},
"HS10", Package()
{
"UsbConnector", 0,
"port", Buffer() { 0a, 0, 0, 0 },
},
"HS12", Package()
{
"UsbConnector", 255,
"port", Buffer() { 0c, 0, 0, 0 },
},
"HS13", Package()
{
"UsbConnector", 3,
"port", Buffer() { 0d, 0, 0, 0 },
},
"HS14", Package()
{
"UsbConnector", 3,
"port", Buffer() { 0e, 0, 0, 0 },
},
"SS03", Package()
{
"UsbConnector", 10,
"port", Buffer() { 13, 0, 0, 0 },
},
"SS04", Package()
{
"UsbConnector", 3,
"port", Buffer() { 14, 0, 0, 0 },
},
"SS05", Package()
{
"UsbConnector", 3,
"port", Buffer() { 15, 0, 0, 0 },
},
"SS06", Package()
{
"UsbConnector", 3,
"port", Buffer() { 16, 0, 0, 0 },
},
},
},
})
}
}
//EOF
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
6,756
Motherboard
Gigabyte Z490i Aorus Ultra - OC 0.6.8
CPU
i5-10600K
Graphics
GT 1030
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
No i dont have any aml in the patched directory, i am using last USBInjectAll.kext from Multibeast and Kext Updater, i was just creating the new aml file and replacing the port number with correct one, see in red below




// SSDT-UIAC-ALL.dsl
//
// This SSDT can be used as a template to build your own
// customization for USBInjectAll.kext.
//
// This SSDT contains all ports, so using it is the same as without
// a custom SSDT. Delete ports that are not connected or ports you
// do not need.
//
// Change the UsbConnector or portType as needed to match your
// actual USB configuration.
//
// Note:
// portType=0 seems to indicate normal external USB2 port (as seen in MacBookPro8,1)
// portType=2 seems to indicate "internal device" (as seen in MacBookPro8,1)
// portType=4 is used by MacBookPro8,3 (reason/purpose unknown)
//

DefinitionBlock ("", "SSDT", 2, "hack", "_UIAC", 0)
{
Device(UIAC)
{
Name(_HID, "UIA00000")

Name(RMCF, Package()
{
"8086_a2af", Package()
{
"port-count", Buffer() { 26, 0, 0, 0 },
"ports", Package()
{
"HS01", Package()
{
"UsbConnector", 0,
"port", Buffer() { 1, 0, 0, 0 },
},
"HS02", Package()
{
"UsbConnector", 0,
"port", Buffer() { 2, 0, 0, 0 },
},
"HS03", Package()
{
"UsbConnector", 3,
"port", Buffer() { 3, 0, 0, 0 },
},
"HS04", Package()
{
"UsbConnector", 10,
"port", Buffer() { 4, 0, 0, 0 },
},
"HS07", Package()
{
"UsbConnector", 255,
"port", Buffer() { 7, 0, 0, 0 },
},
"HS09", Package()
{
"UsbConnector", 0,
"port", Buffer() { 9, 0, 0, 0 },
},
"HS10", Package()
{
"UsbConnector", 0,
"port", Buffer() { 0a, 0, 0, 0 },
},
"HS12", Package()
{
"UsbConnector", 255,
"port", Buffer() { 0c, 0, 0, 0 },
},
"HS13", Package()
{
"UsbConnector", 3,
"port", Buffer() { 0d, 0, 0, 0 },
},
"HS14", Package()
{
"UsbConnector", 3,
"port", Buffer() { 0e, 0, 0, 0 },
},
"SS03", Package()
{
"UsbConnector", 10,
"port", Buffer() { 13, 0, 0, 0 },
},
"SS04", Package()
{
"UsbConnector", 3,
"port", Buffer() { 14, 0, 0, 0 },
},
"SS05", Package()
{
"UsbConnector", 3,
"port", Buffer() { 15, 0, 0, 0 },
},
"SS06", Package()
{
"UsbConnector", 3,
"port", Buffer() { 16, 0, 0, 0 },
},
},
},
})
}
}
//EOF

Okay ...

As far a I can see the two items you have highlighted in red are correct.

There are errors though:

1) "port-count", Buffer() { 26, 0, 0, 0 }, - that should be "16,0,0,0"

2) Your graphic doesn't tell me what the port designations are, but are both HS04 and SS03 really the USB-C ports?

:)
 
Joined
Dec 16, 2016
Messages
130
Motherboard
Msi z270 pro carbon
CPU
i7 7700k
Graphics
RX 580 + GTX 1080
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. Android
Thank you for your help , I decide to use the hackintosh tool procedures and I get the attached file , everything's is working perfectly.
The method with a single all file was acting strange after restart same port was changing address and same were disappiring

After I post in patch the attached file i removed the port limit patch in kernel.

Now i have another small issue , if im using an hub connected to the internal port the machine is not going to sleep.
I need this hub for connect the RGB fan +H100i cooling, and Bluetooth, if i remove the hub i have to sacrifice the RGB fan, as soon I remove the hub everything's is back to normal , i tried with 2 different hub, is very strange.

I saw in the forum that different users are using this hub with out problem , it's possible that I cannot increase internal port with out have sleep issue
 

Attachments

  • SSDT-EC.aml
    63 bytes · Views: 25
  • SSDT-UIAC.aml
    847 bytes · Views: 28
  • SSDT-USBX.aml
    185 bytes · Views: 29
Last edited:

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
6,756
Motherboard
Gigabyte Z490i Aorus Ultra - OC 0.6.8
CPU
i5-10600K
Graphics
GT 1030
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
Thank you for your help , I decide to use the hackintosh tool procedures and I get the attached file , everything's is working perfectly.
The method with a single all file was acting strange after restart same port was changing address and same were disappiring

After I post in patch the attached file i removed the port limit patch in kernel.

Now i have another small issue , if im using an hub connected to the internal port the machine is not going to sleep.
I need this hub for connect the RGB fan +H100i cooling, and Bluetooth, if i remove the hub i have to sacrifice the RGB fan, as soon I remove the hub everything's is back to normal , i tried with 2 different hub, is very strange.

I saw in the forum that different users are using this hub with out problem , it's possible that I cannot increase internal port with out have sleep issue

It's looks as though you are actually using Hackintool to create your SSDTs. I can't help with that method but there is plenty of guidance from the author of the software.

Having said that, if you create your own SSD following the guide in this thread you should get a working USB system. The boring part is just identifying each port and numbering it.

Plugging-in a hub to an Internal header should work fine. This will not break the 15-port limit because as far as the XHC controller is concerned there is one item attached to the port. The item is a hub and what is attached to that does not use any more motherboard USB ports. Remember you can attach a USB hub to a real Mac too without any problems.

Personally I would set aside an Internal header just for the Bluetooth adapter and connect your hub to a different header. This will avoid the sleep problem you are having. Your motherboard has 4x USB3.1 Gen 1 internal ports and 4x USB2.0 internal ports. So a total of 8x internal ports should give you some freedom there.

:)
 
Last edited:
Joined
Dec 16, 2016
Messages
130
Motherboard
Msi z270 pro carbon
CPU
i7 7700k
Graphics
RX 580 + GTX 1080
Mac
  1. iMac
  2. MacBook Pro
  3. Mac mini
Mobile Phone
  1. Android
Hi, where did you see 8 port i can see only 2 x USB 2 and 2 x USB 3.1.
However yesterday i did as you said , leave on stand alone header the Bluetooth and connect only the Cooling on the hub for test but still giving this problem . The problem is the hub , i dont understand
The port now are correctly configured
Screenshot 2019-07-17 at 22.41.28.png
 

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
6,756
Motherboard
Gigabyte Z490i Aorus Ultra - OC 0.6.8
CPU
i5-10600K
Graphics
GT 1030
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
Hi, where did you see 8 port i can see only 2 x USB 2 and 2 x USB 3.1.
However yesterday i did as you said , leave on stand alone header the Bluetooth and connect only the Cooling on the hub for test but still giving this problem . The problem is the hub , i dont understand
The port now are correctly configured
View attachment 417022

Hi there.

I got the 8x ports from the MSI manual and website. You have ringed them all in red on your graphics. Remember each socket is 2x ports etc. JUSB1 and JUSB2 total 4x USB 2.0 ports and JUSB3 and JUSB4 total 4x USB 3.1 Gen 1 ports.

If you connected the bluetooth to a separate header - I would recommend either JUSB1 (1 or 2) or JUSB2 (1 or 2) then it should be configurable as a UsbConnector 255 which will cure the wake/sleep problems.

I don't know anything about the hub you are using, but it should not affect any other ports other than the one it is connected to.

I'm glad you have configured all your ports :thumbup:
 
Top