WakeOnLan on Windows

Installation and configuration.
johnnyta
Posts: 1
Joined: Sat Mar 09, 2019 4:08 am

WakeOnLan on Windows

Post by johnnyta »

Hi there,

I setup CGRU running on Windows and now I am trying to use WoL.

As far as I know, we just have to edit the value of "wol_idlesleep_time" in farm.json. Is that correct?

I tried to set wol_idlesleep_time = 3600. And when there is no task, all the idle machines were put to sleep, that's nice. But when I created a new render job, although Afanasy server sent magic packet to machines, and on Afanasy Watch, the states were "Waking up...". No machine was going to be logon again.

I used a Windows app named "Wake On Lan Magic Packet" and it managed to wake these machines up.

The question is: what did I do wrong? What else I need to config?

Thanks in advance!
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: WakeOnLan on Windows

Post by timurhai »

Hi.

May be you should enable this feature is some other place(s).
For example:
https://www.groovypost.com/howto/enable ... indows-10/

btw
wolwake is a simple cmd:
https://github.com/CGRU/cgru/blob/maste ... olwake.cmd

that runs simple python:
https://github.com/CGRU/cgru/blob/maste ... wolwake.py

To debug it, you can test it w/o Afanasy. Just by hand.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
virtualrepublic
Posts: 14
Joined: Thu Mar 03, 2022 3:23 pm

Re: WakeOnLan on Windows

Post by virtualrepublic »

A happy new year!

We are also stuck with WOL. We can set the CGRU clients into sleep mode but we can't wake them up. Using different WOL tools work. How can we debug the issue without knowledge of Python? The LOG files don't help here.

Thanks,
Michael
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: WakeOnLan on Windows

Post by timurhai »

Hi!

WOL is documented here:
https://cgru.readthedocs.io/en/latest/a ... ake-on-lan

This Python script is used to wake up machines:
https://github.com/CGRU/cgru/blob/maste ... wolwake.py

So you can debug waking by launching this command by hands.

If this command does not work, you should check network adapter settings, it should be able to wake the machine up.

If this command works fine, but Afanasy can't wake up machines - you should check system job "wake-on-lan" block.
Can it execute its service on farm? If can, may be its tasks finished with some error.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
virtualrepublic
Posts: 14
Joined: Thu Mar 03, 2022 3:23 pm

Re: WakeOnLan on Windows

Post by virtualrepublic »

Hi,

thanks for the info.

Does CGRU send Magic Packets?

Image
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: WakeOnLan on Windows

Post by timurhai »

Yes.
It is a way afrender wakes other afrender.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
virtualrepublic
Posts: 14
Joined: Thu Mar 03, 2022 3:23 pm

Re: WakeOnLan on Windows

Post by virtualrepublic »

We solved it. CGRU seems not to support "magic packets" (Win10/11). Turning this off in the adapter will let CGRU wake up our PCs now.
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: WakeOnLan on Windows

Post by timurhai »

So you have just unckecked the last item on the image above and WOL by Afanasy begins to work?
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
virtualrepublic
Posts: 14
Joined: Thu Mar 03, 2022 3:23 pm

Re: WakeOnLan on Windows

Post by virtualrepublic »

Yes. But now we have another issue. When I set all 22 PCs to sleep one failed to sleep (get stuck). And when I try to wake up not everyone will wake up. Even when I connect with AnyDesk CGRU shows still "offline". It looks like the Afrender task needs to be restarted.
User avatar
timurhai
Site Admin
Posts: 910
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: WakeOnLan on Windows

Post by timurhai »

CGRU has nothing special with wake and sleep.
It just executes this commands (cmd scripts) for this:
wolsleep.cmd and wolwake.cmd that are located here:
https://github.com/CGRU/cgru/tree/master/bin
You can test (debug, tune settings) this commands w/o CGRU (Afanasy).
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply