MuttleyJR

Q: How to edit the com.apple.PowerManagement.plist file

Hello,

 

Many people are having problems with either the iMac not going to sleep mode or the iMac not waking over LAN (specifically AppleTV, iPhone, iPad etc trying to access iTunes while iMac is asleep)

 

This is a step by step guide to editing the com.apple.PowerManagement.plist file. It has been tested on Mountain Lion OSx. The actual editing mentioned is specifically directed at those wishing to address the problem of the iMac not waking over LAN.

 

Many thanks to softwater for helping out

 

The full path to the file is:

 

/Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist

 

 

Firstly you need to have administration rights to the iMac.

     to check this:

          Click > System Preferences

          Under System click > Users & Groups

          On the left hand side of the window is a list of User names.

          Under your username it must have the word Admin

               If not then you cannot proceed unless you have the Administrators password.

 

Assuming you have Administrator rights or know the Administrators password you need to open Terminal.

     to do this:

          Click > Launchpad

          Open the folder > Other

          Click > Terminal

 

You need to make sure CAPS LOCK is off

 

To edit the file, you need to open the file with administrator rights.

     to do this:

          Type the following as one line. there is a space between vi and / >


sudo vi /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist

 

          Then press Enter or Return key


     You will now be asked for a password.

          If you're an Administrator it will be the password you log into Mountain Lion with.

          or

          It will be the Administrators password.

 

 

     If the password was incorrect, you will still remain at the command prompt.

 

Assuming the password you entered was correct, the editor will open and display the following:

 

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">

<dict>

        <key>ActivePowerProfiles</key>

        <dict>

                <key>AC Power</key>

                <integer>2</integer>

        </dict>

        <key>Custom Profile</key>

        <dict>

                <key>AC Power</key>

                <dict>

                        <key>Automatic Restart On Power Loss</key>

                        <integer>0</integer>

                        <key>Disk Sleep Timer</key>

                        <integer>10</integer>

                        <key>Display Sleep Timer</key>

                        <integer>10</integer>

                        <key>Display Sleep Uses Dim</key>

                        <integer>1</integer>

                        <key>Hibernate File</key>

                        <string>/var/vm/sleepimage</string>

                        <key>Hibernate Mode</key>

                        <integer>0</integer>

                        <key>PrioritizeNetworkReachabilityOverSleep</key>     < This is the KEY to look for

                        <integer>0</integer>                                                    < The RED 0 needs to be changed to 1 (it is not red on the editor)

                        <key>Sleep On Power Button</key>

                        <integer>1</integer>

                        <key>System Sleep Timer</key>

                        <integer>10</integer>

                        <key>TTYSPreventSleep</key>

                        <integer>1</integer>

                        <key>Wake On LAN</key>

                        <integer>1</integer>

                </dict>

        </dict>

        <key>LastSleepUUID</key>

        <dict>

                <key>Date</key>

                <date>2012-10-14T10:40:11Z</date>

                <key>UUID</key>

                <string>80625751-A2B2-4593-B8DA-98C4698A443E</string>

        </dict>

</dict>

</plist>

 

To navigate to the appropriate part of the file use the UP, DOWN, LEFT and RIGHT arrow keys. The best place to put the cursor is to the immediate Right of the value you wish to change.

 

Then press > i key on the Keyboard.

 

This will now allow you to make changes to the file.

 

Press the Backspace key which will delete the character to the immediate left of the cursor. In this example we are deleting only the 0 as shown above.

 

Then enter the value you require. For this example you need to enter 1

 

Now press the ESC key which will take you out of editing mode.

 

CHECK that you have changed ONLY the value that needs changing.

 

IF you have made a mistake enter

                                                                 :q!

     this will quit the editor WITHOUT saving. All you need to do is go back and open file again and make the correct changes.

 

IF you're happy with changes type

                                                                 :wq!

    file will now be SAVED with the changes you have made

 

Now that you have made the changes sucessfully, you can close Terminal by selecting QUIT Terminal from the menu bar!

 

 

And thats it!

I hope this helps

iMac, OS X Mountain Lion (10.8.2)

Posted on Oct 14, 2012 5:56 AM

Close

Q: How to edit the com.apple.PowerManagement.plist file

  • All replies
  • Helpful answers

  • by baltwo,

    baltwo baltwo Oct 14, 2012 2:21 PM in response to MuttleyJR
    Level 9 (62,256 points)
    Oct 14, 2012 2:21 PM in response to MuttleyJR

    IMO, this is way too complicated and unnecessary. Simpler is to just launch the Terminal app and run this in the window that pops up.

     

    defaults read /Library/Preferences/SystemConfiguration/com.apple.PowerManagement | grep PrioritizeNetworkReachabilityOverSleep

     

    If

     

    PrioritizeNetworkReachabilityOverSleep = 0

     

    is returned, then this should fix it:

     

    sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.PowerManagement 1

     

    Otherwise, that domain/default & key pair doesn't exist and that's not what's causing the iMac not waking over LAN problem. 

  • by segran,

    segran segran Oct 20, 2012 12:58 AM in response to baltwo
    Level 1 (1 points)
    Oct 20, 2012 12:58 AM in response to baltwo

    I tried this on my 2010 Mini OS X 10.8.2 and it didn't make any difference at all. Still dead as a door nail. I have tried Mocha, VNC, WakeUp, Hippo and just about anything that is supposed to Wake a LAN device, and they all work on my Windows Pc and my Linux NAS.

     

    So don't waste your time on this -it's useles.

  • by Stanford Griffith,

    Stanford Griffith Stanford Griffith Feb 12, 2013 11:45 PM in response to baltwo
    Level 1 (25 points)
    Feb 12, 2013 11:45 PM in response to baltwo

    Hi, baltwo. When I enter

    sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.PowerManagement 1,

    I get an error message:

    Rep argument is not a dictionary

    Defaults have not been changed.

     

    Any ideas? Thanks!

     

    Stanfords-iMac:~ imac$ defaults read /Library/Preferences/SystemConfiguration/com.apple.PowerManagement | grep PrioritizeNetworkReachabilityOverSleep

                PrioritizeNetworkReachabilityOverSleep = 0;

                PrioritizeNetworkReachabilityOverSleep = 0;

    Stanfords-iMac:~ imac$ sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.PowerManagement 1

    2013-02-13 01:44:49.993 defaults[17136:a07]

    Rep argument is not a dictionary

    Defaults have not been changed.

  • by baltwo,

    baltwo baltwo Feb 13, 2013 3:49 PM in response to Stanford Griffith
    Level 9 (62,256 points)
    Feb 13, 2013 3:49 PM in response to Stanford Griffith

    Boy, I must have been asleep when I wrote that. The full command should be:

     

    sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.PowerManagement PrioritizeNetworkReachabilityOverSleep 1

     

    Let me know if that does the trick.

  • by d0_bl,

    d0_bl d0_bl Feb 12, 2014 4:59 AM in response to baltwo
    Level 1 (0 points)
    Feb 12, 2014 4:59 AM in response to baltwo

    I think it worked, but when I open the plist with this command:

     

    sudo vi /Library/Preferences/SystemConfiguration/com.apple.PowerManagement.plist

     

    it shows:

     

     

    bplist00Ô^A^B^C^D^E^F',_^P&PrioritizeNetworkReachabilityOverSleep^Custom Profile]LastSleepUUID_^P^SActivePowerProfilesQ1Ò^G^H   #XAC Power]Battery Powerß^P^P

    ^K^L^M^N^O^P^Q^R^S^T^U^V^W^X^Y^Z^Z^Z^Z^[^\^]^^^Z^_ !^Z^Z^]"_^P^OStandby Enabled_^P^VWake On Clamshell Open_^P^VDisplay Sleep Uses Dim[Wake On LAN^Hibernate File_^P^WDarkWakeBackgroundTasks_^P&PrioritizeNetworkReachabilityOverSleep_^P^PDisk Sleep Timer_^P^RSystem Sleep Timer_^P^RAutoPowerOff Delay^Hibernate Mode_^P^SDisplay Sleep Timer_^P^TAutoPowerOff Enabled_^P^PTTYSPreventSleep_^P^QWake On AC Change]Standby Delay^P^A_^P^R/var/vm/sleepimage   ^P^@^P

    ^Q8@^P^C^P^O^Q*0ß^P^O

    ^K^L^N^O^Q^R^S^T^U^V^W^X$^Y^Z^Z^Z^[%^^^Z^_ &^Z^Z^]^Z"_^P^PReduceBrightness^H^P^EÒ()*+TDateTUUID3A¸<80>xw^@^@^@_^P$A8ABDCBA-C86D-491B-9213-2C3898DA53BEÒ^G^H--^P^B^@^H^@^Q^@:^@I^@W^@m^@o^@t^@}^@<8b>^@®^@À^@Ù^@ò^@þ^A^M^A'^AP^Ac^Ax^A<8d>^A<9c>^A²^AÉ^AÜ^Að^Aþ^B^@^B^U^B^V^B^X^B^Z^B^]^B^_^B!^B$^BE^BX^BY^B[^B`^Be^Bj^Bs^B<9a>^B<9f>^@^@^@^@^@^@^B^A^@^@^@^@^@^@^@.^@^@^@^@^@^@^@^@^@^@^@^@^@^@^B¡

    ~

    ~

    ~

    ~

    ~

  • by baltwo,

    baltwo baltwo Feb 12, 2014 11:57 AM in response to d0_bl
    Level 9 (62,256 points)
    Feb 12, 2014 11:57 AM in response to d0_bl

    Try defaults read /Library/Preferences/SystemConfiguration/com.apple.PowerManagement

  • by OregonJacques,

    OregonJacques OregonJacques Dec 2, 2014 1:36 PM in response to d0_bl
    Level 1 (0 points)
    Dec 2, 2014 1:36 PM in response to d0_bl

    Because the plist is binary.

    To convert it to text:

     

    sudo plutil -convert xml1 /Library/Preferences/SystemConfiguration/com.apple.PowerManagement

     

    This will convert it to text based XML and then you can edit it using VI.

  • by Br0nxM@c,

    Br0nxM@c Br0nxM@c Dec 26, 2014 4:58 AM in response to MuttleyJR
    Level 1 (5 points)
    Dec 26, 2014 4:58 AM in response to MuttleyJR

    Used your method of fixing my sleep issue in 10.9.5 and everything worked!  The only additional step I took was to restart. I set my sleep preference to 1 minute to test and BINGO!

     

    Thanks for your contribution.  Another satisfied iMac user