commands.com
Ask Your Question
commands.com
Mac ยป pmset

Syntax


   List current settings (Get)
      pmset -g [custom | live | cap | sched | ups | ps | pslog | rawlog]

   UPS settings:
      pmset -u [haltlevel percent] [haltafter minutes] [haltremain minutes]

   Settings for battery(b),charger(c), UPS(u), all(a):
      pmset [-b | -c | -u | -a] [displaysleep minutes] [disksleep minutes]
           [sleep minutes] [womp 1/0] [ring 1/0] [autorestart 1/0] [dps 1/0]
              [reduce 1/0] [powerbutton 1/0] [lidwake 1/0] [acwake 1/0]
                 [lessbright 1/0] [halfdim 1/0] [sms 1/0] [boot]

   Override settings and sleep now:
      pmset [sleepnow | noidle | lock | touch]

   Schedule:
      pmset schedule [cancel] {sleep | wake | poweron | shutdown | wakeorpoweron}
               "MM/dd/yy HH:mm:ss" [owner]

      pmset repeat cancel

      pmset repeat {sleep | wake | poweron | shutdown | wakeorpoweron}
               weekdays "MM/dd/yy HH:mm:ss"

            Where weekdays is a subset of MTWRFSU ("M" and "MTWRF" are valid strings)
Key:

  GETTING

   -g live    Display the settings currently in use. (default if no argument given)
   -g custom  Display custom settings for all power sources, although
              these settings may not currently be in use; a pre-set settings profile
              may be active instead.
   -g cap     Display which power management features the machine supports.
   -g sched   Display scheduled startup/wake and shutdown/sleep events.
   -g ups     Display UPS emergency thresholds.
   -g ps      Display status of batteries and UPSs.
   -g pslog   Display an ongoing log of power source (battery and UPS)state.
   -g rawlog  Display an ongoing log of battery state as read directly from battery.
   -g profiles Display the settings associated with each Energy Saver profile.

ARGUMENTS

   displaysleep - display sleep timer; replaces 'dim' argument in 10.4
                 (value in minutes, or 0 to disable)
   disksleep - disk spindown timer; replaces 'spindown' argument in 10.4
                 (value in minutes, or 0 to disable)
   sleep - system sleep timer (value in minutes, or 0 to disable)
   womp  - wake on ethernet magic packet (value = 0/1)
   ring  - wake on modem ring (value = 0/1)
   autorestart - automatic restart on power loss (value = 0/1)
   dps    - dynamically change processor speed based on load (value = 0/1)
   reduce - reduce processor speed (value = 0/1)
   powerbutton - sleep the machine when power button is pressed (value=0/1)
   lidwake - wake the machine when the laptop lid (or clamshell) is opened
             (value = 0/1)
   acwake - wake the machine when power source (AC/battery) is changed
             (value = 0/1)
   lessbright - slightly turn down display brightness when switching to this
                power source (value = 0/1)
   halfdim - display sleep will use an intermediate half-brightness state
             between full brightness and fully off  (value = 0/1)
   sms - use Sudden Motion Sensor to park disk heads on sudden changes in G
         force (value = 0/1)
   hibernatemode - change hibernation mode. Please use caution. (value =integer)
   hibernatefile - change hibernation image file location. Image may only be
                   located on the root volume. Please use caution. (value = path)
   ttyskeepawake - prevent idle system sleep when any tty (e.g. remote login
                   session) is 'active'. A tty is 'inactive' only when its idle time exceeds
                   the system sleep timer. (value = 0/1)
pmset must be run as root in order to modify any settings.
See man pmset for a description of power management with more examples.

Example


Set displaysleep to a 5 minute timer on battery power
$ sudo pmset -b displaysleep 5

Print the power management settings in use by the system:
$ pmset -g

Restore default settings:
$ sudo pmset -c 2 -b 1 -u 1
Sort by »
by date by activity ▼ by answers by votes