enter image description here

So while on battery power you have the option to prevent the computer from sleeping when display is off. How ever this option is only available while on power adapter. Is there a way to do this on battery power? Prevent computer from sleeping when display is of but on battery power? thank you in advance

3 Answers 3


‎Amphetamine is a free application that will give you a lot of power and flexibility about keeping your Mac awake under various conditions.

It has been around for a number of years and considered very trustworthy. I would recommend it without reservation.

‎Amphetamine even has an option to disable itself when the battery reaches a certain percentage, which will reduce the chance that you will unwittingly run the battery to 0% (it is not generally advisable to run the battery fully empty). Obviously, the final choice is up to you.


You have two options, depending on whether you want a temporary or permanent change in behavior:

  1. Disable system sleep when on battery: sudo pmset -b sleep 0. This setting persists across reboots.
  2. Run caffeinate in a Terminal window during periods of time when you don't want the system to sleep.
  • Today I Learned: caffeinate is not a third-party app. It's actually a built-in tool in macOS! Run man caffeinate to learn about it. (It's unclear if any Linux distros have this too.)
    – ADTC
    Commented Jul 14, 2023 at 7:16

It seems that simply disabling Turn display off after and Put hard disks to sleep when possible under System Preferences > Battery > Battery has been sufficient for me to disable sleeping while on battery power.

  • I do not see these options
    – pete
    Commented Oct 16, 2023 at 21:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .