Finding and Fixing Problems
Power Manager's capabilities come at the cost of some complexity. Finding, understanding, and fixing problems related to Power Manager is not always trivial.
But don't worry. We are here to help and Power Manager does its best to help as well. If after trying the advice below, you continue to have problems, please contact us at firstname.lastname@example.org.
Most problems can be found and fixed by reviewing Power Manager's log entries. Power Manager's log can be viewed using Apple's Console.app application.
Apple's Console.app application is a your guide for peering into the depths of macOS. Every significant process on macOS uses logs to record progress and problems. Console.app lets you view and search the logs.
Figure 1.1. Console.app
When you encounter unexpected behaviour in any application, your first course of action must be to view the recent system.log activity. It is here that you are most likely to find answers explaining the unexpected behaviour.
Console.app is part of the standard macOS distribution. It is available on every edition of macOS.
You will find Console.app in the
Below are notes covering the most common problems we are contacted about.
My Mac Did Not Power On
If your Mac does not wake up or power on at the expected time, you need to check the log.
Use Apple's Console.app application to view your
system.log file. Look for lines mentioning the
IOPMQueue is part of macOS and is responsible for waking up and powering on your Mac to a schedule. This is the same system that Apple's Energy Saver System Preference uses.
Can you find a line mentioning your expected power event?
Reproduce the Problem
Try the following to reproduce the problem:
Using Power Manager, create a new power on event due in 10 minutes time.
Check the event appears in Power Manager's status menu bar.
Check the log to see if the
IOPMQueueentry appears as expected.
Launch the Terminal:
Use the pmset command to list your Mac's pending hardware power events; see Example 1.19, “Listing
IOPMQueueevents with pmset”
If the expected event is listed, shut down and wait 15 minutes.
Did your Mac power on?
Example 1.19. Listing
IOPMQueue events with pmset
bash%pmset -g sched
If your Mac did not power on as expected, repeat the test using Apple's Energy Saver schedule. If neither tool can power on your Mac, we recommend contacting Apple Support.
Modern Mac laptops can not automatically power on when they are disconnected from main power. Is your Mac running on the battery when the power event is due to occur?
Some older editions of macOS require at least two minutes between the power event being scheduled, and the power event being due.
We have had users report that reinstalling macOS fixed their Mac's ability to power on.
My Event Did Not Trigger
If an event is not being triggered, first check the event's history.
Example 1.20. AppleScript showing event history and additional information.
tell application "Power Manager" set myEventName to "Evening" -- change to the event name tell the Event Store properties of (history for event with id (active ID of event myEventName)) end tell end tell
The event's history is accessible via the command line tool
pmctl and via AppleScript; see Example 1.20, “AppleScript showing event history and additional information.”
Use Apple's Console.app application to view Power Manager's log. Look for lines mentioning events being triggered and performed. Each time an event is performed, it is noted in the log.
The event may be triggered but not performed. This can happen if conditions block the performance, or if the actions encounter a problem while performing. Blocking conditions and action errors are both noted in the log.
My Application Did Not Launch
If your application does not launch, or your script is not executed, check the log.
Use Apple's Console.app application to view Power Manager's log. Look for lines mentioning assistants and matched users.
Power Manager delegates the role of launching applications to assistants. Most applications are launched in the current Active User's security session. This requires an assistant to be acting on behalf of the Active User.
If no Active User assistant can be found, then your application can not be launched.
The Active User is the front most logged in user. The user must be logged into an Aqua graphical session - typically this is the last user who logged in via the Login Window.
Fast switched users and the Login Window are never the Active User.
Power Manager is Not Running
If Power Manager is reported as not running, restart your Mac.
If after restarting, Power Manager continues to unavailable, install a fresh copy of Power Manager.
Power Manager is managed by launchd. Power Manager's essential daemon process is first launched on start up. Should problems occur and the daemon crashes, launchd will automatically restart the daemon.
Use Apple's Console.app application to view the
system.log file. If launchd is having problems launching Power Manager, those problems will be recorded in the log.
Power Manager may not be running if its launchd job tickets have been altered or disabled. A repeat install will correct these problems.
Console Shows -9845 or -98xx Error Codes
Errors visit in Console.app beginning with -98xx indicate a problem setting up a secure connection to pmd, the main Power Manager daemon. It is likely that pmd is working correctly, but that the supporting processes can not establish secure connections with it.
Try restarting your Mac. If after restarting, Power Manager continues to be unavailable and to log -98xx errors, you should next force the creation of a new security certificate, see Procedure 1.11, “Force Create a New Certificate”.
To force Power Manager to create a new security certificate, delete the
/Library/Application Support/Power Manager/Keychains/ folder and its contents.
Procedure 1.11. Force Create a New Certificate
- Delete the
/Library/Application Support/Power Manager/Keychains/folder and its contents.
- Restart your Mac, or force quit pmd.
- On restarting pmd will create a new Keychain folder and self-signed security certificate.