Wake On Lan (WOL) -- Help!  [Solved]

Message
Author
User avatar
towwire
Posts: 681
Joined: Fri Oct 15, 2010 12:15 pm

Re: Wake On Lan (WOL) -- Help!

#21 Post by towwire »

One last tip. I have not really looked at it as what I gave you for the cron job I have done it before. You might want to check out the 'Job Scheduler' on MX21 to do any cron job as user or root.
It is easier to fight for one's principles then to live up to them.

User avatar
operadude
Posts: 842
Joined: Tue Nov 05, 2019 12:08 am

Re: Wake On Lan (WOL) -- Help!

#22 Post by operadude »

Got it! I found it in MX-Tools.
Thanks Again!

User avatar
operadude
Posts: 842
Joined: Tue Nov 05, 2019 12:08 am

Re: Wake On Lan (WOL) -- Help!

#23 Post by operadude »

@towwire : Just a couple points of clarification:
When you say "interface" in the following post (see #s 2, 3, 4, 8, & 10 (for crontab)):
towwire wrote: Tue Jun 21, 2022 10:36 pm Suggestion for you if you had not made any changes to any files. This is what I would have done, since I know it works MX21.

1. Edit TLP WOL_DISABLE=N
2. sudo ethtool interface | grep Wake-on
to see if Wake-on: d
3. sudo ethtool -s interface wol g
4. sudo ethtool interface | grep Wake-on
should show Wake-on: g
5. Now suspend or hibernate the machine then
6. run your magic packet from other machine to see if it wakes up.
7. if not try this one 'sudo etherwake <mac address here>'
8. If it woke up now you need to make command 'ethtool -s interface wol g' last beyond the next reboot
9. You can work you way thru all the setting to find what works or
10. for me the way to go was to create a cron that ran on (re)boot. This is what you need to do, edit a crontab for the root user that contains the following line:
@reboot /usr/bin/ethtool -s interface wol g
It took me a bit, but figured-out that "interface" here is a "variable", and should be whatever my actual interface is; in my case, it's "eth0". So, I went ahead and substituted "eth0" for "interface". I figured-out that all of the commands (except for "etherwake", as you make clear) are done on the remote machine, i.e., the machine I'm want to wake.

So, this morning I tried to wake-up the remote computer from the Off state (plugged in to power and ethernet; just off). The "etherwake" command with the correct mac address did not wake up the machine, so I continued your instructions about editing the "crontab" file as per your instructions. I will try again, and hopefully that will work!

Just out of curiosity, is there a known problem with the "wakeonlan" program?
It doesn't seem to work; only "etherwake" works for me.
So glad you knew about this!
:cool:

User avatar
towwire
Posts: 681
Joined: Fri Oct 15, 2010 12:15 pm

Re: Wake On Lan (WOL) -- Help!

#24 Post by towwire »

You are correct, I screw up when I did not tell you to replace 'interface' with the name of your connection. I should and done it like this <interface> so would know to replace it with the correct one.

I have never used or installed the "wakeonlan" program so don't know if there is a problem with it or the commands it uses.

You might find it easier to use the 'Job Scheduler' to do the cron job. Start it then in the file menu restart it as root. Tell it a new item and you should be able to just copy the command into it.

Code: Select all

@reboot /usr/bin/ethtool -s eth0 wol g
It is easier to fight for one's principles then to live up to them.

User avatar
operadude
Posts: 842
Joined: Tue Nov 05, 2019 12:08 am

Re: Wake On Lan (WOL) -- Help!

#25 Post by operadude »

:number1: @towwire :

Very Good!

Stupid Question:

The Cron Job for the Job Scheduler should be done on the Remote Machine (the one I want to wake-up), right?

User avatar
towwire
Posts: 681
Joined: Fri Oct 15, 2010 12:15 pm

Re: Wake On Lan (WOL) -- Help!

#26 Post by towwire »

operadude wrote: Mon Jun 27, 2022 1:14 pm :number1: @towwire :

Very Good!

Stupid Question:

The Cron Job for the Job Scheduler should be done on the Remote Machine (the one I want to wake-up), right?
Correct.
It is easier to fight for one's principles then to live up to them.

User avatar
operadude
Posts: 842
Joined: Tue Nov 05, 2019 12:08 am

Re: Wake On Lan (WOL) -- Help!

#27 Post by operadude »

:celebrate:

User avatar
operadude
Posts: 842
Joined: Tue Nov 05, 2019 12:08 am

Re: Wake On Lan (WOL) -- Help!

#28 Post by operadude »

@towwire :
Added a new cron-job on the remote machine, as per your instructions.
2022-06-28_Cron_Job.png
Still having trouble waking the remote machine from a "cold boot", i.e. the machine was powered-down the night before, and unplugged from the electricity. In the morning, after plugging-in the machine, I cannot wake it from the local machine. The "etherwake" command executes, but the remote machine stays off.

Perhaps the problem is that I have unplugged it from the home electricity?
I unplug all of my devices before going to bed.

Seems like it might be a catch-22: the cron-job is set for "@reboot", but, for the command:

Code: Select all

@reboot /usr/bin/ethtool -s eth0 wol g
to work, wouldn't it have to be rebooted (somehow) first?

The "etherwake" command works fine if I have initially started the remote machine manually (by hand)-- then, I can put it to sleep, wake it from sleep, reboot, shut it down (halt), restart it after shutdown, etc. However, I must have that first or initial manual start-up (by hand).

My question is: How can I turn-on the Remote Machine for that initial/first Startup not by hand, but by using "etherwake"?

Again, the initial Startup/Power-On being in a state where that remote machine had been un-plugged the night before, but now, in the morning, manually plugged back into the home electricity.

In this situation, "etherwake" does NOT power-on the remote machine.

:confused:
You do not have the required permissions to view the files attached to this post.

User avatar
towwire
Posts: 681
Joined: Fri Oct 15, 2010 12:15 pm

Re: Wake On Lan (WOL) -- Help!

#29 Post by towwire »

Why do you unplugged it from your home electricity? Why not just use a good surge protector and leave it connected? You did answer your own question when you stated.
Perhaps the problem is that I have unplugged it from the home electricity?
If you go back and read post #9 where your motherboard states that.

Power On By PCIE Devices [Enabled] or Power On By PCI Devices [Enabled] requires an ATX power supply that provides at least 1A on the +5VSB lead.
That means that when you unplugged the power to the ATX power supply you disabled everything until you boot into your OS.

So what is a 'cold boot'? Normally cold boot is the process of powering on a computer from a powered-off state or a shut it down (halt).
So if you disconnect it you will need to power it up and boot the OS. Then if not needed shut it down (halt) so you can restart it remotely when needed.
It is easier to fight for one's principles then to live up to them.

User avatar
operadude
Posts: 842
Joined: Tue Nov 05, 2019 12:08 am

Re: Wake On Lan (WOL) -- Help!

#30 Post by operadude »

Again, @towwire : :number1:

Yeah,
towwire wrote: Tue Jun 28, 2022 12:38 pm
Power On By PCIE Devices [Enabled] or Power On By PCI Devices [Enabled] requires an ATX power supply that provides at least 1A on the +5VSB lead.
That means that when you unplugged the power to the ATX power supply you disabled everything until you boot into your OS.
that makes a lot of sense!

Yeah, if I'm away from home, then I would NOT un-plug the computer!

It's not really a problem for me to plug the computer in the morning, and start with an initial power-on-by-hand. I just wanted to know, in theory, if the computer could be woken-up using such a procedure (unplugging, plugging back in, then trying to wake).

Your clarification
Power On By PCIE Devices [Enabled] or Power On By PCI Devices [Enabled] requires an ATX power supply that provides at least 1A on the +5VSB lead.
That means that when you unplugged the power to the ATX power supply you disabled everything until you boot into your OS.
makes perfect sense!

Once again, :yourock:

Post Reply

Return to “Hardware /Configuration”