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