Can't wake backend with OSMC

Hi all,

I’m a newbie in the process of setting up OSMC on a Pi3. The setup process is mostly going well. I generally like the look and feel of OSMC and it seems to run pretty well on the Pi. I’ve had a couple issues that I’ve been able to work through with the help of the good folks on this site.

I plan to use OSMC on the Pi as a PVR connected to the TV in my living room. I have NextPVR running on a backend Windows 10 desktop in another room, which I’ve connected to the Pi without trouble.

Before purchasing the Pi, I configured Kodi on a Windows 7 laptop and connected it via a docking station to my TV, with NextPVR running on the Windows 10 backend. That setup runs very well, but I want to reclaim my laptop for other uses. Enter the Pi.

I’ve configured Kodi on the laptop to send a wake-on-lan packet to the desktop on Kodi startup. I “exit” Kodi on the laptop if I’m not going to use it for awhile and have to re-start it when I want to use it again. That re-start wakes up the backend. (I have the backend set to go to sleep after an hour of inactivity.)

I’d like to be able to configure the Pi/OSMC to do the same thing or something similar, but I haven’t been able to figure out how to do it, or indeed if it can be done. I’ve spent a lot of time searching this site for answers, but so far I haven’t found anything helpful.

I’ve navigated to Settings > System > Power Savings and turned on “Try to wakeup remote servers on access”. If I leave the Pi/OSMC for more than an hour, the backend goes to sleep and no amount of “access” on the Pi wake the backend up. Moreover, if I choose to “exit” OSMC, it just restarts after a few seconds, and when I return over an hour later it’s already running and nothing I do will wake the backend. If I choose to “reboot” when I return to the Pi, it reboots into OSMC but the backend doesn’t wake up. Indeed I get the message that the PVR could not be loaded for an unknown reason. (The reason is the backend is sleeping.)

I think I’m probably doing something wrong or missing a setting somewhere. Can I configure the Pi/OSMC to achieve the kind of “wakeup” functionality I have on the laptop or something similar? I would appreciate any suggestions.

Thanks.

This is a Kodi function. Did you duplicate the respective WOL settings from the working system? Did you seek info from the Kodi wiki page pertaining to this function?
https://kodi.wiki/view/Wake_on_lan

If the answers are yes, you should probably provide logs and seek support in the Kodi forums.

I did duplicate the settings from the working system and I’ve spent time over on the Kodi wiki. I’ll head over to the Kodi forums to see if they can help.

Thanks.

Also, this could be useful?

Hello, and thanks for the link.

I did note that, according to the Kodi wiki, the Kodi wake on lan function does not wake PVR servers. I found that very interesting because it certainly is waking up the PVR server from my Windows 7 laptop!

I also noticed last night if I leave OSMC idle until the backend goes to sleep and then return to OSMC and select PVR/Live TV, I can see channel logos (cached from the previous viewing session, I guess), but if I select a channel to view, I don’t begin to see that channel (because the backend is asleep, I guess). Instead, nothing happens after I get a spinning logo for a few seconds.

If I select “Videos”, then OSMC/Kodi wakes up the backend (I have SMB shares on the backend). Also, NextPVR is running on the same computer that the videos are stored on. After the backend awakens, I can select Power > Exit, and when OSMC comes back up NextPVR loads and all is well.

If, after the backend goes to sleep and I just choose Power > Exit instead of first choosing “Videos”, then the backend doesn’t wake up, and I get a “Failed to load” message when OSMC starts up; i.e., NextPVR doesn’t load because the backend is sleeping.

I looked for a Kodi setting on the Windows 7 laptop that causes Kodi to awaken the backend that I haven’t set on OSMC, but I haven’t had any luck. So, Kodi on Windows 7 is doing exactly what I want, but I don’t know why!

I haven’t posted yet on the Kodi forum, but I plan to do that today. There are hundreds of posts over there about myriad aspects of “wake on lan”, but I haven’t found one that addresses my specific issue.

Thanks for your help.

Hi again,

I’ve posted a question over on the Kodi forums on this topic and haven’t gotten anything back. Meanwhile, I’ve done quite a bit of research into this topic and I’ve made some progress, but I still don’t have exactly what I want.

I’m really looking to understand how others here deal with backends that go to sleep. With that in mind, here is what I’m doing now.

I’ve enabled the “Advanced Wake on LAN” (AWOL) addon. I leave OSMC running full time on the Pi, so once my PVR loads up, it stays loaded up. If my backend goes to sleep, then when I try to watch a recorded show or live TV, nothing happens. That tells me to go run AWOL. If I do that, then re-try watching live TV or a recorded program, all is well.

My approach works, but it’s clunky. That’s OK with me, but it’s not going to work for my wife . If anyone has a better approach, I’d love to hear about it.

Thanks for any advice.

have you looked at the x-newa kodi addon for npvr that has a wol for the npvr server.

i found that letting the server sleep does not work well if you are running a pvr that is if you don’t sleep or power down the kodi clients when the server is down. kodi is always polling the server for new data like new recordings even if the server is a sleep, and if you run a mysql library it totally causes kodi to lock up eventually. after so many attempts of polling a sleeping server i think it end up disabling sql lite and this is a show stopper that kills the whole library and locks kodi up.

you end up with errors like this

Blockquote
23:56:35.139 T:6596 ERROR: CCurlFile::FillBuffer - Failed: Timeout was reached(28)
23:56:35.139 T:6596 ERROR: CCurlFile::Open failed with code 0 for http://192.168.0.23:8866/service?method=recording.lastupdated&sid=08eb40a8896f4a8ebcb583cee70a52c4
23:56:35.139 T:6596 ERROR: XFILE::CFileCache::Open - failed to open source http://192.168.0.23:8866/service?method=recording.lastupdated&sid=08eb40a8896f4a8ebcb583cee70a52c4
23:56:35.139 T:6596 NOTICE: AddOnLog: NextPVR PVR Client: Disabling recording update. Update NextPVR to v3.4

1 Like

I had a quick look awhile back but abandoned it because it looked complicated. x-newa also has an addon that eliminates commercials, too, I think. I’ll go back and look at it again.

I’m not running a mysql library, and I think that might be causing other problems I’m experiencing, but Kodi has never locked up on me as you’ve described. It looks like this is something else I need to check into.