Today I came across an issue where a Mac running OS X wouldn't sleep on power, but would sleep fine when on battery. The root cause was a stuck print job in the printer queue. Read on for instructions on how to troubleshoot power and sleep issues on OS X.
In OS X the pmset -g assertions command gives you a summary of the power management assertions in affect.
bob@mymac:~$ pmset -g assertions 22/04/12 12:13:18 PM AE Assertion status system-wide: ChargeInhibit 0 PreventUserIdleDisplaySleep 0 PreventUserIdleSystemSleep 0 NoRealPowerSources_debug 0 CPUBoundAssertion 0 EnableIdleSleep 1 PreventSystemSleep 1 DisableInflow 0 DisableLowPowerBatteryWarnings 0 ExternalMedia 0 Listed by owning process: pid 36: [0x0000012c00000024] PreventSystemSleep named: "org.cups.cupsd" Kernel Assertions: None
We see above the process org.cups.cupsd is preventing the system from sleeping. CUPS is Common Unix Print Daemon, which for OS X means our print queue.
After going to Print & Scan in system preferences we find a printer with a document that cannot be printed because the printer is offline. After deleting the document we reran pmset -g assertions:
bob@mymac:~$ pmset -g assertions 22/04/12 12:14:46 PM AE Assertion status system-wide: ChargeInhibit 0 PreventUserIdleDisplaySleep 0 PreventUserIdleSystemSleep 0 NoRealPowerSources_debug 0 CPUBoundAssertion 0 EnableIdleSleep 1 PreventSystemSleep 0 DisableInflow 0 DisableLowPowerBatteryWarnings 0 ExternalMedia 0 Kernel Assertions: None
Now we see PreventSystemSleep = 0 (or False). So our system will now sleep.
Reboot and your system should sleep when on power!
— Andrew
Comments
No comments yet.