1. In Disk Utility, repair permissions and verify the disk.
  2. Reset the SMC
    1. On MacBook:
      1. Shut down the computer.
      2. Plug in the MagSafe or USB-C power adapter to a power source and to your computer.
      3. On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
      4. Release all the keys and the power button at the same time.
      5. Press the power button to turn on the computer.
    2. For iMac:
      1. Shut down the computer.
      2. Unplug the power cord.
      3. Wait fifteen seconds.
      4. Attach the power cord.
      5. Wait five seconds, then press the power button to turn on the computer.
  3. Reset the PRAM
    1. Shut down the Mac
    2. Power on the Mac.
    3. Immediately press and hold the Option-Command-P-R keys. You must press this key combination before the gray screen appears.  Continue holding the keys down until your Mac restarts, and you hear the startup sound for the second time. 
    4. Release the keys.
  4. Try a third-party tool:
    1. Titanium Onyx and Maintenance
    2. iBoostUp in Mac Store