I’ve noticed that my MBP tends to go to sleep too quickly for my taste. Not just dimming the display, but actually going to sleep (when running off battery).
When connected to power, I have a setting to prevent the computer from sleeping at all when the display is off (and I actually use that so it never sleeps when plugged in), but even there, there’s no setting to adjust time, it’s just sleep or don’t sleep.
Anyway, I wanted to adjust the Energy Saver pref to increase sleep time when running off battery. Lo and behold, there’s only a setting for time to turn off display. Is it just me or is there no time to sleep setting anymore? Is this Catalina or is it the 2020 MBP? I’m pretty certain I was able to adjust sleep time on my 2013 MBP running Mojave (or HS?). Argh. Why remove such a pref?
bleh. I haven’t updated to Catalina, but same irritation on Mojave with my MBP 2017. I have to constantly re-login b/c I’ve been logged out, and there doesn’t seem to be any way to keep the Mac running without me standing over it clicking the keyboard. I tried using it as a Music streaming device a few times (to an AppleTV connected to a stereo, MBP connected to power), but the MBP will still log out.
He has a great article Power Management in detail: using pmset which explains how to use pmset to do this and many other things. I encourage you to take a few minutes to read it, and possibly bookmark it for future reference.
The quick answer, however, is that you can use this:
sudo pmset -b sleep 20
to set a 20 minute sleep timer (sleep 20) when running on battery (-b).