Display won't sleep once it was prevented from #348

Closed
pavel-sakun opened this Issue Jun 14, 2014 · 7 comments

2 participants

@pavel-sakun

Setup is the following:

  • Context1 (action: PreventDisplaySleep 1)
  • Context2 (action: PreventDisplaySleep 0)

Arriving to C1 does what is expected, but both leaving it and arriving to C2 doesn't. I'm assuming NoDisplaySleepAssertion are not reset. Here is the output of 'pmset -g assertions':
...
pid 95357(ControlPlane): [0x0000000500001eae] 00:00:06 NoDisplaySleepAssertion named: "ControlPlane is preventing display sleep"
pid 95357(ControlPlane): [0x0000000500001eac] 00:00:15 NoDisplaySleepAssertion named: "ControlPlane is preventing display sleep"
pid 95357(ControlPlane): [0x0000000500001eaa] 00:00:31 NoDisplaySleepAssertion named: "ControlPlane is preventing display sleep"
pid 95357(ControlPlane): [0x0000000500001102] 23:46:03 NoDisplaySleepAssertion named: "ControlPlane is preventing display sleep"
...

@pavel-sakun pavel-sakun changed the title from Display sleep behaviour is not restored after departure form the context to Display won't sleep once it was prevented from Jun 14, 2014
@dustinrue
Owner

I can't replicate this locally. What you can try is to add an allow sleep action on departure from Context1

@pavel-sakun

This is what I actually did: https://www.dropbox.com/s/783t02klwk4wzse/Screen%20Shot%202014-06-16%20at%202.02.44.png

ControlPlane is not launched:
6/16/14, 2:01:07 GMT+3
Assertion status system-wide:
BackgroundTask 0
PreventDiskIdle 0
ApplePushServiceTask 0
UserIsActive 1
PreventUserIdleDisplaySleep 0
InteractivePushServiceTask 0
PreventSystemSleep 0
ExternalMedia 1
PreventUserIdleSystemSleep 0
NetworkClientActive 0
Listed by owning process:
pid 18(powerd): [0x0000000900000f51] 00:41:50 ExternalMedia named: "com.apple.powermanagement.externalmediamounted"
pid 100(hidd): [0x0000000a0000101e] 00:00:42 UserIsActive named: "com.apple.iohideventsystem.queue.tickle"
Timeout will fire in 138 secs Action=TimeoutActionRelease
Kernel Assertions: 0x104=USB,MAGICWAKE
id=501 level=255 0x4=USB mod=6/16/14, 0:24 description=XHC1 owner=AppleUSBXHCI
id=502 level=255 0x100=MAGICWAKE mod=6/16/14, 2:03 description=en0 owner=en0

Arrived to Context1:
Assertion status system-wide:
BackgroundTask 0
PreventDiskIdle 0
ApplePushServiceTask 0
UserIsActive 1
PreventUserIdleDisplaySleep 1
InteractivePushServiceTask 0
PreventSystemSleep 0
ExternalMedia 0
PreventUserIdleSystemSleep 0
NetworkClientActive 0
Listed by owning process:
pid 24505(ControlPlane): [0x0000000500001022] 00:00:42 NoDisplaySleepAssertion named: "ControlPlane is preventing display sleep"
pid 100(hidd): [0x0000000a0000101e] 00:01:50 UserIsActive named: "com.apple.iohideventsystem.queue.tickle"
Timeout will fire in 178 secs Action=TimeoutActionRelease
Kernel Assertions: 0x104=USB,MAGICWAKE
id=501 level=255 0x4=USB mod=6/16/14, 0:24 description=XHC1 owner=AppleUSBXHCI
id=502 level=255 0x100=MAGICWAKE mod=6/16/14, 2:03 description=en0 owner=en0

Departed from Context1, arrived to C2
Assertion status system-wide:
BackgroundTask 0
PreventDiskIdle 0
ApplePushServiceTask 0
UserIsActive 1
PreventUserIdleDisplaySleep 1
InteractivePushServiceTask 0
PreventSystemSleep 0
ExternalMedia 0
PreventUserIdleSystemSleep 0
NetworkClientActive 0
Listed by owning process:
pid 24505(ControlPlane): [0x0000000500001022] 00:00:51 NoDisplaySleepAssertion named: "ControlPlane is preventing display sleep"
pid 100(hidd): [0x0000000a0000101e] 00:01:59 UserIsActive named: "com.apple.iohideventsystem.queue.tickle"
Timeout will fire in 169 secs Action=TimeoutActionRelease
Kernel Assertions: 0x104=USB,MAGICWAKE
id=501 level=255 0x4=USB mod=6/16/14, 0:24 description=XHC1 owner=AppleUSBXHCI
id=502 level=255 0x100=MAGICWAKE mod=6/16/14, 2:03 description=en0 owner=en0

AFAIU numbers before NoDisplaySleepAssertion is time since the "Prevent Display From Sleep" action was executed. The only way to clean NoDisplaySleepAssertions I found is to relaunch CP.

@dustinrue
Owner

Please install the latest update and try this again, reopen the ticket if it is still an issue.

@dustinrue dustinrue closed this Jun 20, 2014
@pavel-sakun

NoDisplaySleepAssertions still stay there till i restart CP.

@dustinrue
Owner

can you share a screenshot of your actions setup screen?

@dustinrue dustinrue reopened this Jun 27, 2014
@pavel-sakun

Here it is https://www.dropbox.com/s/cxpvo8it7sux4q1/Screenshot%202014-06-28%2011.11.41.png The second "Allow display sleep" is just to try all the options.

@pavel-sakun

Just noticed that the fix working now (restart after upgrading to 10.9.4?) Thank you Dustin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment