Contribute
Register

USB-C Hotplug not working

Status
Not open for further replies.
Joined
Feb 24, 2014
Messages
1
Currently have an XPS 13 9350 running sierra with no hot plug but do have some type C and possibly working thunderbolt devices to test with, but port not working. Would be willing to give dumps and test on my hardware if desired. Would be great to give this a go. For reference, it's a vanilla install with this as my base https://github.com/syscl/XPS9350-macOS. Would like to note that I have tested that t plugging displays work, but will to detect the USB ports on the dock that are hot plugged.

EDIT: I'd like to nate that I've worked with MANY hackintosh's over the years, but just haven't posted on this forum. I'm by no means new to mac or hackintosh's, and also work in the command line in Linux (Arch and Gentoo), so I'm not afraid of getting my hands dirty.
 
Last edited:
Joined
Oct 20, 2011
Messages
41
Motherboard
DELL XPS 9550
CPU
i7-6700HQ
Graphics
HD 530 / GTX960M
Mobile Phone
  1. Android
I have TB15 on my workplace if somebody will have any fresh ideas :)
 
Joined
May 11, 2011
Messages
1,968
Motherboard
Gigabyte B550 Vision D
CPU
Ryzen 5900X
Graphics
RX 6800
Mac
  1. iMac
  2. MacBook
  3. MacBook Air
  4. MacBook Pro
  5. Mac mini
  6. Mac Pro
Classic Mac
  1. Power Mac
  2. PowerBook
Mobile Phone
  1. iOS
Hi guys,

If it interests you, I have managed to enable USB-C hotplugging work on my latest Asus Z270 Prime A board on Sierra 10.12.6, including Thunderbolt local ethernet detection working through my Areca 8050 I have attached to it (which is also working as a TB1 device). My build is here > https://www.tonymacx86.com/threads/...-samsung-960-evo-nvme-thunderbolt-ex3.240368/

I will try to get a ioreg output for you later from the setup to look at plus the changes in the Asus BIOS I needed to do to make it recognised without crashing. I found not everything had to be enabled in the Asus BIOS if you want USB-C hotplugging to work.
 
Joined
May 11, 2011
Messages
1,968
Motherboard
Gigabyte B550 Vision D
CPU
Ryzen 5900X
Graphics
RX 6800
Mac
  1. iMac
  2. MacBook
  3. MacBook Air
  4. MacBook Pro
  5. Mac mini
  6. Mac Pro
Classic Mac
  1. Power Mac
  2. PowerBook
Mobile Phone
  1. iOS
Ok here's my TB output from the IOREG on the Asus with Areca 8050 attached:

ioreg-asusprime.png

and IOREG TB info from my Macbook Air6,2:

ioreg-macbookair1.png
ioreg-macbookair2.png
ioreg-macbookair3.png

BTW I've also discovered on my board I had to remove the AppleUSBCXHCI port limit increase patch to stop my machine from crashing.
 
Joined
Oct 20, 2011
Messages
41
Motherboard
DELL XPS 9550
CPU
i7-6700HQ
Graphics
HD 530 / GTX960M
Mobile Phone
  1. Android
Ok here's my TB output from the IOREG on the Asus with Areca 8050 attached:

View attachment 299465

and IOREG TB info from my Macbook Air6,2:

View attachment 299468
View attachment 299470
View attachment 299469

BTW I've also discovered on my board I had to remove the AppleUSBCXHCI port limit increase patch to stop my machine from crashing.
Could you please expand Statistics in your THunderboltHAL? And please attach original ioreg file.
P.S. Sorry, didn't manage that this ioreg is from real macbook. Just ignore my message - your setup has nothing special, and we had such setup months ago. TB is still in absolutely non-functional state.
 
Joined
Oct 20, 2011
Messages
41
Motherboard
DELL XPS 9550
CPU
i7-6700HQ
Graphics
HD 530 / GTX960M
Mobile Phone
  1. Android
By the way - just found one commit in linux tree that may have link to our issue - looks like Apple uses different approach for message sequencing in ICM
https://github.com/torvalds/linux/c...53133fa#diff-64d48cd31028512e72f9431ab48a0600
So, in theory, this may be an issue. Arghh, need time to investigate things...

P.S. Is there anybody that has macbook with Thunderbolt (at least second, third is preferable) and Linux on board?
 
Last edited:
Joined
Jun 29, 2016
Messages
193
Motherboard
ASUS Prime X299 Deluxe
CPU
i9-7900X
Graphics
Vega 64
Sorry for resurrecting this zombie thread.

P.S. Is there anybody that has macbook with Thunderbolt (at least second, third is preferable) and Linux on board?

I have a 2016 TouchBar MBP with TB3 on board, but no Linux installed. If you can tell me what information you need, and how to get it, I'd be happy to give it a go.
 
Joined
Oct 16, 2019
Messages
6
Motherboard
motherboard or system make & model # > See Rules!
CPU
I5-8300H
Graphics
RX 580
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/
Excuse me, I just use your IOElectrify to power the jhl6340 Thunderbolt NHI, but it only works with the _RMV method. Now I got a custom SSDT to make Thunderbolt3 work, but IOElectrify cannot use it, NHI can not get force power unless I plug any type-c or tb device before system boot,Can you help me fix it?
 
Status
Not open for further replies.
Top