Ubuntu – Kodi as upnp server –>no standby

info:
I have set up a pc with Ubuntu 16.04.1 (media-server).
I installed Kodi 16.1 which runs automatically in fullscreen after starting the pc.
I scraped all my movies and tvshows and enabled in upnp menu to share my library.

On my client I can add the upnp “library” and I can play the files.

problem:
Now I would like to standby the media-server after a specific amount of idle time. But the server does not get into standby if Kodi is open (on the server).
Then I disabled the standby in ubuntu and enabled it in Kodi itself. This works, but the server does not recognize that the client is streaming a file? So streaming gets aborted.

What can I do? Confused