I finished used VS and I closed the tab in chrome were VS was standing. I expected my Mac to sleep to after a while (15 min according to my Energy Save settings) but even after 1 hour the screen was still ON.
Running the command "pmset -g" clearly indicates that Chrome is preventing my Mac form sleeping:
AC Power 2*
Currently in use:
standbydelay 10800
standby 1
womp 1
halfdim 1
hibernatefile /var/vm/sleepimage
darkwakes 1
networkoversleep 0
disksleep 10
sleep 1
autopoweroffdelay 14400
hibernatemode 3
autopoweroff 1
ttyskeepawake 1
displaysleep 10 (display sleep prevented by Google Chrome)
acwake 0
lidwake 1
As a workaround, going to the Chrome Task Manager and end the process "Background page: Videostream for Google Chromecast" releases the "lock" and then the Mac can sleep.
I think you guys should release the "Keep Awake" lock when a video is not playing to prevent that.