Contribute
Register

Maple Ridge Sleep Temporary Fix (UAD Hardware and Video Passthrough)

Status
Not open for further replies.

NorthAmTransAm

Moderator
Joined
Jul 26, 2018
Messages
2,042
Motherboard
MSI Pro Z690-A DDR4
CPU
i7-12700k
Graphics
RX 580
Mac
  1. MacBook Air
  2. MacBook Pro
Mobile Phone
  1. iOS

***Quick Test for fixing Maple Ridge Sleep/Wake***


Maple Ridge is pretty new to us. Though it has a slightly different device tree, we are still able to use it. My setup works great: Video Passthrough, Hot Plug, all devices that I cant test work. Sleep however doesn't. I noticed that if I manually loaded AppleThunderboltNHI.kext using terminal then sleep would in fact work.

@CaseySJ, I can't remember something. Did our Alpine/Titan Ridge ICM setups actually load the NHI driver? I feel like it did but I can't test at the moment. If so, that would explain why this is necessary for Maple Ridge.

Goals
  • Fix Sleep Issue in the interim (AIC only problem? Headerless only problem?)
  • Fix Boot Cycle Issue in the interim

Anyhow, I'm looking for users who have a working Thunderbolt Maple Ridge (TB4) setup who would be down to do a test for me.

Pre-Requisites
  • TB4 Onboard or AIC
  • Standard Device Tree in IOReg
  • Working Hot Plug
  • Running macOS Big Sur

Test

Open Terminal and paste the command below. Press Enter. It will prompt you for your password. If you're new to this, know that you won't see your password as you type but it is in fact being inputted. Just press Enter when done.

Code:
sudo kmutil load -p /System/Library/Extensions/AppleThunderboltNHI.kext

This will manually load the AppleThunderboltNHI.kext. Now do a sleep and wake and see if your Thunderbolt devices recover. For me, my UAD Devices Re-Connect.

If this worked for you then we can do the procedure below. In short it will load AppleThunderboltNHI.kext at boot.

Semi-Permanent Procedure (adding a Launch Daemon)
  1. Download the attached file com.TBSleep.workaround.plist and add it to /Library/LaunchDaemons.
  2. In Terminal run the follow commands:
    Code:
    sudo chown root:wheel /Library/LaunchDaemons/com.TBSleep.workaround.plist
    Code:
     sudo launchctl load -w /Library/LaunchDaemons/com.TBSleep.workaround.plist
  3. Reboot and check if AppleThunderboltNHI.kext is loaded by going to System Report and viewing the Extensions Pane.
  4. Test sleep. I did this by leaving my UAD Apollo on during sleep/wake. Upon wake it should say "Re-Connecting"
For anyone wondering my setup for these test is...
  • ASUS Prime z370-A II
  • ThunderboltEX4 card (no header, USB 2.0 connected, 6 Pin Power connected)
  • Dell Ultrawide connected to RX580 DP>EX4>USBC (also includes USB peripherals connected to monitor)
 

Attachments

  • com.TBSleep.workaround.plist
    621 bytes · Views: 138
Last edited:
What does this kext do? I haven't had any problems with Thunderbolt devices not recovering with my Maple Ridge controller after sleep, but I also don't have any Apollo devices either. My other Thunderbolt devices work out of the box with resume from S3 sleep...

Only issue I have is on the Vision D BIOS I'm running, when warm booting (from macOS), Thunderbolt devices are not detected, I have to power cycle first. Linux/Windows don't exhibit this issue.
 
Last edited:
What does this kext do? I haven't had any problems with Thunderbolt devices not recovering with my Maple Ridge controller after sleep, but I also don't have any Apollo devices either. My other Thunderbolt devices work out of the box with resume from S3 sleep...

Only issue I have is on the Vision D BIOS I'm running, when warm booting (from macOS), Thunderbolt devices are not detected, I have to power cycle first. Linux/Windows don't exhibit this issue.

Would you mind trying the Semi-Permanent Procedure and seeing if that helps fix the boot-power cycle issue?

As for sleep, I think this might have something to do with me not having a header.
 
Would you mind trying the Semi-Permanent Procedure and seeing if that helps fix the boot-power cycle issue?

As for sleep, I think this might have something to do with me not having a header.
Yes I have native Maple Ridge baked into my motherboard.

I am running 11.5 beta. If I start macOS normally and restart, the Thunderbolt 4 bus is not available on warmboot, even with AppleThunderboltNHI.kext loaded. However, if I suspend the system into s3 sleep, with AppleThunderboltNHI.kext loaded, when I subsequently warm boot the system, then the Thunderbolt 4 bus is available without the need to power cycle! Similar to Windows/Linux.

I do think that the issue with no Thunderbolt on warm boot is a BIOS configuration issue, and not so much so a Maple Ridge or even macOS issue, because I was able to get Thunderbolt availability on warm boot to work on an earlier BIOS, but I had enabled hotplug on the Maple Ridge root PCI port, as well as tweaked some other hidden bios settings.

I haven't done so with this unreleased beta BIOS I'm running...

Do you know what else this kext does?
 
Yes I have native Maple Ridge baked into my motherboard.

I am running 11.5 beta. If I start macOS normally and restart, the Thunderbolt 4 bus is not available on warmboot, even with AppleThunderboltNHI.kext loaded. However, if I suspend the system into s3 sleep, with AppleThunderboltNHI.kext loaded, when I subsequently warm boot the system, then the Thunderbolt 4 bus is available without the need to power cycle! Similar to Windows/Linux.

I do think that the issue with no Thunderbolt on warm boot is a BIOS configuration issue, and not so much so a Maple Ridge or even macOS issue, because I was able to get Thunderbolt availability on warm boot to work on an earlier BIOS, but I had enabled hotplug on the Maple Ridge root PCI port, as well as tweaked some other hidden bios settings.

I haven't done so with this unreleased beta BIOS I'm running...

Do you know what else this kext does?

Makes sense to me. So you're saying you tried this, yes?

However, this is not a Kext. It's simply a plist file that adds a Launch Daemon to macOS that tells it to load AppleThunderboltNHI.kext (our native TB driver) at boot.

You can edit this file to address any driver/kext you want. For example, this idea came from me loading my UAD2System.kext manually. I simply edited the com.xxx.plist file to fit my needs. Open it up and it will make sense.
 
Makes sense to me. So you're saying you tried this, yes?

However, this is not a Kext. It's simply a plist file that adds a Launch Daemon to macOS that tells it to load AppleThunderboltNHI.kext (our native TB driver) at boot.

You can edit this file to address any driver/kext you want. For example, this idea came from me loading my UAD2System.kext manually. I simply edited the com.xxx.plist file to fit my needs. Open it up and it will make sense.
Yes! I did open the plist file and saw that it loads the AppleThunderboltNHI.kext. That kext was not loaded on my Maple Ridge system prior to me stumbling across this thread (thanks @CaseySJ). So I was just curious what the kext does, as my Thunderbolt devices have been working just fine without it loading.
 
Yes! I did open the plist file and saw that it loads the AppleThunderboltNHI.kext. That kext was not loaded on my Maple Ridge system prior to me stumbling across this thread (thanks @CaseySJ). So I was just curious what the kext does, as my Thunderbolt devices have been working just fine without it loading.
My understanding is that is the driver that connects us to all of the other Thunderbolt drivers. I believe since we are in ICM mode it isn't necessary for our PCI-Bridged functions but in my case on this ridge its necessary for sleep recovery and for video passthrough on boot/sleep.

@CaseySJ please excuse my caveman explanation and correct me if I'm too off or over simplifying. I don't want to pass on misinformation. Bad gas travels fast in a small town.
 
My understanding is that is the driver that connects us to all of the other Thunderbolt drivers. I believe since we are in ICM mode it isn't necessary for our PCI-Bridged functions but in my case on this ridge its necessary for sleep recovery and for video passthrough on boot/sleep.

@CaseySJ please excuse my caveman explanation and correct me if I'm too off or over simplifying. I don't want to pass on misinformation. Bad gas travels fast in a small town.
Thanks!

Speaking of the ASUS ThunderboltEX4 card, I ordered one to see if it would work on my older z170 system. I connected USB2 and the 6-pin power connector, but the only thing that ever worked was DisplayPort video. USB/Thunderboltt devices were not recognized at all. So I returned it, and decided to wait for other USB4 solutions to come to market. But it seems that you’ve gotten Thunderbolt to work with this card with no header? That’s great! Did you have to do anything special to get the card to work? Could be that I received a lemon… I did notice some deformities on the card enclosure itself.

I can’t wait until more USB4 controllers come to market, that should put downward price pressure on numerous peripherals like 10gbps network cards, NVMe enclosures, etc.
 
Last edited:
Thanks!

Speaking of the ASUS ThunderboltEX4 card, I ordered one to see if it would work on my older z170 system. I connected USB2 and the 6-pin power connector, but the only thing that ever worked was DisplayPort video. USB/Thunderboltt devices were not recognized at all. So I returned it, and decided to wait for other USB4 solutions to come to market. But it seems that you’ve gotten Thunderbolt to work with this card with no header? That’s great! Did you have to do anything special to get the card to work? Could be that I received a lemon… I did notice some deformities on the card enclosure itself.

I can’t wait until more USB4 controllers come to market, that should put downward price pressure on numerous peripherals like 10gbps network cards, NVMe enclosures, etc.

Did your Z170 have a Thunderbolt Header and did you have an SSDT to go with it? With my setup I need an SSDT to get things going.
 
I have am having trouble dumping the ROM on the EX 4-TR. I have both a 3.3 & 5 volt flasher, but neither work. Does this need a capacitor? Is there a modified ROM already? And is there a SSDT for it?

Interesting- I find this only works with an Apple TB3 to TB2 adapter. The Startech adapter is not working.
 
Status
Not open for further replies.
Back
Top