Thanks to combining advice from this post from /u/afroeskimo over in /r/MacOS, a comment from /u/ASentientBot and this MacBook Pro random shutout fix instruction website, adapted from this MacRumors thread , I have (hopefully) fixed my MacBook Pro 2014 15” when it kept randomly shutting down on 10.15.5 Catalina.
When it shuts down due to this problem, the computer suddenly goes completely dead, like the battery has died. I have ran Disk Utility and both volumes of my disk (Macintosh HD and Macintosh HD - Data) are fine and I replaced my battery six months with no effect on the random shutdowns before performing the below workaround.
For a while (since at least Mojave), I’ve had to rename AppleThunderboltNHI.kext to AppleThunderboltNHI.kext.BAK to keep my computer from shutting down randomly. It's an annoying workaround to have to do every time my Mac updates, but it works with no random shutdowns.
After accidentally updating to 10.15.5 (I turned off automatic updates but I must have clicked on the notification to update after a restart), I renamed AppleThunderboltNHI.kext to AppleThunderboltNHI.kext.BAK, but also had to rename IOThunderboltFamily.kext to IOThunderboltFamily.kext.BAK for my computer to stop randomly shutting down (for now).
Disclaimer: This worked for me but may not work for everyone. Not responsible for any possible damage to computer, etc. etc.
Here are the steps I followed:
1. Restart Mac in recovery mode by holding command + r while starting up. While in recovery mode, open Terminal by selecting it from Utilities in the menu bar.
2. Type csrutil disable in Terminal, press enter, enter your password if prompted.
3. Reboot to normal
4. Once logged in, open Terminal and type sudo mount -uw /
4a. Press enter, then enter your password
5. Type killall Finder
5a. Press enter
6. Open Finder, navigate to the the "Go" menubar at the top of the screen and then select "Go To Folder" (command + shift + G).
6a. Go to /System/Library/Extensions
7. Once in the Extensions folder, rename AppleThunderboltNHI.kext to AppleThunderboltNHI.kext.BAK
(alternate Terminal method: sudo mv /System/Library/Extensions/AppleThunderboltNHI.kext /System/Library/Extensions/AppleThunderboltNHI.kext.BAK)
and rename IOThunderboltFamily.kext to IOThunderboltFamily.kext.BAK
(alternate Terminal method: sudo mv /System/Library/Extensions/IOThunderboltFamily.kext /System/Library/Extensions/IOThunderboltFamily.kext.BAK)
8. Restart in recovery mode, open Terminal and type csrutil enable
9. Reboot into normal mode and the problem should be fixed.
Note: I am still able to plug in my external monitor via Thunderbolt and it works even with those kext files disabled. I don't believe Ethernet via Thunderbolt works with the kext files disabled, but I haven't tested it myself as I don't use Ethernet.
When it shuts down due to this problem, the computer suddenly goes completely dead, like the battery has died. I have ran Disk Utility and both volumes of my disk (Macintosh HD and Macintosh HD - Data) are fine and I replaced my battery six months with no effect on the random shutdowns before performing the below workaround.
For a while (since at least Mojave), I’ve had to rename AppleThunderboltNHI.kext to AppleThunderboltNHI.kext.BAK to keep my computer from shutting down randomly. It's an annoying workaround to have to do every time my Mac updates, but it works with no random shutdowns.
After accidentally updating to 10.15.5 (I turned off automatic updates but I must have clicked on the notification to update after a restart), I renamed AppleThunderboltNHI.kext to AppleThunderboltNHI.kext.BAK, but also had to rename IOThunderboltFamily.kext to IOThunderboltFamily.kext.BAK for my computer to stop randomly shutting down (for now).
Disclaimer: This worked for me but may not work for everyone. Not responsible for any possible damage to computer, etc. etc.
Here are the steps I followed:
1. Restart Mac in recovery mode by holding command + r while starting up. While in recovery mode, open Terminal by selecting it from Utilities in the menu bar.
2. Type csrutil disable in Terminal, press enter, enter your password if prompted.
3. Reboot to normal
4. Once logged in, open Terminal and type sudo mount -uw /
4a. Press enter, then enter your password
5. Type killall Finder
5a. Press enter
6. Open Finder, navigate to the the "Go" menubar at the top of the screen and then select "Go To Folder" (command + shift + G).
6a. Go to /System/Library/Extensions
7. Once in the Extensions folder, rename AppleThunderboltNHI.kext to AppleThunderboltNHI.kext.BAK
(alternate Terminal method: sudo mv /System/Library/Extensions/AppleThunderboltNHI.kext /System/Library/Extensions/AppleThunderboltNHI.kext.BAK)
and rename IOThunderboltFamily.kext to IOThunderboltFamily.kext.BAK
(alternate Terminal method: sudo mv /System/Library/Extensions/IOThunderboltFamily.kext /System/Library/Extensions/IOThunderboltFamily.kext.BAK)
8. Restart in recovery mode, open Terminal and type csrutil enable
9. Reboot into normal mode and the problem should be fixed.
Note: I am still able to plug in my external monitor via Thunderbolt and it works even with those kext files disabled. I don't believe Ethernet via Thunderbolt works with the kext files disabled, but I haven't tested it myself as I don't use Ethernet.