Contribute
Register

[In progress] SSDT for Thunderbolt 3 Hotplug

Joined
Mar 28, 2018
Messages
27
Motherboard
Gigabyte Z370 Aorus Gaming WIFI
CPU
i7- 8700K
Graphics
RX 570
Mac
iMac
Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

It works.
1.For gigabyte aurus gaming wifi, the right bios is F5.
Bios F4 doesn't work.
2. you need to change the thunderbolt address in the ssdt, following the method at the end of the author's post. Mine is pci0 rp5.
3 it solves the problem of lg 5k, which lost all the functions: camera, sound,.. without this remedy.
Now thanks to this guide, lg 5k works perfectly in Hackintosh.


aths (PCI0.RP05), if your
Overview
The Thunderbolt hotplug is a problem that has existed for many years, and until now the only way to have working TB devices is to connect them and turn them on before boot.
Finally after a long time some progress has been made.

This is not a guide! But a starting point for further progress.

CHIPSET X299 - TB on PEG
Thunderbolt hotplug is fully supported!
The complete guide for the X299 TB hotplug can be found HERE in the @kgp guide.


OTHERS CHIPSET - TB on PCH
The hotplug has not yet been fully implemented for now, but considerable progress has been made.
ATTENTION:
All the next SSDTs are based on my ACPI paths (PCI0.RP05), if your paths are different you have to modify them inside the SSDT.
> If you're not familiar with this check the EXTRA part at the end of this post <


For many Gigabyte user with 300_Series chipsets, the hotplug now works perfectly!
Seems that the TB hotplug is BIOS-dependent.

What you need:
It is necessary to update/downgrade the BIOS to a specific version that shows this description:
  1. Update CPU microcode for upcoming CPU
  2. Improve windows boot time
For example for the GB Z370 Ultra Gaming is the F10.
View attachment 382026
Remember to clean the CMOS after bios update and use the appropriate settings for your OS.

At this point in the section Peripherals/Thunderbolt, use these settings:
IMPORTANT!! Do not change the settings inside the red square!! They could kill your PCI-TB card.
View attachment 382028

Save everything and boot your system. I suggest doing an NVRAM reset by pressing f11 on the clover screen.

Now download the SSDT TB from the kgp guide, or use the one pre-edited on this thread: DOWNLOAD SSDT-Z370-THB3HP
No other clover settings are needed. Reboot, et voilà!

Unfortunately I do not know if the new Titan Ridge works, because it requires a later BIOS version.
If you use a TB dock (with auto power off), turn off the ERP in the bios, otherwise it will not turn on automatically at boot, but you will be forced to disconnect and reconnect it.



There are other ways to have the hotplug, but they are incomplete..

METHOD 1
Experimental SSDT to force the hotplug on TB port 1
Works only with the THB_C cable connected.

I started by adapting the SSDTs used for the X299 chipset and by modifying some _DSM methods I got positive results.
For these changes I used the original Apple Thunderbolt SSDTs:
SSDT-Thunderbolt original iMac18,3 Download
SSDT-Thunderbolt original iMacPro Download

If you have only one Thunderbolt device you can use next two SSDT!
Both SSDTs add the PCI information to System info.
USB-C not tested, I do not know if it works correctly.
Both ssdt work up to the second device, the next ones are not disconnected/reconnected correctly.
These SSDTs (V1 and V2) could be cause reboot after shutdown, it is recommended to use Fix Shutdown in Clover.
A) SSDT V1: Download
No arbitrary inject in Clover are needed.
I inserted the "PCI-Thunderbolt One" _DSM Method on DSB1 and in this way you can hotplug one device at a time.
Precisely this is what happens:
STEP 1: UAD-2 Satellite and Apollo Twin connected and turned on at boot time.
STEP 2: I turned off and then turned on the only the Apollo Twin, which was reconnected properly.
STEP 3: I turned off and on both devices, but only the first (UAD-2 Satellite) connected correctly.


B) SSDT V2: Download
No arbitrary inject in Clover are needed.
This is similar to the SSDT V1, but I added the "PCIHotplugcapable Zero" _DSM Method on DSB2 (like in iMac18,3 and iMacPro).
STEP 1: UAD-2 Satellite and Apollo Twin connected and turned on at boot time.
STEP 2: I turned off and on both devices, but only the first (UAD-2 Satellite) connected correctly, while the Apollo Twin is not recognized correctly.
The addresses of the devices change, in fact they are mixed in a strange way on IOReg.


METHOD 2 (without THB_C cable): SSDT below
PREMISE: This method is only applicable to those using a PCI-Thunderbolt card and it can be useful to those who use a TB dock because it requires a device connected and turned on at boot.
Based on a discovery made by @crismac2013, I removed the THB_C cable from my GC-Alpine Ridge and something strange happened.
If you turn on the computer without Thunderbolt devices connected the PCI-TB card is not loaded, see Ioreg:

But if I have a device connected and turned on before boot the PCI card is recognized and loaded correctly, but not only, in this way you have the hotplug of all devices!


Because this happens you have 2 choices:
1- Add these Arbitrary inject on Clover:

The PciAddr is that of PXSX (See on your ioreg):


2- Or use this SSDT without Arbitrary inject: SSDT V3 Download
This solution is preferable because in this way the connected devices are shown correctly on System Info under PCI.

To succeed try these steps:
1- With your computer turned off, remove the THB_C cable.
2- Boot, enable Fix Shutdown* in Clover and add the SSDT
3- Turn off the computer
4- Connect the TB dock (The TB docks are equipped with auto power off, check that once connected it will turn on -green LED-)
5- Wait few seconds and turn on the computer
Now you should have the hotplug of all TB devices.

*I noticed that with Fix Shutdown the computer is not totally switched off, the USB and TB devices remain on.

The main problem is that when the TB is shared in the PCH lines it is not loaded by the system without THB_C cable, unlike those who have the TB under the PEG lines.

Obviously this is not a solution, but it makes clear that the problems with the TB hotplug derive from the functions that add the THB_C cable, so we are faced with two ways:
1- Finding the way to make the PCI card load from the system even without a connected THB_C cable
2- Understand what features this cable provides and whether it can be found in ACPI paths to include it in the SSDT. This would solve the problem for everyone.

>> Anyone who discovers something new that can help, is invited to share it possibly by inserting IOREG or any other data that can help to better understand <<


______________________________
ADDITIONAL HELPFUL INFORMATION



EXTRA:
An idiot mini guide to change the SSDTs ACPI path correctly :thumbup:

Download IORegistryExplorer.app (search on the web)
Download the last MaciASL.app from Rehabman repository: Download

Open your IOReg and type "Thunderbolt" in search bar in IOService view.
View attachment 327939
If your ACPI paths are different from mine (PCI0 and RP05) you will need to replace them.
Then open your SSDT with MaciASL and go to Edit > Find > Find and Replace
Check that they are correct and click on All (I entered RP09 as an example).
Do the same thing also with PCI0 if it is different from mine.
View attachment 327941
When you have replaced all ACPI paths, save and exit.
 
Joined
Jul 26, 2018
Messages
412
Motherboard
Asus Z370-A Prime II
CPU
i7-8700
Graphics
RX 580
Mac
MacBook Pro
Mobile Phone
iOS
@LeleTuratti @kgp, big thanks for your contributions here. I've been able to work in pro audio without limitations because of you guys and this community.

With version SSDT V2 from here I'm able to properly see Thunderbolt NHI and USB C in system profiler. I remember reading somewhere from @kgp that I needed to see those before Hotplug would work. Im still not able to Hotplug but I did notice that my location comes up as internal instead of a slot.

Is this what I should be chasing down?

Side note, in IOreg the usb for the card (ex3 by the way) came up as XHC3 instead of XHC2 which is what's in the SSDT. I edited that, was that the right move as well?
 
Joined
Jul 26, 2018
Messages
412
Motherboard
Asus Z370-A Prime II
CPU
i7-8700
Graphics
RX 580
Mac
MacBook Pro
Mobile Phone
iOS
Has anyone here tried making a Fake PCIID injector for this?

Edit: This was dumb, ignore.
 
Last edited:
Joined
Feb 1, 2011
Messages
8
Motherboard
Asus Prime Z370-A
CPU
i7-8700K
Graphics
UHD 630, RX 580
Mac
MacBook Air
Mobile Phone
iOS
Hi everyone and first of all thank you for all the work done here and elsewhere for making thunderbolt available on hacks.

I built, thanks to all of you, a fully working machine for music making.

MB: ASUS Z370 Deluxe Prime A
CPU: i7 8700 K
GFX: RX 580
TB: ASUS TB EX3
SOUND CARD: Focusrite Red 4Pre - It is connected to TBEX3 via Apple TB 3 to TB2 adapter.


I have one problem, though.

My sound card is working ok, hot swap is working, sleep is working but the Rednet control 2.3.3 (or 2.4b1) app sometimes sees the TB sound card and sometimes doesn't.

On the first boot it always opens ok. But if I close Rednet Control I have to open and close it several times to get it to connect to the thunderbolt sound card.


Every 3rd or 4th time I launch it doesn't see the device (Device not detected) but the sound card works regardless of the app.

Focusrite suppport says that in that case check if the device is listed in the Thunderbolt section in the system profile. Well, of course it is not, since we don't have TB local node implemented, yet.

But why does it "see" it sometimes, and sometimes not... ?

What is interesting, the previous control app "Focusrite Control 2" always connected fine. 100% of the times. Just after they switched Red 4Pre to Rednet Control the trouble began.

I have linked my debug files and focusrite drivers (the old connecting one and the new not so much) if somebody is interested in helping me out. Maybe the driver has some clues on TB local node implementation.... just guessing here...

P.S.

1. It doesn't happen on a real mac (since red device is visible under thunderbolt)
2. I tried all possible BIOS thunderbolt settings


Thanks everybody, once more.
 

Attachments

Last edited:
Joined
Jun 29, 2016
Messages
187
Motherboard
ASUS Prime X299 Deluxe
CPU
i9-7900X
Graphics
Vega 64
Damn:headbang::headbang::headbang::headbang:
Over there in Germany someone found a way for Thunderbolt Onboard Solutions.

Yeah, but he refuses to share the additional method he's found unless you pay him to build you a computer :rolleyes:
 
Joined
Jul 26, 2018
Messages
412
Motherboard
Asus Z370-A Prime II
CPU
i7-8700
Graphics
RX 580
Mac
MacBook Pro
Mobile Phone
iOS
Yeah, but he refuses to share the additional method he's found unless you pay him to build you a computer :rolleyes:
That's my mind blowing to charge to me. Off topic I know but seems scummy to me.
 
Last edited:
Joined
Jun 29, 2016
Messages
187
Motherboard
ASUS Prime X299 Deluxe
CPU
i9-7900X
Graphics
Vega 64
That's my blowing to charge to me. Off topic I know but seems scummy to me.
We’ve all gotta make a living. I don’t begrudge him that, but yeah - lotta standing on the shoulders of other people’s work going on there by the looks of it.

Honestly, based on the videos, it’s the same Hotplug we all have now - just targeted at on board TB3 users.
 
Joined
Jun 16, 2017
Messages
13
Motherboard
Asrock g81m vg4
CPU
Celeron 2.8 dual
Graphics
Ati R5 200
Mobile Phone
Android
Hi friend ! I have a hackinyish system runing fine but wih no TB hotplug . This causes a few problems i think cause sometimes it wont boot to the OS so i have to restart .

I have a Asus Z97-AR motherboard i7 4770k
with a Asus EX3 . Im trying to follow this thread but cant seem to get how this is done . Can this be done on my system ?
Is there any help guide on how to do that ?

Thanks
 

beelzebozo

Super Moderator
Joined
Mar 31, 2010
Messages
3,841
Motherboard
Main Build: ASUS z170-Deluxe
CPU
i7 - 6700K
Graphics
AMD Radeon RX 5700 XT
Mac
iMac
Classic Mac
Power Mac
Mobile Phone
iOS
Enable Hot-Plug ASUS z170-Deluxe Motherboard/Thunderbolt EX3 PCI Expansion Card

  • Method Implemented - SSDT-TB3 V1.aml only, no CLOVER modifications to Devices > PciAddr Arbitrary
  • Important - Using an iMac smbios, I had to set GPU as primary display in BIOS and enable Multi-Monitor support.
  • Change the following BIOS Settings - Some setting may automatically set when you enable Thunderbolt(TM) Support​
    • Advanced\Onboard Devices Configuration​
      • PCI-EX16_3 Bandwidth\X4 Mode
        Onboard Devices Configuration.png
    • Advanced\Thunderbolt(TM) Configuration​
      • Thunderbolt(TM) Support\Enabled​
      • Thunderbolt Usb Support\Enabled​
      • Thunderbolt Boot Support\Enabled​
      • AIC Support\Enabled​
      • AR AIC Support\Enabled​
      • Wake from Thunderbolt(TM) Devices\On​
      • Thunderbolt(TM) PCIe Cache-line size\128​
      • GPIO3 Force Pwr\On​
      • Wait time in ms after applying Force Pwr\200​
      • Skip PCI OptionRom\Disabled​
      • ACPI Removal Object Support\Disabled​
      • Security Level\No Security​
      • Reserve mem per phy slot\32​
      • Reserve P mem per phy slot\32​
      • Native OS Hot Plug\On​
      • SW SMI on TBT hot-plug\Enabled​
      • GPIO filter\Enabled​
      • ACPI Notify on TBT Hot-plug\Enabled​
      • MSI enabled in FADT\Enabled​
      • Enable CLK REQ\Disabled​
      • Enable ASPM\Disabled​
      • Enabled LTR\Disabled​
      • AIC Location Group\SB PCIE Slot​
      • AIC Location\PCIEx16_3
        Thunderbolt Configuration.png
        Thunderbolt Configuration 2.png

  • Boot\Above 4G Decoding\Enabled
    Above 4G Decoding.png

  • Save settings and restart.

  • Next you want to make sure the Thunderbolt Device has been enabled in Windows first. If that's the case, boot to macOS. You want to make sure that the Thunderbolt Device connects after macOS loads.
    Apollo Twin Duo .png
  • You'll want to run IOJones or Registry Explorer and look for PCI0/AppleACPIPCI/RP17
    • You'll notice that underneath RP17 acpi-path PXSX and pci-bridge 0 and 1 are mapped. This is incorrect.
      No SSDT-TB_V1.png
  • Download SSDT-TB3 V1.zip (also on post #1 of thread). Open it with MaciASL and find/replace RP05 with RP17 (for z170-Deluxe motheboard)
    SSDT-TB V1.png
  • Mount the EFI folder and save the SSDT that you just edited to the patched folder located at CLOVER>ACPI>patched.
  • Restart and run IOJones or Registry Explorer. You'll want to verify that the acpi paths and pci-bridges are renamed correctly as such
    With SSDT-TB_V1.png
  • Test hot-plug to confirm your implementation.
A few things that I noticed after my implementation:

  • Power off Card menu icon appeared. It didn't do anything except eject my Apollo Twin Duo. If I power the device off and turn it back on, the icon doesn't show up unless I restart; not a big deal.
    Power off card.png

  • PCI Devices
PCI list.png

  • Hot-plug also works after Sleep/Wake states.
  • Don't need to boot with my Apollo Twin powered on for it to connect any more with the SSDT. It will connect regardless.

Here's a short clip showing hot-plug:

Thanks to @LeleTuratti for the research and providing the SSDT templates.​
 

Attachments

Last edited:
Joined
Jun 16, 2017
Messages
13
Motherboard
Asrock g81m vg4
CPU
Celeron 2.8 dual
Graphics
Ati R5 200
Mobile Phone
Android
Hi friend and thanks for the reply ! I just added your SSDT for the Z370 to my Acpi>patched folder and hot swap working perfect now . No more missed boot with my TB interface and pretty solid/stable . My TB is dual with USB3.1 and the Usb is working great . I also tried with the V1 as you suggested but the usb didn't worked . It is fine to use the one I'm using or I have to use the V1 ? How to enable the usb pot if so ? Thanks again !
 
Top