Apple - MacBook Pro black screens and shuts off after a few minutes' use
As discussed on the MacRumors forums thread, Help! Updated to macOS 10.12.4, MBP randomly shuts off, it is likely that AppleThunderboltNHI.kext is the culprit:
So if you disable (move out of /System/Library/Extensions) AppleThunderboltNHI.kext driver then reboot. Everything runs ok, you can connect external screens via Thunderbolt.
The only drawback is that Ethernet via Thunderbolt will not work.
Been having the same issue for about a year now, right now the only way to prevent it from shutting down randomly is to have the Thunderbolt Gigabit Ethernet Adapter plugged in all the time. Brought my unit to Apple multiple times but were to no avail.
I have now hit on a solution. I'm not sure if it's the correct one, but it works for me so I thought I'd at least post it.
My vague suspicion: things worked perfectly in Windows, but not on Mac OS. This means that it's probably a hardware issue manifesting itself due to differing driver implementations between the two OSes. So, I started disabling driver kexts until Mac OS stopped crashing.
I created a folder under
/System/Library/DisabledExtensions/ and moved these files from
AppleFWAudio.kext AppleThunderboltDPAdapters.kext AppleThunderboltEDMService.kext AppleThunderboltIP.kext AppleThunderboltNHI.kext AppleThunderboltPCIAdapters.kext AppleThunderboltUTDM.kext AppleUSBAudio.kext AppleUSBDisplays.kext AppleUSBEthernet.kext AppleUSBEthernetHost.kext IOUserEthernet.kext
It now works.