Automatic WOL - Confused

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
archie456 Offline
Senior Member
Posts: 108
Joined: Jun 2012
Reputation: 0
Post: #1
Hi,

I'm running OpenELEC, Gotham on a Raspberry Pi, and am slightly confused as how Automatic Wake on Lan work.

I watch TV programs from a another computer on my network which is set to sleep whenever possible.

Auto WOL seems the answer to my issues about waking it.

When I turn on the PI, and open up the videos Auto WOL jumps in a wakes the remote computer and I can watch my files - everything works fine.

But, I don't turn off my PI and if the remote computer then sleeps (sometime later) XBMC doesnt pick this up and doesn't issue an automatic WOL command and I get an error when I try to play a video.

I was expecting it to issue a WOL command everytime I select videos, but that doesn't seem to happen.

Am I missing something?

Cheers.
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 21,138
Joined: Jan 2011
Reputation: 276
Location: Arizona, USA
Post: #2
From what I understand, it should send another WOL command. Can you get us a debug log of when this happens?

You can make easy links to the XBMC wiki using double brackets around common XBMC words: [[debug log]] = debug log, [[Video library]] = Video library, [[SMB]] = SMB , [[userdata]] = userdata, etc
find quote
t4_ravenbird Offline
Senior Member
Posts: 179
Joined: Mar 2012
Reputation: 5
Post: #3
It should send another WOL command, yes, but only if enough time has passed.

This time is specified in the parameter 'timeout' as described here ; http://wiki.xbmc.org/index.php?title=Wake_on_lan
That parameter should be less or equal to the idle-timeout used by the server to go to sleep
find quote
archie456 Offline
Senior Member
Posts: 108
Joined: Jun 2012
Reputation: 0
Post: #4
Ned,

Annoyingly whilst I could repeat the issue twice, I couldn't do it when the file logging was enabled, though something slightly different happened:

When logging was not enabled:

- I XBMC was running, I clicked on a video folder in favorites from the menu, XBMC loaded thumbnails for the videos and, I selected one and the video played.
- I then put the remote PC (where the videos were stored) to sleep.
- in XBMC I clicked on video folder (from favorites), XBMC hanged for about 30 seconds to a minute and then displayed an error something along the lines of 'invalid arguement'.

When logging was running log file: http://pastebin.com/EpdzUfXJ

- After rebooting, I slept the remote PC with the videos.
- When I clicked on videos from favorites, a message was displayed about waking the PC along with a percentage value. The remote PC woke, XBMC displayed the video thumbnails and I could play a video.

- I then slept the remote PC again.
- In XBMC I clicked on videos, the remote PC did not wake, but XBMC displayed thumbnails, when I clicked on a video, the PC woke and played the video - there was no message about waking the remote PC.

I tried a few more times, each time the PC sometimes woke when thumbnails were displayed other times not, one time the PC did not wake at all and nothing happened in when I clicked on the video.



I think that captured what happened.

Cheers.
find quote
t4_ravenbird Offline
Senior Member
Posts: 179
Joined: Mar 2012
Reputation: 5
Post: #5
(2014-05-20 21:34)archie456 Wrote:  - I then put the remote PC (where the videos were stored) to sleep.

You may not do that ; it will screw up the timeout. Let the server be alone until it sleeps by itself and make sure that "wake-on-access-timeout-parameter" <= "server-idle-timeout-before-suspend"
find quote
archie456 Offline
Senior Member
Posts: 108
Joined: Jun 2012
Reputation: 0
Post: #6
(2014-05-20 22:07)t4_ravenbird Wrote:  
(2014-05-20 21:34)archie456 Wrote:  - I then put the remote PC (where the videos were stored) to sleep.

You may not do that ; it will screw up the timeout. Let the server be alone until it sleeps by itself and make sure that "wake-on-access-timeout-parameter" <= "server-idle-timeout-before-suspend"

The PC is set to power save and so will sleep whenever idle - won't that screw up the timeout too?
find quote
t4_ravenbird Offline
Senior Member
Posts: 179
Joined: Mar 2012
Reputation: 5
Post: #7
No.
The parameter is telling XBMC that after the server has been woken it will stay on until timeout has passed, so no further wakeup is required until then.
When you force-sleep the server prematurely you break that prerequisite.

It seems that you expect wakeup check to be done always - and that would have been the safest, probably - but there is a problem with it too ; Wakeup-logic is done immediately before every file-open and every database-transaction so starting to ping server on every access would cause heavy network traffic and cpu load ; a very intrusive solution.
Therefore a threshold is needed that defines how long time must pass until a new check (and wakeup) is done. This could have been a predefined, low timeout value, maybe - but in the end it was made as a parameter.
find quote
archie456 Offline
Senior Member
Posts: 108
Joined: Jun 2012
Reputation: 0
Post: #8
t4_ravenbird - excellent, thanks for the explanation, that make sense now.

I'll check out the parameter, but I think I'm happy with how it currently is now that I understand how it works.

Cheers.
find quote