Resetting the system management controller (SMC) can resolve certain issues related to power, battery, fans, display, charging, and other problem.
Plug in your Mac
Shut your computer all the way down by clicking the apple icon in the top left corner of your screen and choosing "Shut Down..."
After 10 seconds with the computer completely powered off (no lights, no sound, no spinning wheel on the screen), press and hold the Shift, Control, and Option keys.
While you are still holding the Shift, Control, and Option keys, use your other hand to press and hold the power button.
Continue to hold these four keys for 10 seconds. Your computer should not turn on during these 10 seconds. If it does, start the process again.
Once all four keys have been held for at least 10 seconds, release the keys and press the power button to power on your computer again; your SMC has now been reset.