Random Shutdown in Big Sur (ThunderboltNHI) driver problem

Hey guys,
I have the problem that my 2013 MacBook crashes frequently since upgrading to Big Sur. This means that all of a sudden the screen freezes, the fans turn up and all of a sudden the MacBook is off. In Catalina, through research I found out that it's because of the Thunderbolt driver (AppleThunderboltNHI.Kext etc.), which I had always renamed in Catalina using recovery mode (... .kext.BAK). This solved the problem. But now since Big Sur I can't rename the Kext files anymore because I'm only in read-only mode. So I wanted to ask here if there is a possibility to rename the files again? Otherwise the MacBook still runs really well!

I have managed to rename/delete the NHI.kext file but it's useless because in Big Sur the kext is cached into the preboot process so it's still loaded in memory and causing crashes. Unfortunately you can't unload it and until someone tells me how to remove it from the boot kernel collection we're stuffed.
Following this thread.
Same problem...
Same, following
I was able to rename/move/delete the .kext file as well, but it's now part of the kernel and until Apple gets off their tails and does something about it, Big Sur is useless to myself (mid-2014 MBP) and others that are having an issue that has been around for 3-4 major OS revisions.
same here... died for a few times on first day of Big Sur, exhausted. ..look forward to solutions
"Solved"

Found how to remove the thunderbolt driver in Big Sur this morning.

In Catalina, deleted drivers were not loaded by the kernel at boot after having deleted/moved/renamed the kext directory.

In Big Sur,
  • The driver remains in the extensions cache, this one must be rebuilt with kmutil

  • You must "deactivate the seal" and make another snapshot after the cache has been rebuilt.

Follow this procedure :
  1. Reboot in rescue mode (reboot while "Cmd + R")

  2. csrutil disable

  3. csrutil authenticated-root disable

  4. reboot in rescue mode

  5. mount -uw /Volumes/[MacOS <your custom stuff here>]

  6. delete (or rename, or move elsewhere) the AppleThunderboltNHI.kext directory (I've moved all thunderbolt kext directories since I have no needs about this interface, but I think it works only by disabling AppleThunderboltNHI)

  7. REBUILD the extensions cache ! (new has-to-do in Big Sur...) : kmutil install -u --force --volume-root /Volumes/[MacOS <your custom stuff here>]

  8. DON'T FORGET to create another system snapshot to take these modifications under account at next reboot : bless --folder /Volumes/[MacOS <your custom stuff here>]/System/Library/CoreServices --bootefi --create-snapshot

  9. csrutil enable (mays be you have to reboot in rescue mode.. not tested)

Finally, reboot in normal mode : you can check kextstat : it shows that the driver is actually not loaded :)


It works for my MacBook Pro mid 2014..

Either a hardware problem when using the driver of the host interface, either a bug. Apple did not communicate, I think it's a hardware issue..

How can I make the « csrutil authenticated-root disable » command when it tells me to disable FileVault ? How do I disable FileVault from rescue mode ?

Hmm, I do not encrypt my Mac.

I think if you want to encrypt, you have to disable FileVault in system preferences, follow the procedure, and then enable FileVault.

Remember : you have to do that at each big sur update..
Unless Apple fix this bug or you buy a new Mac (M1 ...)


i Can’t disable filevault in system preference because my mac shut down 1 minute after reboot ...
This shutdown occurs when the Mac seems to use the discrete graphics, and is hot.

I had yesterday to invoke 'kmutil invoke-panic-medic' to disable all third party pbs, and check the integrated graphics was used (kill chromium etc..)

So : in recovery mode, kmutil invoke-panic-medic, ensure your integrated graphics is used rather than nividia, you should have enough time then to disable FileVault
It sucks...
I can confirm the solution posted by sf98723 works!

Do exactly as they say. Thank you so much.

Just a FWIW. I don't believe it has anything to do with the graphics. It's a faulty chip in the 2013-2015 MBP that is interacting with the NHI.kext file to cause the CPU to shutdown.

More details here: https:// outluch.wixsite.com/rmbp-crash
Can’t disable FileVault, my mid-2014 MacBook Pro shut down in 1-2 minutes and nothing help to increase the time within the Mac reboot itself
Tom if you know a bit about Python you can delay the shutdowns by forcing constant CPU wake-ups

As soon as you login, go to to terminal type 'python'


Code Block
import time
while True:
time.sleep(0.00002) (press tab on this line first)


Press enter twice. And then disable FileVault straight away

If your computer is really shutting down so fast you you can't disable FileVault try plugging in all kind of devices, like an external monitor, USB mouse/keyboard/hard-drive and Thunderbolt/USB ethernet. I found that helps sometimes.




Thank you for your help, with the python script my laptop isn’t rebooting and I successfully disable FileVault. But I don’t understand now in the solution when you write «  mount -uw /Volumes/[MacOS <your custom stuff here>] » what is /MacOs <your custom stuff here> ?

I just wrote mount -uw /Volumes/Macintosh\ HD ...
Should I wrote mount -uw /Volumes/Macintosh \HD/System/Library/Extension ?
I don’t understand...
You have to mount '-uw' your system partition where you are in rescue mode.

Sometimes your system partition is called MacOs, or Macintosh HD, or MaOS blabla, depending on your installation options and when you have installed your Mac.

In your case, it's juste fine (Macintosh HD) is a well known default name for the system partition.
So I followed the below procedure and now my mid 2014 MacBook Pro is stuck in a “restarted because of a problem” loop. The Apple logo and loading bar appear fill a quarter of the way and then it restarts. I can’t even boot into safe mode.

I’ve tried resetting nvram and smc. I also can’t reinstall macOS because I don’t have enough space. Am I screwed? HELP!!!
@sf98723

Hi. Thanks a ton for this help. Installed Big Sur thinking that deleting the problematic AppleThunderboltNHI.kext would be no prob but of course having issues.

BTW can you explain your steps in a bit more detail? I'm going to be essentially copying and pasting your recommendations so hopefully everything you shared will work.

I have no clue what mount -uw will do if I wrote this wrong.

Also what should I be putting in when you state <your custom stuff>?

What should we be beware of, so we don't do something really disastrous accidentally 

Thank you!


To @McQueen69 (and all),

You should always :
  • Consider It's tested for a mid 2014 MacBook pro (the ones that are well known to be affected by this pb). I can't know what other Macs do with the thunderbolt interface (dependencies, ..)

  • As a good manner, back up your Mac or your very important files before (especially if your storage is soldered)

  • unplug all unnecessary devices

  • Always have a USB install key prepared (you can do this before installing Big Sur, with the "sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume" procedure

Now :

@McQueen
69 :
  • model of your Mac (13, .. ) ?

  • It's very weird, since this procedure does not affect at all the rescue area. Are you sure you have done your mount and snapshot as I said to the "system partition" /Volumes/xx ?

  • unplug all thunderbolt devices

  • plug an external wiped storage device, a USB installation key, then boot + "C" at startup, reinstall MacOS on the external device and mount your system partition to back up the users files.

  • Then reinstall from scratch (Catalina) on the internal storage. It should work, I don't think you can actually brick a Mac.. At last resort, the Genius Bar should help.


@mergenc : the « custom stuff » is the name of the Volume int /Volume that holds your OS. I can’t be more precise it depends of your history (for me it’s /Volume/MacOs because I’ve reinstalled from scratch for Catalina. Before it was called /Volume/Macintosh HD if you installed old OSes)

Again, backup before, usb media near you, external device is a plus..

Sorry for the reply delays : I’m in France 😎

@sf98723

Bonjour! Thank you for the clarification.

Unfortunately I'm now stuck on restart loop. I'm getting error "Your computer restarted because of a problem. Press a key or wait a few seconds to continue starting up."

Not sure what I did wrong. Was I supposed to do step 8 after one more reboot? I did steps 8 & 9 immediately after step 7.

Luckily, I can enter recovery mode, but cannot enter normal mode. Shall I reinstall Big Sur again and repeat your steps one more time? Any recommendations?

I'm also on MBP mid 2014. I upgraded from Catalina. Had been removing ThunderboltNHI kext since the issue popped up the last couple of months.

Yours,
  • from Mongolia!

UPDATE: I disabled csrutil and then - Voila! restarted just fine! And the problem child driver is gone! Wow.

UPDATE 2: It seems now my MBP goes into restart loop if I enable <<csrutil authenticated-root>>. Any recommendations? MBP seems to be working fine otherwise (no security but at least working 😂)


@mergenc : you’re right : I told to only « csrutil enable » at the end of the procedure, not to « csrutil authenticated-root enable »

You can’t do that in Big Sur if you modify the Os (because new files you have generated like the extension caches are not signed by apple!). I’ve not explicitly warned about that in the procedure, I will update it this evening

It’s described here in the details : https://developer.apple.com/news/?id=3xpv8r2m

... you are only disabling the NEW security functions but you keep those functions that were part of Catalina

I don’t know if Apple will let us continue to workaround this bug or hardware issue in the future updates or to let us with older versions of macOS until we decide to buy a new Mac ☹️

Finally I don’t know if the future Big Sur updates will run as expected 😬. We will know soon as usual ...

Have a good day in Mongolia 🇲🇳
Ok Guys So Here’s the FIX with BIG SUR
I did few modifications with whatever was available on internet to solve this problem
Step 6 & 7 are few modifications which I did. 
Here it goes

Reboot in recovery mode (CMD+R)
Utilities -> Terminal
csrutil disable
csrutil authenticated-root disable
mount - uw /Volumes/Macos (Enter WHATEVER YOUR MACOS DRIVE NAME IS, my macOS drive name is Macos)
cd /Volumes/Macos (Enter WHATEVER YOUR MACOS DRIVE NAME IS, my macOS drive name is Macos)/System/Library/Extensions
rm -rf AppleThunderboltNHI.kext
rm -rf /System/Library/Caches/*
Kmutil install -u --force --volume-root /Volumes/Macos (Enter WHATEVER YOUR MACOS DRIVE NAME IS, my macOS drive name is Macos)/System/Library/Extensions
bless -folder /Volumes/Macos(Enter WHATEVER YOUR MACOS DRIVE NAME IS, my macOS drive name is Macos)/System/Library/CoreServices —bootefi --create-snapshot
FORGET THE PROBLEM :-D 
You’ll need to perform these steps every time you update Big sur with their security updates n all. 
No need to enable SIP 
Have a good life :-) 
Same issue with MBP Early 2015.
@sf98723
Thanks a lot for your instruction.
I have tried your steps, but after the last step (csrutil enable) , I also had the restart loop problem as  McQueen_69 and mergenc.

@mergenc
Thanks for your input, I tried to run 'csrutil disable' in rescue mode again, the restart loop problem fixed.

Seems MBP 2015 has a little different with MBP 2014 😂

Random Shutdown in Big Sur (ThunderboltNHI) driver problem
 
 
Q