Arun Kumar Arun Kumar Asked 5 months ago

How to stop macbook from going to sleep?

I use my MacBook for long coding sessions and sometimes it just goes to sleep while I'm trying to concentrate. I need it to stay active without me constantly touching the keyboard or trackpad. How can I stop my MacBook from automatically sleeping?

5

5 answers

Pooja Hegde Pooja Hegde Joined Jan 2026 5 months ago
Most liked

I had to keep my MacBook awake for long online sessions. I found that changing the 'Turn display off' timer in the Lock Screen settings works well without needing extra software.

Ipsita Dutta Ipsita Dutta Joined Jan 2026 5 months ago

It is so annoying when the screen goes dark right in the middle of a presentation! I used to get so stressed, but using the free app 'Amphetamine' completely solved this hassle for me.

Powered by

Consult a internal medicine specialist

Aditya Rao Aditya Rao Joined Feb 2026 5 months ago

Same here. Typing 'caffeinate' in the terminal is the quickest way to stop your MacBook from sleeping without installing anything.

Sneha Roy Sneha Roy Joined May 2026 5 months ago

Hey! Don't stress too much about this, it's a super easy fix. Just go to System Settings > Battery or Lock Screen, and set the sleep time to 'Never' while plugged in.

Related reads

All articles
Kalyani Swamy Kalyani Swamy Joined Jun 2026 4 months ago

My son helped me with this on my laptop. He configured the Energy Saver settings so the display stays active when the charger is connected, which is very convenient.

Evidence-based health, reviewed by clinicians. Free, weekly.