Location of com.apple.PowerManagement.plist in MAC O.S

We read/write “com.apple.PowerManagement.plist” for managing power of MAC O.S. This was usually located in “/Library/Preferences/SystemConfiguration”. However from 10.12, It’s location is changed and name is also changed. Please let us know the location and name of this file in all/different version of MAC O.S. Also can we progrmatically (Using C++) detrime the location of this file?.

Replies

Unless specifically documented otherwise, Apple preferences files are not considered API, meaning it’s not safe to modify them directly. What effect are you trying to achieve here? In most cases this files acts as backing for things that are settable by various power management APIs, so you can call those APIs rather than interact with this implementation detail.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"


WWDC runs Mon, 4 Jun through to Fri, 8 Jun. During that time all of DTS will be at the conference, helping folks out face-to-face.

Thanks for your suggestion.


We have legacy application which reads ActivePowerProfiles and Custom Profile from this file. However application is failing because location of “com.apple.PowerManagement.plist” is changed from 10.12. We will look into replacing reading/writing of this file with power management APIs. However this change needs some R&D time and customer cant wait till this change. For immediate fix if you can let us know the location in diffrent O.S version or point to document which give more info on this file. Then we can quickly change the location and cusomer can continue use our product till we come up with alternative. Thanks for your help.

For immediate fix if you can let us know the location in diffrent O.S version

I’m sorry but I’ve no idea. Because this is an implementation detail, I’ve never had cause to research it.

or point to document which give more info on this file.

I very much doubt that there’s any document discussing this, for much the same reason.

There’s various techniques you can use to reverse engineer this sort of thing [1] but they’re all going to require some investment of time and, IMO, that time would be better spent researching a sustainable solution.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"


WWDC runs Mon, 4 Jun through to Fri, 8 Jun. During that time all of DTS will be at the conference, helping folks out face-to-face.

[1] For example:

  • You can look in the Darwin source

  • You can search the hard disk for similarly-named files (it might have just moved)

  • You can watch file system activity (using

    fs_usage
    ) while you make changes via the UI

Thanks for suggestion. We will be using pmset command to manage powers(Assumed pmset output is same across all version of O.S but its not). However output of "pmset -g" is diffrent in diffrent o.s We need to query Active Profiles for AC power and DC power. But Active Profiles is missing from "pmset -g" command of 10.12.6(macOS Sierra) as compared to 10.9.4. Can you please let me know how to get Active profiles or let me know if this is change in behaviour is documented somewhere. Below is the output from 2 diffrent MAC o.s version


10.9.4

pmset -g

Active Profiles:

Battery Power 1

AC Power 2*

Currently in use:

standbyDelay 4200

...

...


10.12 6 - Note Active Profiles: section is missing from output

pmset -g

Currently in use

standbyDelay 10800

...

...

I´m bringing this up again as I have a quite similar problem.

I´m running an mac pro 2013 on Catalina 10.15.7. (need to stay with this regarding compatibility of some apps).

The mac is always starting once i switch on the electricity. (Recording studio - we need to do that due to some other start up procedure of the whole studio.

Energy save option is set to not start after power - loss.

pmset -g says the following:

Currently in use:  standby              1  Sleep On Power Button 1 womp                 0 autorestart          0 hibernatefile        /var/vm/sleepimage powernap             0 gpuswitch            2 networkoversleep     0 disksleep            0 standbydelayhigh     86400 sleep                0 autopoweroffdelay    259200 hibernatemode        0 autopoweroff         1  ttyskeepawake        1 displaysleep         0 highstandbythreshold 50 standbydelaylow      0

I went into recovery mode and checked the terminal.

There autorestart was showing (1)!!

How would you recommend to fix that?

Best regards for helping me with that in advance!

It drives us nuts, because we really need the mac to start later, after a few other devices booted up properly.

Frederic

pmset isn’t really an API, and thus outside of my area of expertise. You might have better luck asking this question over in Apple Support Communities, run by Apple Support. If that doesn’t pan out, I recommend that you raise this with Apple Support directly.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"