Jump to content

ThunderBolt Drivers


406 posts in this topic

Recommended Posts

One thing annoying with the ASRock x299 + ASRock TB3 card is that I get the same problem I was getting with the GB Designare EX.

After I reboot macOS, I must unplug + replug my Promise Pegasus R2, otherwise either Windows wouldn't boot, or macOS won't detect the Pegasus. Luckily hotplug works about 90% of the time, so I can just unplug the TB cable and plug it back in, and the drives will be mounted, and all the Apple Display peripherals works again.

Link to comment
Share on other sites

@maleorderbrideTrying to figure out why USB-C doesn't work (at all) with the ASRock TB3 card on the ASRock x299 Professional Gaming 9 XE board (it was working perfectly with the Gigabyte x299 Gaming 7 Pro).

How did you determine the address of the various SSP1/SSP2 and HS01/HS02?

Looking at the ioreg of a real iMac Pro, there's nothing other than SSP1/SSP2

The addresses are also showing as SSPS@00100000, the real ACPI device UPSB.SDB2.XHC2.RHUB.SSP1 was _ADR = 0x03 and _ADR 0x04.

On the ASRock it becomes SSP1@02100000 and SSP2@02200000 (the address of the SSP1,SSP2 however is 0x01 and 0x02 respectively)

The iMac Pro uses the same TB chipset as the ASRock card (or the GB rev2): pci8086,15d2

My setup is very close to what the iMac Pro uses:

iMac Pro: PC02.BR2C.UPSB

ASRock: PC02.BR2A.UPSB (using renamed PEGP)

Any pointers?

Thanks

Screen Shot 2018-04-13 at 7.31.19 pm.png

Link to comment
Share on other sites

5 hours ago, jya said:

@maleorderbrideTrying to figure out why USB-C doesn't work (at all) with the ASRock TB3 card on the ASRock x299 Professional Gaming 9 XE board (it was working perfectly with the Gigabyte x299 Gaming 7 Pro).

How did you determine the address of the various SSP1/SSP2 and HS01/HS02?

Looking at the ioreg of a real iMac Pro, there's nothing other than SSP1/SSP2

The addresses are also showing as SSPS@00100000, the real ACPI device UPSB.SDB2.XHC2.RHUB.SSP1 was _ADR = 0x03 and _ADR 0x04.

On the ASRock it becomes SSP1@02100000 and SSP2@02200000 (the address of the SSP1,SSP2 however is 0x01 and 0x02 respectively)

The iMac Pro uses the same TB chipset as the ASRock card (or the GB rev2): pci8086,15d2

My setup is very close to what the iMac Pro uses:

iMac Pro: PC02.BR2C.UPSB

ASRock: PC02.BR2A.UPSB (using renamed PEGP)

Any pointers?

Thanks

Screen Shot 2018-04-13 at 7.31.19 pm.png

I took the values from PikerAlpha's blog, but I also posted where he derived them from (published APCI specs) that are freely accessible (page 4 or 5 of this thread).

Copying the iMacPro makes the most sense to me, so why not try cutting the HS01/02, and change the 0x81 in the PLD's to 0x82. I'm not sure about the other values in the PLD buffer as the ACPI specs don't define what Piker chose to do there. The specs do offer other examples you could try though.

Perhaps you should change your devices to match your actual ADR's found in a raw ACPI dump. My USB 3.1 device was at 0x00020000 so I inserted that device at DSB2 (the MacBookPro13,3 had the same pairing of 0x00020000 with DSB2 for it's 3.1), but perhaps your need to adjust the location or ADR? I allude to this in my original post, but this is just speculation on my part.

Edited by maleorderbride
Link to comment
Share on other sites

 

Thank you for a great guide!!

 

I applied SSDT-TB3 and now shutdown function is broken. Sleep/Wake is working fine.

Does anyone have this issue? Computer turned off for 2-3sec and restarted itself. I applied 'fixshutdown' or ERP bios setting but not worked. but if I do not use SSDT-TB3, it works well.

Link to comment
Share on other sites

49 minutes ago, buyjoey said:

 

Thank you for a great guide!!

 

I applied SSDT-TB3 and now shutdown function is broken. Sleep/Wake is working fine.

Does anyone have this issue? Computer turned off for 2-3sec and restarted itself. I applied 'fixshutdown' or ERP bios setting but not worked. but if I do not use SSDT-TB3, it works well.

The adapted SSDT-TB3 doesn't do much for me(doesn't enable hotswap or TB networking) , but shutdown works fine.

Link to comment
Share on other sites

Spoiler

 

Thanks Matthew82 ! :

After a week of severals issues :

1/ Bios recommended parameters + Pci devices set as Legacy 

2/ I added this from your post on my config.plist

3/ I created my own SSDT

What is working :

- Hot plug USB or HDD pluged on USB 3.1 or USB C : eject and re-plug OK ( My WINDOWS_10_ HDD connected up right )

Not working ( working in Windows 10 )

- Display sreen connected on USB C

 

 

 

 

 

 

SSDT-TB3U2.aml.zip

Loloflat6_TB3_15_04_2018_2.png

Edited by Loloflat6
  • Like 1
Link to comment
Share on other sites

My issue is solved :

 jyavenard tell me to use Vega5KFixup kext   https://github.com/jyavenard/Vega5KFixup

I can boot with the ThunderboltEx 3 connected on USB C !

Nice day !

[Sapphire Radeon Nitro+ SE RX580 is fully supported on 10.13.4 : no boot flag/ no kext needed]

Loloflat6_TB3_USBC_15_04_2018.png

Edited by Loloflat6
Link to comment
Share on other sites

I update my situation:
Until now I have run all my attempts with 2 or more devices connected to the chain, because it will be my final configuration.
All tests: UAD Satellite> UAD Apollo Twin
Some tests: Belkin TH 2 dock> UAD Satellite> UAD Apollo Twin

So far I have not been successful with any SSDT or Arbitrary inject, so I have removed everything and dismembered my device chain.
I noticed that if I connect only one Thunderbolt device, the hotplug works (without SSDT or Arbitrary inject).
I then tried with 2 devices and it happens that only the first is reconnected after having turned it off.
However I can not be satisfied because because this happens, the devices must be connected and turned on before booting (as always), and the most important thing is that they do not work well. After "hotplug" if I try to play audio from my Apollo Twin the computer freezes and if I turn off the Apollo Twin during the freeze, the computer turns off suddenly.

I checked what happens in IOReg and it seems that after turning off the device it remains visible in the ACPI paths (it is not crossed with red).
With many previously used SSDTs, the devices were disconnected correctly, but were not reconnected later.

Link to comment
Share on other sites

14 hours ago, lelet said:

I update my situation:
Until now I have run all my attempts with 2 or more devices connected to the chain, because it will be my final configuration.
All tests: UAD Satellite> UAD Apollo Twin
Some tests: Belkin TH 2 dock> UAD Satellite> UAD Apollo Twin

So far I have not been successful with any SSDT or Arbitrary inject, so I have removed everything and dismembered my device chain.
I noticed that if I connect only one Thunderbolt device, the hotplug works (without SSDT or Arbitrary inject).
I then tried with 2 devices and it happens that only the first is reconnected after having turned it off.
However I can not be satisfied because because this happens, the devices must be connected and turned on before booting (as always), and the most important thing is that they do not work well. After "hotplug" if I try to play audio from my Apollo Twin the computer freezes and if I turn off the Apollo Twin during the freeze, the computer turns off suddenly.

I checked what happens in IOReg and it seems that after turning off the device it remains visible in the ACPI paths (it is not crossed with red).
With many previously used SSDTs, the devices were disconnected correctly, but were not reconnected later.

You are saying that thunderbolt hotplug works natively on your machine with no edits of any kind? I don't think that is the case as you would be the only person in the world to have this. It seems more likely you have other files or pieces still in place.

 

It is quite possible this method simply will not work for your purposes. Note, this is "PCI hotplug" not actual native Thunderbolt hotplug, so it may not work here. Also, some devices do not support either thunderbolt hotplug, or do not support PCI hotplug. You would need to check in the Info.plist of your device kexts to see if they even contain IOPCITunnelCompatible=Yes, or perhaps other settings.

  • Like 1
Link to comment
Share on other sites

Yes, but it is not a real hotplug, very simply when I turn off my device (UAD Apollo Twin is a powered device always connected with a power button), the system does not disconnect properly, in fact I continue to see it on IOReg but not on the UAD app. 
When I turn on the UAD device, it reappears on the UAD app (but the usual popup does not appear: Re-connecting to hardware ...) and if I try to play audio the computer freeze up and goes out as soon as I turn off the Apollo Twin UAD.

Note that in my case, all the devices are reconnected correctly after sleep, even my Belkin dock.

In the kext of my devices there is IOPCITunnelCompatible=true5ad5c10cbe009_Schermata2018-04-17alle11_21_37.png.4ca48cd186a4451891c4174292036583.png

I also tried your method5ad5c2f2f0d0b_Schermata2018-04-17alle11_45_30.png.636d97684d6c0d1ba84ebf2e032d5e19.png5ad5c97cde01f_Schermata2018-04-17alle12_13_01.png.1ffbe77b5814070f2abede28a96bacf1.png

Now in system profile the Thunderbolt devices that I connect are correctly seen.5ad5c99d535bd_Schermata2018-04-17alle12_12_23.png.f08d4b2ac590f1a08985575c7a6d28af.png

And they are disconnected correctly. Unfortunately they are no longer reconnected later.5ad5c9bb1bc11_Schermata2018-04-17alle12_15_13.thumb.png.3cbcf41ac09a310e407a2724d9e3659e.png

I compared my IOREG with a real iMac18,3 IOReg and I noticed that there are some different voices.
I think the solution is simpler than it seems, but we should understand what prevents Thunderbolt drivers from working properly...

Edited by lelet
Link to comment
Share on other sites

17 hours ago, maleorderbride said:

You are saying that thunderbolt hotplug works natively on your machine with no edits of any kind? I don't think that is the case as you would be the only person in the world to have this. It seems more likely you have other files or pieces still in place.

Success!!! Finally I managed to enable the hotplug in my Gigabyte Alpine Ridge on MB Z370!
However there are still some corrections to be made, because currently only the first device in the chain is hotpluggable.

Special thanks to everyone who helped and contributed to making this possible!

By combining @maleorderbride's method and @Matthew82's SSDT I can now connect my devices whenever I want. However only the first device reconnects correctly, so I tried the @Loloflat6's SSDT (adapting it to my ACPI paths), but the result is the same with the only difference that the various pci-bridge@# are not renamed in DSB#@.

It was enough to add this Arbitrary inject (DSB1 pcidebug):08-01-00.png.9ad8e08c2c3a64590fd2438ee49b04eb.png

Also adding this Arbitrary inject (not mandatory), the information in the PCI system info is displayed (UPSB pcidebug):07-00-00.png.bdd22b069ef610a55d9701525fc11db4.png5ad62f715be93_PCIinfo.png.ee2d0e58e9017cdabb5e238964470b0c.png

As I said before, however, only the first device in the chain connects correctly. The second device (APOLLO TWIN) even if switched off, is not disconnected correctly until I turn off the first device (UAD 2 Satellite). You probably need to make changes to the SSDT to get the pci-bridge managed differently. Here's how my devices behave now:IOReg.thumb.png.99118a252db54c4bed71e32a0ece2919.png

As you can see, the hotplug is limited to pci-bridge@3.

By making a comparison with the IOReg of my MacBook Pro (same connected/disconnected devices), we see the difference:5ad6346072b57_IORegMacBook.thumb.png.85201c2a13c2ce72afbd615000abbea0.png

I specify that even my Belkin dock is hotpluggable, but subsequent devices behave as described above.

I think that now we are almost there and this could be the way to finally activate the hotplug even in the MB series 100/200/300.

Could someone help me edit or create a proper SSDT? All those created so far only work with the first connected device, so I think it can be useful to everyone.
I am at your disposal :)

SSDT by Matthew82.aml.zip

SSDT by Loloflat6.aml.zip

Edited by lelet
Add SSDT
  • Like 2
  • Thanks 3
Link to comment
Share on other sites

Nice job !

I will take a look this evening .

On my rig the port@11000 is working with one USB C and one USB 3.1 :  i will do some test and attach my IOreg as you done.

The Asus TB3 have one USB C and one USB 3.1 ports , the Gigabyte Alpine Ridge have 2 x USB C and 2 x USB 3.1 ports :

So we will try to find a way to have your both ports working with Hot-plug , not easy but interresting.

 

Edited by Loloflat6
  • Like 2
Link to comment
Share on other sites

New update! I am able to get the hotplug using only one SSDT!
However always and only the first device is hotpluggable.
I imagine then there may be errors and optimizations to do (I'm not at all expert in this :) ).

SSDT-TB3.aml.zip

If not work, add this entry (only the first) on clover (UPSB address):Schermata 2018-04-17 alle 11.45.30.png

Reboot, remove the Arbitrary inject and reboot again.

35 minutes ago, Loloflat6 said:

@lelet

Please can you upload your IOreg 

Here is my IOReg with this SSDT. I do not know if the USB-C works because I have such devices, but hopefully we can implement it later.

IOReg: TB3 Partial-Hotplug.zip

@Loloflat6 GC-Alpine Ridge is identical to Asrock, in fact it has 2 Thunderbolt 3 ports and no USB 3.1 port on the card

Edited by lelet
  • Like 3
Link to comment
Share on other sites

  I have take a look at yours SSDT and IOReg :

The problem was perhaps  on :

 Device (UPS0)

                Device (DSB0)

Those line were missing to removal status :

  Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                                {
                                    If (Zero)
                                    {
                                        Return (One)
                                    }

                                    Return (Zero)
                                }
So i  added this.

Can you try this SSDT.

 

SSDT-TBARLOLO.aml.zip

 

Edited by Loloflat6
  • Like 1
Link to comment
Share on other sites

I just tried SSDT-TBARLOLO.aml on my system, but hot swap doesn't work at all for TB or USB-C. Some stuff that's connected at boot is not seen in About this Mac... but works nonetheless. TB-TB networking in OSX has never worked.

This has been the situation in OSX since day one with this build, without any patches, just by enabling TB and upgrading TB in Windows.

See ioreg after unplugging/replugging. What am I missing? I only used the ssdt, nothing else.

My z170x has 2 builtin combo ports for TB3 and USB-C. 

Schermafbeelding 2018-04-18 om 21.30.25.png

Link to comment
Share on other sites

Ok :

Your mobo  has 2 builtin combo ports for TB3 and USB-C  and  so may be different for proper PCI implementation.

Edited by Loloflat6
Link to comment
Share on other sites

1 hour ago, Loloflat6 said:

  I have take a look at yours SSDT and IOReg :

The problem was perhaps  on :

 Device (UPS0)

                Device (DSB0)

Those line were missing to removal status :

  Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                                {
                                    If (Zero)
                                    {
                                        Return (One)
                                    }

                                    Return (Zero)
                                }
So i  added this.

Can you try this SSDT.

 

SSDT-TBARLOLO.aml.zip

 

Your SSDT is not the last one I uploaded, and unfortunately it works partially like those of my previous post.
Only one device is hotpluggable, and only if I add DSB1 address in Arbitrary inject

Edited by lelet
Link to comment
Share on other sites

2 minutes ago, lelet said:

Your SSDT is not the last one I uploaded, and unfortunately it works partially like those of my previous post.
Only one device is hotpluggable

Yes I have seen : but this SSDT seems to be "truncated" for your Alpine Ridge , so I  preferred go with the previous, but not mach with the modifications I made...

I ( we) must persevere to do it work...

 

Link to comment
Share on other sites

So I had go further according to your IOreg and previous SSDT :

on :

       Device (DSB0)

                            Device (DEV0)

those lines were missing too compared to 

      Device (DSB3)

                            Device (DEV0)

                                  Method (_RMV, 0, NotSerialized)  // _RMV: Removal Status
                                    {
                                        If (Zero)
                                        {
                                            Return (One)
 

So I added those lines too 

Device (DSB0) /    Device (DEV0)

And now in SSDT Device (DSB0) and Device (DSB3) witch allow Hot-plug are the same.

May be working now...finger crossed...

SSDT-TBARLOLO2.zip

Edited by Loloflat6
Link to comment
Share on other sites

4 hours ago, lelet said:

New update! I am able to get the hotplug using only one SSDT!
However always and only the first device is hotpluggable.
I imagine then there may be errors and optimizations to do (I'm not at all expert in this :) ).

SSDT-TB3.aml.zip

If not work, add this entry (only the first) on clover (UPSB address):Schermata 2018-04-17 alle 11.45.30.png

Reboot, remove the Arbitrary inject and reboot again.

Here is my IOReg with this SSDT. I do not know if the USB-C works because I have such devices, but hopefully we can implement it later.

IOReg: TB3 Partial-Hotplug.zip

@Loloflat6 GC-Alpine Ridge is identical to Asrock, in fact it has 2 Thunderbolt 3 ports and no USB 3.1 port on the card

Almost couldn't believe my eyes first! But... SUCCESS FOR ME!!

Used this SSDT and just hotplugget my Focusrite Clarett 4Pre multiple times, tried both turning on and off the device and pulling the thunderbolt cable out and in. The ioreg shows red when disconnected and green when reconnected. WOW! 

I have a GB Z270x Gaming 5 with a GB Alpine Ridge Rev 1.0,  Strange this is that after sleep the device don't disconnect properly and is unusable, so strange! And sleep with TB is the main thing I'm after lol!

 

Any ides about it not working when waking from sleep. It seems in the ioreg that it doesn't disconnect properly when going in to sleep, bios related?

Edited by Ribor92
  • Like 2
Link to comment
Share on other sites

24 minutes ago, zipb said:

Another observation: with  SSDT-TBARLOLO.aml installed, when I shutdown my hack it reboots instead.

Gigabyte Z170X-UD5-TH/2 combo TB3/USB3.1 ports

 

Any suggestions for adaptations for my board welcome.

 

May you try fix Shutdown in clover :

( I  did cheked this too )

 

Screen Shot 2016-08-16 at 6.44.05 PM.png

Edited by Loloflat6
Link to comment
Share on other sites

 Share

×
×
  • Create New...