Forum › Forums › Official Releases › antiX-21/22 “Grup Yorum” › WOL = Wake on Lan
Tagged: wol wake on lan
- This topic has 6 replies, 2 voices, and was last updated Oct 21-12:16 pm by sybok.
-
AuthorPosts
-
May 26, 2022 at 10:27 am #83668Member
sybok
Hi,
I intend to enable WOL on my Linux-powered desktop workstation at work.
I found a very useful Arch wiki-page dedicated to this topic.The PC dual boots with Fedora and Fedora “owns” the grub.
There is a single ethernet interface ‘eth0’ (named ‘enp3s0’ in Fedora).
The ‘udev’ method works in Fedora (tested: reboot from Fedora and reboot from antiX).
ACTION=="add", SUBSYSTEM=="net", NAME=="enp*", RUN+="/usr/bin/ethtool -s $name wol g"
I made two necessary changes:
1) ‘/usr/bin/ethtool’ -> ‘/usr/sbin/ethtool’ (needed in the case of both systems).
2) NAME==”enp*” -> NAME==”eth*”For some reason, the antiX version failed to work.
I may try the alternate ‘cron’ approach (where adding user ‘root’ after the specifier ‘@reboot’ may be needed based on some internet search) instead but I am curious where the problem is.
The only thing that I can think of is improper value of ‘SUBSYSTEM’.
The HW part of output of ‘inxi -Fxz’ is the same as in the following link:
https://www.antixforum.com/forums/topic/random-freezes-with-ryzen/- This topic was modified 11 months, 1 week ago by sybok. Reason: add (link to) inxi
September 14, 2022 at 7:52 am #88875MemberMalcolm Reynolds
::I have a NAS built on an HP DC7700 SFF desktop m/c running Antix 19.4 64 bit (fully apt upgraded at 12 sept 22). I want to wake it up by sending magic packets from various workstations on the same LAN subnet. My logbook says:
1/ research internet
2/ DC7700 bios: set “wake on lan = enable” done, power-down, power-up
3/ ethtool eth0: gives “wake-on=d” disabled as expected
4/ ethtool -s eth0 wol g && ethtool eth0: gives “wake-on = g” as expected
5/ reboot: wake-on back to “d” as expected, so need action to set “g” at each boot-up, so g is “persistent”
(presumably, wol must be “g” when NAS goes down, in order for it to come up on receipt of a magic packet)
6/ set 3 redundant methods in parallel:-
(a) set a udev rule similar to post #83668 with action: “ethtool -s eth0 wol g && ethtool eth0 > /home/malcolm/udevDone.txt”
(b) edit: /etc/network/if-up.d/ethtool to append an additional action: “ethtool -s eth0 wol g && ethtool eth0 > /home/malcolm/upDone.txt”
(c) create a cron ‘root’ job by creating /etc/cron.d/eth0_wol containing: “@reboot root ethtool -s eth0 wol g && ethtool eth0 > /home/malcolm/cronDone.txt”
7/ reboot. login as malcolm: only upDone.txt and cronDone.txt exist, both give “wake-on=g” as expected
8/ BUT now run: sudo ethtool eth0 to confirm persistence and find that “wake-on=d” NOT expected. something happening between cron and the user session has reset wake-on back to dwhere did I go wrong ?
MalcolmSeptember 14, 2022 at 8:22 am #88876Member
sybok
::Hi, I somehow let WOL be unresolved for now.
I appreciate your idea with redirecting to ‘/home/<username>/<method>Done.txt’ in the case of successful execution.
Non-existence of the file in method 6(a) shows that the additional udev rule fails or it is skipped in antiX.
A small improvement of the redirecting would be:
<command> && ethtool <interface> > <path-to-home>/<method>RunDone.txt || ethtool <interface> > <path-to-home>/<method>RunFail.txt
This can provide more information on 6(a).
Perhaps adding appropriately formatted date to the filename (or explicitly checking when the auxiliary output file was modified) would help as well.Where did your approach go wrong? I have no idea.
Perhaps, exploring the logs in ‘/var/log/’ (probably ‘dmesg’ and ‘kern.log’) may help.I recall (from my earlier interweb search) that some form of shutdown caused/used-to-cause a reset of ‘wake-on’ indicating that it can get more messy/technical that one would expect.
September 26, 2022 at 8:43 am #89808MemberMalcolm Reynolds
::Solved:
Searching the MX forum I found the solution:
In: /etc/default/tlp
Set: WOL_DISABLE=NThe default is WOL_DISABLE=Y causing Wake-on to be reset to d no matter that you have a cron job or udev rule to set it to g at reboot.
I also needed to disable POST messages in the bios of the DC7700 for a clean wake up.
And now it works !
September 26, 2022 at 11:07 am #89810Member
sybok
::Hi, great you solved it.
Sadly, my installation (on a desktop, not a laptop) does not have ‘/etc/default/tlp’.
Could you please post link to the threads you mentioned? I searched the MX Linux forum (did not thought of it before!) and found too many of them.October 18, 2022 at 10:15 am #90896MemberMalcolm Reynolds
::apologies for the delay, been busy with carpentry.
Link: https://forum.mxlinux.org/viewtopic.php?t=70496&hilit=wake+on+lan
I got there by searching for: wake on lan
Look for a post dated monday June 06 2022 8:35am by ‘operadude’
He notes: “BTW, on Patito Feo (19.4), there is no /etc/tlp.conf file, which on some of the postings in this [MX] forum says that the .conf file is the main file to change.”
I am using the later Antix 21
Malcolm
October 21, 2022 at 12:16 pm #91156Member
sybok
::Thanks for the link.
They explain that ‘/etc/tlp.conf’ and folder ‘/etc/tlp.d/’ are present in MX/antiX 21 while MX/antiX 19 had ‘/etc/default/tlp’ instead. -
AuthorPosts
- You must be logged in to reply to this topic.