How to Prevent Your MacBook from Sleeping When the Display is Off While Using a Power Adapter

 Open System Settings

  • Click the Apple menu () in the top left corner of the menu bar.
  • Select System Settings...
  • In the sidebar, click Battery 
  • Click the Options... button at the bottom right.
  • Enable the option Prevent automatic sleeping on power adapter when the display is off. 
  • Click the Done button.

📝 Additional Tips

  • When this option is enabled: Your computer will remain active even when the display is off, allowing downloads, server tasks, remote access, and other operations to continue without interruption.
  • When this option is disabled: Your computer will go to sleep after a set amount of time when the display is off.