Sometimes resetting the SMC (System Management Controller) on a Mac can resolve an apparent hardware issue. I have found this to work sometimes, but usually it just delays the inevitable hardware issue. I have also documented how to reset the PRAM (Parameter RAM) and NVRAM (Non-Volatile RAM). This is usually one of the first things tried by an Apple repair technician.

Intel Mac notebooks with removable batteries:
1. Shut down the computer.
2. Disconnect the power.
3. Remove the battery.
4. Press and hold the power button for 5 seconds.
5. Release the power button.
6. Reconnect the battery and power.
7. Turn on the computer.

Intel Mac notebooks without removable batteries:
1. Shut down the computer.
2. Ensure that the power is connected.
3. Hit the Shift-Control-Option keys (on the left side) and the power at the same time.
4. Release all the keys and the power button at the same time.
5. Turn on the computer.

Intel desktop Macs:
1. Shut down the computer.
2. Unplug the computer.
3. Press and hold the power button for 5 seconds.
4. Attach the computers power cable.
5. Turn on the computer.

To reset the PRAM and NVRAM:
1. Shut down the computer.
2. Turn on the computer while holding the Command-Option-P-R keys (4).
4. Hold down the keys until you hear the startup bong for the second time.