- Joined
- Dec 28, 2012
- Messages
- 154
- Motherboard
- ASRock X299 CREATOR
- CPU
- i9-7920X
- Graphics
- RX 6900 XT
- Mac
- Mobile Phone
Want real Thunderbolt HotPlug/HotSwap on the fly while your Hackintosh is running? Well, than this might be your solution:
I have tested a lot of so promising Thunderbolt HotPlug SSDTs out there and none of them provide a working solution for me, so I decided to spend some time on a working solution for real Thunderbolt HotPlug/HotSwap, where you can change your Thunderbolt devices on the fly w/o restarting your Hackintosh every time you connect/change a device. Also this tutorial will work for motherboards with onboard Thunderbolt as well as for motherboards with Thunderbolt Header connector.
OK, lets start how to make it work
As in many other threads, the first thing you have to know is where your Thunderbolt hardware belongs in your ACPI path. To find out where it belongs, just open "IORegistryExlorer" while booting normally into macOS. Than search for some entrys like this:
Just for explanation: ASRock Z270 Super Carrier used builtin/onboard Thunderbolt 3, while ASRock Z370 Professional Gaming i7 uses Thunderbolt Header and a GC Gigabyte Titan Ridge PCIe card for Thunderbolt 3. As you can see for the Z270 the ACPI path looks like RP01/PXSX, while ACPI path for Z370 looks like PEG2/PEGP. Remember these entries for later modification when it comes to edit the Thunderbolt SSDT file.
Second: lets set the right BIOS settings for working Thunderbolt HotPlug/HotSwitch.
Lets take a look at the default BIOS settings for the given two sample motherboards ASRock Z270/370. The following screenshots shows their default settings for Thunderbolt when you install their latest BIOS revisions:
These are all settings for Thunderbolt given by default from ASRock on their Motherboards. But there are even more settings for Thunderbolt within their BIOS files, which need to be "unlocked" first. After doing so, there might be a lot of more settings, like this:
To make HotPlug/HotSwap working for your motherboard, just look for similar settings in your BIOS for Thunderbolt and set them as shown in the above screens. Sorry, I could only provide screenshots from ASRock machines, cause I do not have any other manufacturer. The most impotent settings you need are "Thunderbolt (TM) Force Power" (which not all boards will have) and "GPIO3 Force Pwr" (which I recognized allmost every manufacturer will have in their BIOS settings for Thunderbolt). Just set these two settings to "ENABLED". <--- otherwise HotPlug/HotSwap will not work as expected. Also, it is important to switch a setting called "AIC Location" from "NB PCIE D01F0" to "NB PCIE D01F2". Notice: on Z270 Super Carrier I had to set this setting from NB PCIE D01F0 to NB PCIE D01F2, while on the Z370 Professional Gaming i7 it was set to NB PCIE D01F02 by default. If all settings set as described, save your settings and restart your Hackintosh.
Third: prepare an SSDT for Thunderbolt to use with your Hackintosh. Place the SSDT file in the following location:
Attached to this tutorial you will find a sample SSDT (SSDT-10-TbtOnPch.aml), which we use to modify for our needs. Lets take a look at its code:
Remember your ACPI values from part one of this tutorial? These values are now needed to make this SSDT work for your personal machine. You might notice that the sample SSDT file is from my ASRock Z270 Super Carrier, cause the used ACPI values are RP01/PXSX within our sample. So all you need to do, is to change the values RP01/PXSX used in this sample SSDT to your values. If you open the sample SSDT within "MaciASL" you will get line numbers, so I tell you, for which line you have to edit the given values:
Line 23: External (_SB_.PCI0.RP01, DeviceObj)
Line 24: External (_SB_.PCI0.RP01.PXSX, DeviceObj)
Line 27: External (PXSX, DeviceObj) // (from opcode)
Line 29: Scope (_SB.PCI0.RP01)
Line 31: Scope (PXSX)
Line 38: Notify (\_SB.PCI0.RP01.UPSB.DSB0.NHI0, 0x02)
After you change these values to the values you found for your ACPI path, just save the so modified SSDT to the above given path, restart your Hackintosh and enjoy full working HotPlug/HotSwap for all your Thunderbolt devices (also working for USB-C devices connected to your Thunderbolt ports).
Feedback on how it works for you is welcome. I might help as long as i can.
Regards,
Mork vom Ork
I have tested a lot of so promising Thunderbolt HotPlug SSDTs out there and none of them provide a working solution for me, so I decided to spend some time on a working solution for real Thunderbolt HotPlug/HotSwap, where you can change your Thunderbolt devices on the fly w/o restarting your Hackintosh every time you connect/change a device. Also this tutorial will work for motherboards with onboard Thunderbolt as well as for motherboards with Thunderbolt Header connector.
OK, lets start how to make it work
As in many other threads, the first thing you have to know is where your Thunderbolt hardware belongs in your ACPI path. To find out where it belongs, just open "IORegistryExlorer" while booting normally into macOS. Than search for some entrys like this:
Sample of ASRock Z270 Super Carrier |
Sample of ASRock Z370 Professional Gaming i7 |
Just for explanation: ASRock Z270 Super Carrier used builtin/onboard Thunderbolt 3, while ASRock Z370 Professional Gaming i7 uses Thunderbolt Header and a GC Gigabyte Titan Ridge PCIe card for Thunderbolt 3. As you can see for the Z270 the ACPI path looks like RP01/PXSX, while ACPI path for Z370 looks like PEG2/PEGP. Remember these entries for later modification when it comes to edit the Thunderbolt SSDT file.
Second: lets set the right BIOS settings for working Thunderbolt HotPlug/HotSwitch.
Lets take a look at the default BIOS settings for the given two sample motherboards ASRock Z270/370. The following screenshots shows their default settings for Thunderbolt when you install their latest BIOS revisions:
ASRock Z270 Super Carrier BIOS 2.40 |
ASRock Z370 Professional Gaming i7 BIOS 4.00 |
These are all settings for Thunderbolt given by default from ASRock on their Motherboards. But there are even more settings for Thunderbolt within their BIOS files, which need to be "unlocked" first. After doing so, there might be a lot of more settings, like this:
ASRock Z270 Super Carrier all settings unlocked |
ASRock Professional Gaming i7 all settings unlocked |
To make HotPlug/HotSwap working for your motherboard, just look for similar settings in your BIOS for Thunderbolt and set them as shown in the above screens. Sorry, I could only provide screenshots from ASRock machines, cause I do not have any other manufacturer. The most impotent settings you need are "Thunderbolt (TM) Force Power" (which not all boards will have) and "GPIO3 Force Pwr" (which I recognized allmost every manufacturer will have in their BIOS settings for Thunderbolt). Just set these two settings to "ENABLED". <--- otherwise HotPlug/HotSwap will not work as expected. Also, it is important to switch a setting called "AIC Location" from "NB PCIE D01F0" to "NB PCIE D01F2". Notice: on Z270 Super Carrier I had to set this setting from NB PCIE D01F0 to NB PCIE D01F2, while on the Z370 Professional Gaming i7 it was set to NB PCIE D01F02 by default. If all settings set as described, save your settings and restart your Hackintosh.
Third: prepare an SSDT for Thunderbolt to use with your Hackintosh. Place the SSDT file in the following location:
EFI/CLOVER/ACPI/patched
Attached to this tutorial you will find a sample SSDT (SSDT-10-TbtOnPch.aml), which we use to modify for our needs. Lets take a look at its code:
Code:
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20161210-64(RM)
* Copyright (c) 2000 - 2016 Intel Corporation
*
* Disassembling to non-symbolic legacy ASL operators
*
* Disassembly of iASLI5x7qz.aml, Sun Sep 1 21:42:58 2019
*
* Original Table Header:
* Signature "SSDT"
* Length 0x000002C8 (712)
* Revision 0x02
* Checksum 0x40
* OEM ID "APPLE "
* OEM Table ID "TbtOnPCH"
* OEM Revision 0x00001000 (4096)
* Compiler ID "INTL"
* Compiler Version 0x20161210 (538317328)
*/
DefinitionBlock ("", "SSDT", 2, "APPLE ", "TbtOnPCH", 0x00001000)
{
External (_SB_.PCI0.RP01, DeviceObj) // (from opcode)
External (_SB_.PCI0.RP01.PXSX, DeviceObj) // (from opcode)
External (_SB_.PCI0.XHC_, DeviceObj) // (from opcode)
External (DTGP, MethodObj) // 5 Arguments (from opcode)
External (PXSX, DeviceObj) // (from opcode)
Scope (_SB.PCI0.RP01)
{
Scope (PXSX)
{
Name (_STA, Zero) // _STA: Status
Method (NTFY, 2, NotSerialized)
{
If (LEqual (Arg0, 0x02))
{
Notify (\_SB.PCI0.RP01.UPSB.DSB0.NHI0, 0x02)
}
}
}
Device (UPSB)
{
Name (_ADR, Zero) // _ADR: Address
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (0x0F)
}
Device (DSB0)
{
Name (_ADR, Zero) // _ADR: Address
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (0x0F)
}
Device (NHI0)
{
Name (_ADR, Zero) // _ADR: Address
Name (_STR, Unicode ("Thunderbolt")) // _STR: Description String
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (0x0F)
}
Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method
{
If (LEqual (Arg0, ToUUID ("a0b5b7c6-1318-441c-b0c9-fe695eaf949b")))
{
Store (Package (0x0B)
{
"AAPL,slot-name",
Buffer (0x09)
{
"Built In"
},
"device_type",
Buffer (0x19)
{
"Thunderbolt 3 Controller"
},
"model",
Buffer (0x1E)
{
"GC Titan Ridge TB3 Controller"
},
"name",
Buffer (0x0F)
{
"UPSB-DSB0-NHI0"
},
"power-save",
One,
Buffer (One)
{
0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
Return (Zero)
}
}
Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method
{
If (LEqual (Arg0, ToUUID ("a0b5b7c6-1318-441c-b0c9-fe695eaf949b")))
{
Store (Package (0x06)
{
"model",
Buffer (0x0A)
{
"UPSB-DSB0"
},
"name",
Buffer (0x0A)
{
"UPSB-DSB0"
},
"PCIHotplugCapable",
One
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
Return (Zero)
}
}
Method (_DSM, 4, NotSerialized) // _DSM: Device-Specific Method
{
If (LEqual (Arg0, ToUUID ("a0b5b7c6-1318-441c-b0c9-fe695eaf949b")))
{
Store (Package (0x06)
{
"model",
Buffer (0x0A)
{
"UPSB"
},
"name",
Buffer (0x0A)
{
"UPSB"
},
"PCI-Thunderbolt",
One
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
Return (Zero)
}
}
}
}
Remember your ACPI values from part one of this tutorial? These values are now needed to make this SSDT work for your personal machine. You might notice that the sample SSDT file is from my ASRock Z270 Super Carrier, cause the used ACPI values are RP01/PXSX within our sample. So all you need to do, is to change the values RP01/PXSX used in this sample SSDT to your values. If you open the sample SSDT within "MaciASL" you will get line numbers, so I tell you, for which line you have to edit the given values:
Line 23: External (_SB_.PCI0.RP01, DeviceObj)
Line 24: External (_SB_.PCI0.RP01.PXSX, DeviceObj)
Line 27: External (PXSX, DeviceObj) // (from opcode)
Line 29: Scope (_SB.PCI0.RP01)
Line 31: Scope (PXSX)
Line 38: Notify (\_SB.PCI0.RP01.UPSB.DSB0.NHI0, 0x02)
After you change these values to the values you found for your ACPI path, just save the so modified SSDT to the above given path, restart your Hackintosh and enjoy full working HotPlug/HotSwap for all your Thunderbolt devices (also working for USB-C devices connected to your Thunderbolt ports).
Feedback on how it works for you is welcome. I might help as long as i can.
Regards,
Mork vom Ork
Attachments
Last edited: