Contribute
Register

USB-C Hotplug not working

Status
Not open for further replies.
Joined
Jun 12, 2012
Messages
350
I've long since gotten USB-C hotplug for the 9560 working on the latest BIOS (see my 9560 build), but thunderbolt I have pretty much lost all time to look into at this point. I remain convinced that it is definitely possible to get working, however it would take a wholly unknown amount of time to figure it out.
 
Joined
May 26, 2017
Messages
10
Is it? WHO is working on it to make it a 100% working solution?
I tried this for over a week now - and have made some progress. As you may notice, all Thunderbolt-featured real Macs are using SSDT for Thunderbolt. So i compared the various SSDTs from for example MacPro_2013, MacBookPro_late2015 and MacBookPro_2017(touchbar). in their ground structure they all seem to follow the same way and i think, the way we dont see it to appear on Hackintosh under section THUNDERBOLT within System Profiler is, cause we are missing something from a "correct built SSDT".

So what do i mean exactly:
if u just use built-in TB2 or TB3 ports of your motherboard, connected Thunderbolt devices will appear within SystemProfiler under their respective Entries: Ethernet, AHCI, Firewire or USB. For example: i have a CalDigit Thunderbolt2 Station, which features 2 eSATA- , 1 HDMI- , 1 Ethernet GB-, 2 USB3.0- and MIC/Headphone ports. If i connect this one via Apple Thunderbolt3-to-Thunderbolt2 adaptor into my ASUS onboard USB-C/TB3 port, all devices get detected by macOS SIERRA and are fully working.
BUT: they will be detect all as "Expresscard-Slots"! All the ports are visible in System Profiler as their main devices: Ethernet, AHCI, USB and Headphone/Microphone. But under Thunderbolt System Profiler says: no Thunderboltdriver loaded.

Also my Akitio NODE eGPU box is connected via Gigabyte AlpineRidge TB3 PCIe card - and it is working. Also a big BUT: i could not make it via running the script from eGPU.io, cause the script expects the Akitio Node as a working ThunderboltDevice - which is NOT possible at this time under Hackintosh. So i have to make the neccesary modifications to the desired Kextfiles by "hand". Et voila - eGPU is running.

I remember the days i have had an X99 ASUS Board with Thunderbolt EXii card: it was important, into which PCIe port the card was connected to, otherwise the result was the same as above described. But once i switched the PCIe slot, BANG it also shows up in Systemprofiler as Thunderbolt Device. Havn't tried this with the AlpineRidge card yet, cause on some pages you read: "plugin to the nearest CPU PCIe slot", others say "plug it into the nearest TB.Header PCIe slot".

I would be interested to help for making Thunderbolt fully work under Hackintosh - but right now, i feel like i am the only one who actively wnats to find a solution. Maybe you (RehabMan) would like to help?

To Mork and the others in this thread -

Is the current status of thunderbolt 3 such that it is a) not hot-pluggable or b) just not reliable, period. If it's the former, I can live with that, even though it's an inconvenience, but if it's the latter, that will be a problem. Clients show up with thunderbolt devices from time to time.

Also, to Mork specifically - I notice you are using the Supercarrier motherboard in your build. What has been your experience? Are it's main features accessible as a hackintosh?

edit: I suppose I also mean to ask whether you are suggesting it's actually *better* to use a PCIe card for TB3 instead of an on-board port.
 
Last edited:
Joined
Jun 12, 2012
Messages
350
It depends. On my old desktop it was simply not hotpluggable, period. On my current laptop, I get a full system hard lock upon removing a Thunderbolt device as a tradeoff of how I needed to enable USB Type-C (and the TB device doesn't work when plugged in, as per my past few posts).

I've seen a very small number of posts on InsanelyMac of people claiming to get TB working -- ages ago, like TB1/2 -- and some screenshots look like they did it, but there's never nearly enough info posted anywhere to actually work off of (it was in the middle of a several hundred page thread of something unrelated, too). :/

I'm also simplifying the whole situation a bit, but the point is that hot plug basically doesn't work at all, in some cases catastrophically. But boot-time plug tends to work fine in most cases.
 
Joined
Jul 2, 2011
Messages
75
Motherboard
Mac OS X Yosemite 10.10.5
CPU
Core i7 5960X
Graphics
Gigabyte GTX 960
Mac
  1. Mac Pro
Classic Mac
  1. Apple
Mobile Phone
  1. iOS
looking forward for this thread
I've x99-ud4 (bios F23) revision 1.0
cpu i7 5960x
gigabyte gtx960 geforce
gc-thunderbolt 2 pcie add on card

before i instal Sierra 10.12.6 I have Yosemite 10.10.5 and the thunderbolt work without hotswap
now at Sierra at system report>hardware>thunderbolt>"Thunderbolt: No drivers are loaded."

hope someone can figure it out..
 

jaymonkey

Moderator
Joined
Aug 27, 2011
Messages
3,998
Motherboard
GB Z490 Vision G
CPU
i9 10850K OC @ 5.2 GHz
Graphics
Vega 64 LC + HD 630
Mac
  1. MacBook Air
  2. MacBook Pro
  3. Mac Pro
Mobile Phone
  1. iOS
Hi Guys,

Interesting thread ... and seems to be related to an issue i have ...

I have 2017 HP Spectre X360 (15" Kaby lake model) it has one USB 3 Type A and Two USB Type C (3.1) one of which has Thunderbolt 3, in OSX (10.12.6) The USB3 Type A works fine as does the non Thunderbolt USB Type C port (patched using Rehabmans USB guides and patches)

However the USB C port with Thunderbolt port only works if a USB device is plugged in before booting OSX .... i don't have any Thunderbolt devices so cant test that side of the port ... Once in OSX i can use the USB device with no issues but once removed the port is powered down again and becomes unusable ...

As a PLC developer i'm always using lots of USB devices so having three ports rather than two would be most welcome ...I assume this issue is related to the port only being powered up if a device is plugged in as discussed in this thread so I think i need to patch DSDT/SSDT so that its always powered up ...

Like i said i'm only really interested in the USB side of the port not the Thundebolt 3 ... at least for now,
Jut wondered if any progress has been made with this or is this just something we have to live with as quoted by rehabman in post #2.

Have things improved with native kaby lake support ? (i'm still running with spoofed SKL)

Cheers
Jay
 
Last edited:

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,727
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Hi Guys,

Interesting thread ... and seems to be related to an issue i have ...

I have 2017 HP Spectre X360 (15" Kaby lake model) it has one USB 3 Type A and Two USB Type C (3.1) one of which has Thunderbolt 3, in OSX (10.12.6) The USB3 Type A works fine as does the non Thunderbolt USB Type C port (patched using Rehabmans USB guides and patches)

However the USB C port with Thunderbolt port only works if a USB device is plugged in before booting OSX .... i don't have any Thunderbolt devices so cant test that side of the port ... Once in OSX i can use the USB device with no issues but once removed the port is powered down again and becomes unusable ...

As a PLC developer i'm always using lots of USB devices so having three ports rather than two would be most welcome ...I assume this issue is related to the port only being powered up if a device is plugged in as discussed in this thread so I think i need to patch DSDT/SSDT so that its always powered up ...

Like i said i'm only really interested in the USB side of the port not the Thundebolt 3 ... at least for now,
Jut wondered if any progress has been made with this or is this just something we have to live with as quoted by rehabman in post #2.

Have things improved with native kaby lake support ? (i'm still running with spoofed SKL)

Cheers
Jay

No change regarding TB in 10.12.6. Still must be plugged in prior to booting. It has to do with PCIe hotplug (TB controller not showing up unless something is plugged in). Apple seems to shy away from PCIe hotplug.
 
Joined
Jun 12, 2012
Messages
350
You CAN get your TB3 port working as a USB port, but you have to learn how your port works and adapt either my SSDT-TYPC/SSDT-YTBT or dpassmor's versions. Or, if you're lucky, you might find you don't even have to deal with a a port that turns itself totally off, which would still require a DSDT patch and an SSDT to provide an ACPI description for the type-C port in a way consistent with what Mac OS expects (unless you're really lucky and there's already an SSDT on your machine like that). It's not, and will likely never be, particularly easy, but it IS doable.
 
Joined
Oct 20, 2011
Messages
41
Motherboard
DELL XPS 9550
CPU
i7-6700HQ
Graphics
HD 530 / GTX960M
Mobile Phone
  1. Android
I have promised myself that i will not post here anymore... But will make exception.

By design, all systems with TB host chip on-board, always have ability to force-power tb-controller. And this ability is done by WMI instruments in ACPI. There is always method in ACPI code with ID as "86CCFD48-205E-4A77-9C48-2021CBEDE341" that runs proper procedures for turning on and off TB.

For ex., in Dell XPS 9550 laptop ACPI this is method "WMTF" and this is identification part of it:

Code:
            Name (_HID, "PNP0C14")  // _HID: Hardware ID
            Name (_UID, "TBFP")  // _UID: Unique ID
            Name (_WDG, Buffer (0x14)
            {
                /* 0000 */  0x48, 0xFD, 0xCC, 0x86, 0x5E, 0x20, 0x77, 0x4A,
                /* 0008 */  0x9C, 0x48, 0x20, 0x21, 0xCB, 0xED, 0xE3, 0x41,
                /* 0010 */  0x54, 0x46, 0x01, 0x02                        
            })

So you can see in _WDG same ID as i have wrote here.
This is starting point for Thunderbolt 3 support on hackintosh - as macos is expecting to see tb controller always online. Turning off controller will cause kernel panic by AppleThunderbolrNHI kext.
 
Joined
Jul 3, 2014
Messages
934
Motherboard
Dell XPS 9360 (KabyLake R)
CPU
Intel i7 8550U
Graphics
Intel UHD 620
Mac
  1. MacBook
  2. MacBook Pro
Mobile Phone
  1. Android
By design, all systems with TB host chip on-board, always have ability to force-power tb-controller. And this ability is done by WMI instruments in ACPI. There is always method in ACPI code with ID as "86CCFD48-205E-4A77-9C48-2021CBEDE341" that runs proper procedures for turning on and off TB.

Based on goodwin's post I wrote a driver: IOElectrify.

In short IOElectrify interfaces with the ACPI WMI interface to call the Intel Thunderbolt force-power method identified by the guid. It ensures force-power is enabled on wake and disabled on sleep.

With this configuration AppleThunderboltHAL attaches to the Thunderbolt controller successfully. Additionally AppleThunderboltHAL successfully initializes AppleThunderboltNHIType3 (Correct for Alpine Ridge 2C) as well as the IOThunderboltController, IOThunderboltLocalNode and IOThunderboltPort.
There seems to be no requirement for the device to be named NHI0 or FakePCI to force matching of PCI identifiers.

Uk18XhC.png


Note that I have no devices to test the Thunderbolt functionality. Hopefully someone can test if Thunderbolt connectivity works as expected.

From the USB-C side of things, force powering the Intel Thunderbolt controller has some positive side-effects (no more Express card icon).

The following things are working now out of the box (after fixing the recursive mutex issue in XPS 9360 ACPI):
  • Booting with USB-C adapter connected
  • USB-C hotplug at any time after boot
  • Sleeping and returning from sleep successfully with USB-C connected
  • Sleeping, unplugging and replugging before wake-up

The remaining main issues are:
  • Booting without USB-C device connected. In this case the entire Intel Thunderbolt controller is powered down.
    Either ACPI needs to be modified to power the device successfully and/or IOElectrify extended with IOElectrifyBridge to force the Thunderbolt IOPCI2PCIBridge to rescan after ACPI code has initialized the device.
    IOElectrifyBridge could listen for the _E42 GPE event from the ACPI to determine when to re-probe the bus.
  • Returning without USB-C device from sleep. _E42 GPE event is triggering when plugging in a device, but either ACPI is not successfully enabling the Thunderbolt controller or macOS does not rescan the PCI bus properly.

In short, next steps would involve either a fix on ACPI side or listening to ACPI Thunderbolt hotplug events and causing macOS to re-scan the PCI bus/reconfigure the PCI bus as hot-pluggable. Hotplug support seems to be there in macOS in some capacity.

IOElectrify source code and v0.0.1 precompiled kext can be found here:
https://github.com/the-darkvoid/macOS-IOElectrify/
 
Joined
Jun 12, 2012
Messages
350
Oh my god. This is awesome!!! Can't wait to try it.

I was under the impression that something like a well-placed Notify() would trigger a rescan, but I'm not aure with the way Apple did things. Also this thread might help:

http://www.insanelymac.com/forum/to...-high-sierra-10131-quick-installation/page-44

I posted a lot of resources and screenshots on pages 45/46, which may be of use. The big thing is that there're a lot of thunderbolt-related nodes hanging off the port on a real Mac.
 
Status
Not open for further replies.
Top