IMac display sleep

display

I program my iMac to put the display to sleep after 10 mins. It has always worked till now but not any more. The display stays on all the time whatever I do on the energy save page, so when I am away from the iMac the screen saver starts and it will stay on until I next touch the mouse which can be days if I am away and am running Skype for example. I can only sleep the display manually.
Any ideas anyone?

Best Answer

You can use the pmset command to "ask" power management if there is anything that will prevent sleeping. In this first example, I have recently rebooted, and there isn't anything that should prevent the system from sleeping:

$ pmset -g assertions
5/10/13 8:18:51 AM EDT
Assertion status system-wide:
   PreventUserIdleDisplaySleep             0
   CPUBoundAssertion                       0
   DisableInflow                           0
   ChargeInhibit                           0
   PreventSystemSleep                      0
   PreventUserIdleSystemSleep              0
   ExternalMedia                           0
   DisableLowPowerBatteryWarnings          0
   EnableIdleSleep                         1
   NoRealPowerSources_debug                0
   UserIsActive                            0
   ApplePushServiceTask                    0

Kernel Assertions: None

Then I started iTunes playing a song. Checking now, you can see that sleep will be prevented by the core audio process.

$ pmset -g assertions
5/10/13 8:19:46 AM EDT
Assertion status system-wide:
   PreventUserIdleDisplaySleep             0
   CPUBoundAssertion                       0
   DisableInflow                           0
   ChargeInhibit                           0
   PreventSystemSleep                      0
   PreventUserIdleSystemSleep              1
   ExternalMedia                           0
   DisableLowPowerBatteryWarnings          0
   EnableIdleSleep                         1
   NoRealPowerSources_debug                0
   UserIsActive                            0
   ApplePushServiceTask                    0

Listed by owning process:
  pid 1124: [0x00000464012c001f] PreventUserIdleSystemSleep named: "Nameless (via IOPMAssertionCreate)"
  pid 269: [0x0000010d012c0020] PreventUserIdleSystemSleep named: "com.apple.audio.'AppleHDAEngineOutput:1B,0,1,2:0'.noidlesleep"

Kernel Assertions: None