MacBook Pro won’t put external display to sleep when idle

displayhigh sierramacbook propower-management

I have a Mid-2015 MacBook Pro running High Sierra. I mostly use it as a desktop, in clamshell mode with an external monitor and keyboard.

I just replaced the 24-inch LG monitor that was connected using a Mini DisplayPort to VGA adapter with a 32-inch Acer EB321HQ-U connected using DisplayPort.

I have Energy Saver set to put the display to sleep after 5 minutes. But this is being ignored, and it's showing the screen saver instead, even though this time is set higher. I have the screen saver set to black, but the backlight is still on so there's a dim glow from the monitor.

This wasn't a problem with my previous monitor. Is there anything that can be done about it?

It is possible for the Mac to sleep the monitor. If I press Ctl-Shift-Power, the display clears, it cycles through the various inputs, then displays "No Signal" and goes black. It just doesn't do this automatically when idle.

UPDATE:

coreaudiod seems to be preventing display sleep.

imac:barmar $ pmset -g
System-wide power settings:
Currently in use:
 standbydelay         10800
 standby              1
 womp                 0
 halfdim              1
 hibernatefile        /var/vm/sleepimage
 powernap             0
 gpuswitch            2
 networkoversleep     0
 disksleep            0
 sleep                0 (sleep prevented by coreaudiod)
 autopoweroffdelay    28800
 hibernatemode        3
 autopoweroff         1
 ttyskeepawake        1
 displaysleep         5 (display sleep prevented by coreaudiod)
 tcpkeepalive         1
 acwake               0
 lidwake              1
imac:barmar $ pmset -g assertions
2019-04-04 19:54:56 -0400 
Assertion status system-wide:
   BackgroundTask                 0
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    1
   PreventSystemSleep             0
   ExternalMedia                  1
   InternalPreventDisplaySleep    1
   PreventUserIdleSystemSleep     1
   NetworkClientActive            0
Listed by owning process:
   pid 159(coreaudiod): [0x0001387d00018bb1] 00:00:00 PreventUserIdleSystemSleep named: "com.apple.audio.AppleHDAEngineOutputDP:3,0,1,0:0:{7204-0507-01010101}.context.preventuseridlesleep" 
    Created for PID: 298. 
   pid 159(coreaudiod): [0x0001387d00058bb2] 00:00:00 PreventUserIdleDisplaySleep named: "com.apple.audio.AppleHDAEngineOutputDP:3,0,1,0:0:{7204-0507-01010101}.context.preventuseridledisplaysleep" 
    Created for PID: 298. 
   pid 75(powerd): [0x0000001000088000] 22:12:57 ExternalMedia named: "com.apple.powermanagement.externalmediamounted" 
   pid 75(powerd): [0x0000bb3c00108108] 00:00:00 InternalPreventDisplaySleep named: "com.apple.powermanagement.delayDisplayOff" 
    Timeout will fire in 300 secs Action=TimeoutActionTurnOff
   pid 119(hidd): [0x0001338b000991a6] 00:00:00 UserIsActive named: "com.apple.iohideventsystem.queue.tickle.4294968308.3" 
    Timeout will fire in 300 secs Action=TimeoutActionRelease
Kernel Assertions: 0x2c=USB,BT-HID,THNDR
   id=500  level=255 0x20=THNDR mod=4/4/19, 12:53 AM description=NHI0 owner=AppleThunderboltHAL
   id=502  level=255 0x4=USB mod=12/31/69, 7:00 PM description=com.apple.usb.externaldevice.14100000 owner=IOUSBHostDevice
   id=504  level=255 0x4=USB mod=12/31/69, 7:00 PM description=com.apple.usb.externaldevice.14120000 owner=Back-UPS NS 700MC FW:907.W1 .D USB FW:W1 
   id=505  level=255 0x4=USB mod=12/31/69, 7:00 PM description=com.apple.usb.externaldevice.14140000 owner=USB Receiver
   id=506  level=255 0x8=BT-HID mod=12/31/69, 7:00 PM description=com.apple.driver.IOBluetoothHIDDriver owner=BNBMouseDevice
Idle sleep preventers: IODisplayWrangler

Now I just need to figure out why it's doing this.

I suspect it's because the monitor is also used for audio now. Sleeping an external monitor display is apparently done by dropping the entire signal to the monitor, so display sleep also kills audio (I just confirmed this by pressing Ctl-Shift-Power while playing something on iTunes). Although changing the default output device to Internal Speakers doesn't change the displaysleep setting.

Best Answer

So I think the reason is that the new monitor supports audio, and putting the display to sleep would also kill audio output. Even if the monitor isn't selected as the default output device, coreaudiod prevents display sleep in case some application wants to use it.

I found a solution. I installed ScriptSaver, which will run an AppleScript when the screensaver starts. I have it run an AppleScript containing:

do shell script "pmset displaysleepnow"