automatic shutdown despite active client connection
#1
I'm using a HTPC running libreelec 8.2.1 with vdr backend. I'm watching TV via a raspberry3 with vnsi. Everything is working just fine. Now I tried to enable power saving and configured the server to shut down after 15 minutes of inactivity. The server will happily wake up for planned recordings and the client will wake up the server as well via WOL. But if the server is idle and I'm watching TV from the raspberry, the server still will shutdown after 15 minutes (it does not matter whether I'm watching live TV or some recording). There must be some mechanism for vdr to tell kodi to NOT shut down as recordings during absence are working just fine. But this mechanism seems to be missing for remote clients. Does anybody know how vdr is telling kodi that it is active and that the system should not be shut down automatically?
Reply
#2
(2017-12-21, 11:40)Schreibwaise Wrote: But if the server is idle and I'm watching TV from the raspberry, the server still will shutdown after 15 minutes (it does not matter whether I'm watching live TV or some recording). 
 Your setup is not clear to me. How can the server be idle when you are watching TV. How did you configure powersaving on the server? What software is running on the server?
Reply
#3
(2017-12-21, 13:27)FernetMenta Wrote:
(2017-12-21, 11:40)Schreibwaise Wrote: But if the server is idle and I'm watching TV from the raspberry, the server still will shutdown after 15 minutes (it does not matter whether I'm watching live TV or some recording). 
 Your setup is not clear to me. How can the server be idle when you are watching TV. How did you configure powersaving on the server? What software is running on the server? 
 Both server and client are running libreelec-8.2.1. On the server the vdr server addon is installed. Both client and server have the VDR PVR client installed. The server is configured to shutdown after 15 minutes of inactivity. If I'm watching live TV on the server itself, everything is fine. But if the server is idle (that means kodi just is sitting on the main menu and nobody is using it; vdr still running of course) and I'm watching live TV from the client via VNSI, kodi on the server will shutdown the system because it is not aware that some client still has an active connection.
Reply
#4
You did not answer how you did configure powersaving. This might be an libreelec issue. vnsiserver inhibits VDR from shutting down if there are connected vnsi clients. I don't know if libreelc bypasses VDR's shutdown mechanism. Seems it does.
Reply
#5
(2017-12-21, 17:03)FernetMenta Wrote: You did not answer how you did configure powersaving. This might be an libreelec issue. vnsiserver inhibits VDR from shutting down if there are connected vnsi clients. I don't know if libreelc bypasses VDR's shutdown mechanism. Seems it does.
 I configured power saving only in kodi by going to settings->system->power saving and then setting "shutdown function timer" to 15 minutes. It does not matter if "shutdown function" is set to "shutdown" or "suspend". No power saving is configured on the OS level.
Reply
#6
(2017-12-21, 17:03)FernetMenta Wrote: vnsiserver inhibits VDR from shutting down if there are connected vnsi clients.
  This puzzles me. And maybe this is the source of the problem. It's not VDR who is shutting down the system, but kodi. It seems VDR has some means of telling kodi that it is busy else all my recordings should be truncated at 15 minutes. The vnsiserver plugin also should tell kodi that it is busy streaming to some (remote) client to prevent kodi from shutting down.
Reply
#7
I can confirm I experienced the same with kodi shutting down or going to sleep after the set idle period regardless if a remote client was still watching live tv or not. I am running kodi 17.6 and vdr 2.3.8 on the same machine with ubuntu 16.04 LTS. My client is a raspberry pi with libreelec 8.2.1 installed.

I wrote myself a little addon that can be configured to monitor certain ports (e.g. for vnsi)  and will eventually reset the idle timer if any activity is seen. You might like to try out if this helps: service.shutdown.watchdog

It's easy to install (install as zip from the repo) and has been running stable on my system for month. Yet, I haven't tested it on anything else but Ubuntu. Drop me a PM if you need further guidance.
Reply
#8
(2017-12-22, 16:56)Spirou Wrote: I wrote myself a little addon that can be configured to monitor certain ports (e.g. for vnsi)  and will eventually reset the idle timer if any activity is seen. You might like to try out if this helps: service.shutdown.watchdog
Thanks a lot. Will give it a try. Will have to wait until the new year however as I will be travelling for the next days.

But this is merely a workaround and I think it should get fixed properly. Most work will be to find the right spot. After all, vdr is able to prevent kodi from shutting down, so the vnsi server plugin should be able to do so as well.

Have a nice christmas!
Reply
#9
(2017-12-21, 17:38)Schreibwaise Wrote:
(2017-12-21, 17:03)FernetMenta Wrote: vnsiserver inhibits VDR from shutting down if there are connected vnsi clients.
  This puzzles me. And maybe this is the source of the problem. It's not VDR who is shutting down the system, but kodi. It seems VDR has some means of telling kodi that it is busy else all my recordings should be truncated at 15 minutes. The vnsiserver plugin also should tell kodi that it is busy streaming to some (remote) client to prevent kodi from shutting down. 
1) The pvr API has no means for backends to signal what they they are doing
2) In you screnario Kodi (client) also needs to know if the backend runs on the same or a different machine. Otherwise a remote client won't go to sleep if the server is busy.
Reply

Logout Mark Read Team Forum Stats Members Help
automatic shutdown despite active client connection0