Fixing frequent random silent shutdowns in MacBook Pro

Finally managed to fix my MacBook Pro (2014 retina 15″)! The issue turned out to be something software related after all.


  • The laptop shuts down abruptly
  • The fan speeds up a lot before shutdown.
  • There is nothing in the logs. The reason of the shutdown is shown as ‘unknown’
  • The silent shutdowns happen erratically 5 mins to an hour from boot.

Fixes I tried

  • Resetting PRAM.
  • Resetting SMC.
  • Reinstall OS from scratch.

At this point I started suspecting the hardware for the issue so I booked an appointment with the apple store.

Apple ‘Genius’ solutions:

At the store, the technician tried the following,

  • Run a full hardware diagnostics to find nothing.
  • Wipe the laptop clean and install the OS.

When this couldn’t resolve the issue. The advice he gave was to get the logic board changed along with the battery. The projected bill was around £600 – 800. At this point I gave up hope and bought a £200 Lenovo laptop, installed linux on it and moved on.

The Fix:

Today after couple of months , I just took a look at the laptop again and came across this. One of the answers claimed that this is caused by a buggy Thunderbolt-Ethernet  driver and disabling it will fix it. Tried it and it worked! It is literally 3 lines of code (details in this thread).

  1. csrutil disable in recovery mode (entered by pressing Cmd+R on boot) & reboot
  2. sudo mv /System/Library/Extensions/AppleThunderboltNHI.kext /System/Library/Extensions/AppleThunderboltNHI.kext.BAK in normal terminal and reboot
  3. csrutil enable in recovery mode and reboot

Thats it! My laptop has been working the whole day without any shutdown and it looks like I saved £800 with three lines of code 🙂

Edit (27 Dec 2019): As the commenters pointed out, this solution does not work after updating to Catalina. To make it work after updating to Catalina the following solutions have been proposed.

  1. before step 2, execute “sudo umount -uw /” to make the system files editable.
  2. after step 2, execute ” sudo mv /System/Library/Extensions/IOThunderboltFamily.kext /System/Library/Extensions/IOThunderboltFamily.kext.BAK” to rename the other new file which causes this issue.

27 thoughts on “Fixing frequent random silent shutdowns in MacBook Pro”

  1. Hey, found from reddit! Trying this out but the second line which ends in .bak keep getting rejected, something in line with no such directory. What reply did you get? Do I separate the lines with space off do I exec the first line then the second?

  2. The first command – (csrutil disable) is done from terminal available at the recovery mode which is invoked by pressing cmd+R during boot. This disables the protection on the AppleThunderboltNHI.kext file.

    We then reboot into the system normally and open terminal and execute the second command. This renames the AppleThunderboltNHI.kext file into AppleThunderboltNHI.kext.BAK so that it is not loaded in next boot. This is one command starting from “sudo” and ends in “.BAK” with no line breaks. Notice there is a space between the first /System/Lib… and the second one. This command will ask for the password and gives no output if successful. The explanation is,
    – sudo (run the command as admin)
    – mv (move)
    – /System/Library/Extensions/AppleThunderboltNHI.kext (this is the file we are moving)
    – /System/Library/Extensions/AppleThunderboltNHI.kext.BAK (this is where we are moving it to. This can be anything and anywhere. We just added .BAK to the original path and name so that the file stays at the same location with different name and we can restore it back when need)

    Finally, we reboot into recovery mode again and use terminal there to re-enable the protection on the system files by running csrutil enable. This is important to keep the system secure and stable after the change.

  3. Random shutdowns were driving me crazy, and they have stopped after applying this remedy! I am so glad to have learned this before giving in and buying a replacement computer.

  4. Your tutorial really saved me. Now, I can return to work normally – with no more tension of the unexpectable shutting down. Solution tested and approved !!!! Again, thanks a lot.

  5. I used the same trouble shutting now for a year , but the command sudo mv /System/Library/Extensions/AppleThunderboltNHI.kext /System/Library/Extensions/AppleThunderboltNHI.kext.BAK does not works in Catalina , because file is Read-only even with SIP disable
    the only way to do it is execute first ‘sudo mount -uw /’ (just before executing of sudo mv…)

  6. For anyone finding this via Google, it seems that 10.15.2 breaks things again per Olivier’s comment above. Reddit comments indicate that renaming IOThunderboltFamily.kext in the same process used for AppleThunderboltNHI.kext corrects the issue. I’m testing this now. 🙂

  7. It seems that in 10.15.2 you have to start in recovery mode to do the renaming. csrutil is disabled on my MacBook, as I kept it disabled before updating. But I seem not to be able to write these files. Tried the sudo umount-uw. And it respond
    umount: illegal option — u
    //then two lines about the correct use of umount command.
    I read somewhere that you have to be in recovery mode to write them. But then my problem is that when I try to boot in recovery mode, my computer silent reboot during mac logo loading….
    I am really desperate

  8. I seem to have made the fix work. There is indeed no need to go to the recovery mode after having disabled csrutil. The command “sudo mount -uw /” works fine. You can after that rename your extensions.
    I renamed (“…”.bak) the whole bunch thunderbolt related extensions as disabling AppleThunderboltNHI and /IOThunderboltFamily did not seem to do the trick. I think this was maybe a little bit overkill to do this with all the thunderbolt related extensions but I do not use thunderbolt and it seems to work. Someone might want to isolate the causes of the issue.
    Then I followed instructions from a comment on this post :

    mount -uw /
    mount -uw /System/Volumes/Data
    kextcache -i /

    And it worked ! Thank you all and thanks to the internet community as usual ! (and f*** Apple OMFG !)

    I notice now that it might have done the trick with only AppleThunderboltNHI and IOThunderboltFamily disabled have I done the part from the reddit post that I linked just above after that. I do not know and I do not want to try now..

  9. I have been having this problem, maybe you can suggest something else. I tried doing the AppleThunderboltNHI rename but it didn’t stop the shutdowns.

    Then I installed an HDMI emulator plug, and that stops the shutdowns completely UNLESS the computer goes to sleep. If the computer goes to sleep while on battery power, it always shuts down.

    When I have “Prevent computer from sleeping automatically when the display is off” it will often not shut down when the lid is closed, IF it remains connected to power, but it’s not 100% foolproof. I also have to set “Turn display off after:” to Never.

      1. Oh, forgot that part. The problem started a year ago on High Sierra. A couple of months ago I installed Catalina, fully up to date. I didn’t try Mojave.

  10. I have the exact machine with latest Catalina and it works for me. The issue is that these .kexts are littered around multiple places. I kept renaming a bunch of them until it worked.

    Try the solution given by “reallyannoyed” above your comment. In the meanwhile as a temporary solution you can keep the screen on all the time using InsomniaX.

  11. Thank you. I did try again, and for about a day now it seems that disabling the Thunderbolt Network adapter has solved the problem entirely without needing the HDMI Display Emulator. Sleeping works fine with or without power attached, etc.
    Maybe it did actually work last time I tried it, but if I remember correctly, there was an OS X update the same day I tried it and I wasn’t aware that the update would break the “fix” so I just assumed it didn’t work. But since then I have read that the fix will have to be applied after each OS update, and hopefully this will be the end of it. Thanks again!

  12. Is there anyway you could post a video of the exact way everything is being typed? It’s hard to know when you’re supposed to put spaces or press enter and this isn’t working out for me (it did once before but about a year later the silent shutdowns came back). I just updated to Catalina and am trying this solution but it’s asking for a password and sometimes tells me there’s so such command or that the directory is not found and I just don’t want to mess anything up!

  13. I could noooot get this to work but I went through again and read all of the comments which helped (there was a question in there about the spacing that I was wondering). I went through each step and got it to work with catalina! Thanks!!

Leave a Reply