The SMC (System Management Controller) controls a number of things related to power management on a mac. If it isn’t working properly it can cause fans to run, the cpu to run slow, and/or, the mac not to wake from sleep when it is supposed to.
On most mac desktop (not the new imac pro), you reset the SMC by:
- shut down the computer
- unplug the power cord
- wait at least 15 minutes
- plug the power cord back in wait 5 seconds more
- turn the computer on
More Details:
https://support.apple.com/en-us/HT201295