Prevent sleep when on battery power with Display off

In the new macOS Sonoma (14.2.1) it seems to be impossible to prevent my laptop from sleeping when on battery power with Display off, which completely ruins my software-development workflow. In general there is no clear separation between the Display off and Computer sleep states in the Settings app, which is very confusing and limiting.


I often need my MacBook to keep working for 1-2 hours overnight or when I go for lunch or a meeting, running tasks in a Terminal/Docker/SSH session. Thus I turn off the Display (using a Hot Corner Shortcut) to save battery, and leave it running at the lowest possible power consumption. In case I know the task would take less than 2 hours, for example, I would even use the `shutdown -s +2h` command in Terminal to put the Laptop to sleep at specific time and save battery even more.


Now this workflow seems impossible, because I have to either not turn the Display off at all, losing extra power, or having it connected to a power adapter, which is not always possible. So instead of improving my battery life it actually forces me to keep the Display on all the time, consuming even more power.


Considering how long the battery life is on the new MacBooks it certainly should be allowed to keep it running with the Display off, even if hidden deeper in the Settings app, such that those users who actually need it can use it. I'm sure that having a MacBook appearing as it is off but actually working under the hood is essential for a huge amount of professionals.

MacBook Pro 14″, macOS 14.2

Posted on Jan 14, 2024 2:18 AM

Reply
2 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Prevent sleep when on battery power with Display off

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.