Screen sharing - Remote screen off turns main display off I run El Capitan + Server on a mac mini that is plugged on a TV via HDMI and to which I access via Screen Sharing.

Recently (since the El Capitan upgrade?), when the remote computer goes to sleep or quits Screen Sharing, the main screen also shuts off (which is of course undesired).

Anyone has an idea where that may come from and/or how to correct it?

EDIT

Apparently this is an El Capitan bug; I have filed a bug report; anyone who encounters it is welcome to do the same. Here is a protocol to reproduce the bug: 


Log into Headless Mac Mini from remote Mac via Screen Sharing (while no user is logged in),
Start some video player on Mac Mini (plays on TV/physical screen) and close the Screen Sharing app on remote - the Mini doesn’t go to sleep, as expected,
Connect back, stop video player, let Mac Mini go to sleep,
Connect back again, start video player again, close Screen Sharing from remote again >> now Mini goes to sleep immediately and TV goes black.
I believe that the answer to this is to use Remote Management instead of Screen Sharing.

Remote Management includes Screen Sharing, but when you disconnect it does not seem to turn off the screen, at least as of 10.11.3.

See also: How to stop display from turning off when I disconnect a Screen Sharing client.