Contribute
Register

USB-C Hotplug not working

Status
Not open for further replies.
Goodwin_C was able to in that other thread.
.....
Does a simple hex edit in USBXHCIAR fix the mismatch?

I haven't seen any activity from goodwin_c as of late. Lets see if he's still around.

Putting device-id in DSM is enough to make AppleUSBXHCIAR load instead of AppleUSBXHCI.

I might write a USCI USB driver for MacOS, this would allow us to be notified in a cross system compatible way of any cable plugs/unplugs. That would be a good leverage point to potentially undertake activities with regards to PCI rescanning on those events.
 
I haven't seen any activity from goodwin_c as of late. Lets see if he's still around.

Putting device-id in DSM is enough to make AppleUSBXHCIAR load instead of AppleUSBXHCI.

I might write a USCI USB driver for MacOS, this would allow us to be notified in a cross system compatible way of any cable plugs/unplugs. That would be a good leverage point to potentially undertake activities with regards to PCI rescanning on those events.

As topic for my lovely 9550 was banned on Tony - i have stopped most of my activity here, except of some read-only :) I'm trying to write here as less as possible. Viva la other forums.

As of powering on TBT on boot - best place ever, IMHO, is - _OSI method (or, as most are using - XOSI). Just add call to TBFP on the beginning of custom XOSI - and you are done with enabled TB on early stages (as fast as ACPI platform will get initialized by darwin core)
Regarding fully functional TBT... Guys, you are trying to invent workarounds. Sure, great if you can. But it's not really what we need.
Main problem is that TB controller (i'm talking about ICM - connection manager of TB) - is not working at all in Hackintosh. TB is complex system, with internal firmware, with ability to configure input-output lines, with full duplex messaging system between controller and OS. Just open IORegExplorer and check LocalNode and ThunderboltPort - they are not Matched. Also - open ThunderboltHAL and check Statistics - you will see that TB driver is not getting any "proper" responses from TB ICM.
I have some suggestions that needs deep digging, analysing and reverse engineering. First of all - good source for understanding TB internals is here - https://github.com/torvalds/linux/tree/master/drivers/thunderbolt
Also, it's still not clear why there are communication problems as communication layer looks clean, it has no cryptography and on TB3 it is common for all hardware (doesn't matter is it mac or not). Maybe, something with ACPI. Maybe, hardware is not getting initialized in time. Or even maybe TB controller is not booted in correct mode and needs reset (still can't find enough time to investigate all this PCI-X config memory features to find out how to properly reset TB - it needs special sequence by writing command into ICM memory and later sending reset command to PCI device, you can see this in Linux driver)
Also, looks like TB driver has problems with internal TB enumeration - it should read DROM from controller and using this info - populate all Ports in IOreg. On early stages - Mac efi driver is writing device properthy with shorted version of DROM - it is easy to generate this part (done on my machine). But, i suggest that later driver reads real DROM from controller. And there is tricky thing - there is machine type and vendor in that string, and maybe (just maybe, i'm not sure) - driver doesn't like our "Dell" and "XPS" from there :) Again, needs time, knowledge and digging
 
By the way - as i understand things - notification layer in TB3 is not on ACPI level. Thunderbolt 3 is MMIO based device - and there is memory-region for communication mailbox. And separate IRQ. So it is supposed that any changes in TB configuration should go through ICM interface (and NHI device is where it is located)
 
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:
I have TB15 on my workplace if somebody will have any fresh ideas :)
 
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.
 
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.
 
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.
 
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:
Only a MacBook Pro11,3 with TB2 that I can run Linux on.
 
Status
Not open for further replies.
Back
Top