1

I use my iMac almost every day as a 27" external display with my MacBook Pro.

  • While connected, the iMac won't go to sleep, which is exactly what it is expected.
  • But, after disconnecting, the iMac should go to sleep. Somehow, it is prevented (in order to always be ready to connect, again?). The problem: If you do not set it to "sleep" manually, it will stay on forever! This is really annoying to find your iMac running all night...

pmset -g | grep sleep tells you this:

 hibernatefile        /var/vm/sleepimage
 networkoversleep     0
 disksleep            10
 sleep                10 (sleep prevented by sharingd, dpd, useractivityd)
 displaysleep         10 (display sleep prevented by dpd)

Obviously, sleep and display sleep are prevented by dpd (Display Port Daemon), see also an unanswered question in Apple Communities: DisplayPort daemon (dpd) blocks sleep even when not in use.

1
  • TDM was deprecated 7 years ago. It is full of bugs that will never be fixed. Rather than trying to fix a broken technology into which Apple gives no internal visibility via source code, I would encourage you to consider adopting a more modern and supported workflow instead.
    – pion
    Commented Jan 2, 2022 at 1:20

1 Answer 1

1

sudo killall dpd works quite well! It seems like it is not working, because ps -ax still lists dpd as a running process. But, when calling pmset, the not on "prevented by dpd" is missing:

pmset -g | grep sleep

hibernatefile        /var/vm/sleepimage
networkoversleep     0
disksleep            10
sleep                10 (sleep prevented by sharingd, backupd)
displaysleep         10

dpd seems to be restarted right after killing it, which does make sense to always allow Target Display Mode to be used. But it looks confusing at first.

You must log in to answer this question.

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