Preventing system sleep in Ventura

Ventura’s new System Settings app, replacing System Preferences, removes the ability to control quite a few important things. One of those is whether or not the system goes to sleep automatically.

Well, it does let you control this setting but only for when the system is on mains power:

Limited controls over system sleep, in Ventura

By default the system will sleep on battery power after some undefined amount of idle time (approximately ten minutes, from observation). System Settings does not allow you to change this.

Fortunately you can use pmset in Terminal to fix this:

sudo pmset -a sleep 0

This specifies that the system should never sleep automatically – that’s the 0 part – and that it should apply in all situations – that’s the -a part.

Alternatively you can modify the setting for just certain power modes, by using different flags:

  • -b for when on battery.
  • -c for when connected to mains power.
  • -u for when connected to a UPS (and mains power is down).

Sidenote: you can use pmset -g to see the current settings regarding power management, e.g.:

System-wide power settings:
Currently in use:
 standby              1
 Sleep On Power Button 1
 hibernatefile        /var/vm/sleepimage
 powernap             1
 networkoversleep     0
 disksleep            10
 sleep                0 (sleep prevented by powerd, sharingd, nsurlsessiond, nsurlsessiond, nsurlsessiond, nsurlsessiond, nsurlsessiond, nsurlsessiond)
 hibernatemode        3
 ttyskeepawake        1
 displaysleep         2
 tcpkeepalive         1
 lowpowermode         0
 womp                 0

Leave a Comment