brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: keep a plugged in MacBook awake when the screen turns off

Macbook
~/tips/tip-macbook-no-sleep-on-power-display-off

when the display is off: on

Let downloads and shares keep running while only the display sleeps.

A laptop used as a small server at home, or one chewing through a long export, shouldn’t doze off just because the screen went dark.

System Settings > Battery > Options
  Prevent automatic sleeping on power adapter
  when the display is off: on

With this on, the Mac stays awake while it is on the charger, even though the display switches off by its own timer. On battery nothing changes, which is what I want: a laptop in a bag should be asleep.

This is the permanent version. If you only need it for one command or one afternoon, the caffeinate command does that without touching settings.

I would use it for a machine that mostly sits on a desk with the charger in: file sharing for the household, a backup that runs overnight, remote access from another room.

It costs electricity, and Apple says as much about settings that keep a Mac from sleeping. It also does not cover the lid. Close a laptop without an external display set up and it still goes to sleep. And give it air: a Mac working all night on a duvet or in a closed drawer gets warm for no good reason.

Further reading: Change Battery settings on a Mac laptop

More Macbook tips sudo nvram BootPreference=%01 # only block lid open System Settings > Battery > Battery Health > (i) Slightly dim the display on battery: off System Settings > Privacy & Security > Accessories > Allow accessories to connect On power adapter: High Power Mode All Macbook tips (6) All topics

Link