Since a while, probably the last system update, after inactivity, the screen won't go to sleep. The system itself is configured not to go to sleep, but the screen should, and it should lock then, but it doesn't.

There is a similar question here: My MacBook won't go to sleep anymore

$ pmset -g assertions
2018-01-01 17:22:20 +0100 
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    1
   PreventSystemSleep             0
   ExternalMedia                  1
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0
Listed by owning process:
   pid 111(hidd): [0x00029b5b00099302] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968026.3" 
    Timeout will fire in 300 secs Action=TimeoutActionRelease
   pid 574(AirPlayUIAgent): [0x0001717d0005a3c9] 38:38:30 PreventUserIdleDisplaySleep named: "com.apple.airplay.disableUserIdleDisplaySleep" 
    Details: disable user idle display sleep for AirPlay screen
   pid 61(powerd): [0x0000000600088000] 91:42:44 ExternalMedia named: "com.apple.powermanagement.externalmediamounted" 
No kernel assertions.
Idle sleep preventers: IODisplayWrangler

I've had this problem last week, then decided to restart. This solved the problem, until now. It seems to have to do with Bluetooth? I'm not sure yet.

Update: it is related to Airplay. Whenever I stream to Apple TV, this happens.

How can I get my screen to go to sleep automatically and fix this problem either permanently or temporarily without having to restart?

  • 2
    Seems like the issue is with AirPlay (see line that starts with pid 574). I got here because of the same problem in mine -- I used AirPlay display mirroring and maybe something got stuck since. Given that no one posted a solution, I tried killing the offending process (AirPlayUIAgent). The assertion is now gone, we'll see later if the display goes to sleep.
    – swineone
    Commented Jan 5, 2018 at 13:08
  • @swineone worked with my iMac on 10.13.2 Commented Mar 2, 2018 at 18:19

2 Answers 2


Launch the built-in Activity Monitor application and select the Energy tab.

Select View ▹ All Processes from the menu bar, if it's not already selected.

Also select View ▹ Columns ▹ Preventing Sleep (or Power Assertion)

Click the heading of the Preventing Sleep column to sort the process table. You'll see which process show "YES" in that screen.


I have same issue. I quit the air play process and it works. Is this a bug?

  • It seems like a bug. I'll try your solution and see if that works for me!
    – SPRBRN
    Commented Jan 24, 2018 at 13:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .