What’s the problem?
I’m shocked at how little straightforward documentation there is regarding where the Energy Saver settings (from System Preferences) are stored or how to modify them using the terminal.
Where are the settings stored?
Using opensnoop, I was able to track down that Energy Saver modifies this file:
/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist
The main slider in Yosemite is labeled Turn display off after: and has one slider for Battery and another for Power Adapter.
If you want to read how that’s stored in /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist via terminal, there are two commands you can use:
(which will be labeled as “Display Sleep Timer” (the value 0 is for Never—otherwise, it’s straight numeric by minutes) or
(which will be labeled as displaysleep).
How do you change the settings?
To modify it for all power settings (according to the man page for pmset, there are separate parameters for a wall charger versus a UPS, so it’s easier to modify for all and then just modify battery afterwards), you’d enter this command into the terminal:
(for three hours, as an example) and then enter this command into the terminal:
(for 25 minutes, as an example) to modify just the battery settings.
If you look at /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist or the output of pmset -g custom, you’ll see your changes take immediately. If, however, you look at Energy Saver through System Preferences, you’ll see that the changes aren’t reflected immediately without a logout or a reboot.
Leave a Reply