Page 1 of 1

Wake On Lan (WOL) -- Help!

Posted: Mon Jun 06, 2022 8:35 am
by operadude
I have recently dipped my toes into SSH...'And Loving It!'
I have successfully setup SSH client and server, and am able to login to another computer on my LAN. I am currently able to put the remote machine into "suspend", and to perform "shutdown." However, I am unable to wake the machine with Wake On Lan (WOL).

I need help in making WOL work on my remote machine.

Here are the stats from the Client machine, the one that I am using to log into the Remote (Host) machine:

Code: Select all

System:    Kernel: 5.10.0-14-amd64 x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/vmlinuz-5.10.0-14-amd64 
           root=UUID=<filter> ro quiet splash 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel, plank wm: xfwm 4.16.1 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.1_x64 Wildflower October 20  2021 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Desktop System: Gigabyte product: H270-HD3 v: N/A serial: <filter> 
           Mobo: Gigabyte model: H270-HD3-CF v: x.x serial: <filter> UEFI: American Megatrends 
           v: F5 date: 04/24/2017 
Battery:   Device-1: hidpp_battery_0 model: Logitech Wireless Mouse PID:0080 serial: N/A 
           charge: 55% (should be ignored) rechargeable: yes status: Discharging 
CPU:       Info: Dual Core model: Intel Core i3-7100 bits: 64 type: MT MCP arch: Kaby Lake 
           family: 6 model-id: 9E (158) stepping: 9 microcode: EC cache: L2: 3 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 31199 
           Speed: 800 MHz min/max: 800/3900 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable 
           Type: mds mitigation: Clear CPU buffers; SMT vulnerable 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: conditional, RSB filling 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: AMD Oland PRO [Radeon R7 240/340] vendor: Micro-Star MSI driver: radeon 
           v: kernel alternate: amdgpu bus-ID: 01:00.0 chip-ID: 1002:6613 class-ID: 0300 
           Device-2: HD WEBCAM NexiGo N660 FHD Webcam type: USB driver: snd-usb-audio,uvcvideo 
           bus-ID: 1-10:6 chip-ID: 1d6c:1278 class-ID: 0102 serial: <filter> 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.16.1 driver: loaded: radeon 
           display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
           s-diag: 582mm (22.9") 
           Monitor-1: HDMI-0 res: 1920x1080 hz: 60 dpi: 305 size: 160x90mm (6.3x3.5") 
           diag: 184mm (7.2") 
           OpenGL: renderer: AMD OLAND (DRM 2.50.0 5.10.0-14-amd64 LLVM 11.0.1) 
           v: 4.5 Mesa 20.3.5 direct render: Yes 
Audio:     Device-1: Intel 200 Series PCH HD Audio vendor: Gigabyte driver: snd_hda_intel 
           v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a2f0 class-ID: 0403 
           Device-2: AMD Oland/Hainan/Cape Verde/Pitcairn HDMI Audio [Radeon HD 7000 Series] 
           vendor: Micro-Star MSI driver: snd_hda_intel v: kernel bus-ID: 01:00.1 
           chip-ID: 1002:aab0 class-ID: 0403 
           Device-3: HD WEBCAM NexiGo N660 FHD Webcam type: USB driver: snd-usb-audio,uvcvideo 
           bus-ID: 1-10:6 chip-ID: 1d6c:1278 class-ID: 0102 serial: <filter> 
           Sound Server-1: ALSA v: k5.10.0-14-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel Ethernet I219-V vendor: Gigabyte driver: e1000e v: kernel port: f000 
           bus-ID: 00:1f.6 chip-ID: 8086:15b8 class-ID: 0200 
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter> 
           IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:    Local Storage: total: 7.74 TiB used: 2.72 TiB (35.2%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 970 EVO 250GB 
           size: 232.89 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 
           type: SSD serial: <filter> rev: 1B2QEXE7 temp: 32.9 C scheme: GPT 
           ID-2: /dev/sda maj-min: 8:0 model: SATA SSD size: 111.79 GiB block-size: 
           physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 61.3 
           scheme: GPT 
           ID-3: /dev/sdb maj-min: 8:16 vendor: Kingston model: SA400S37120G size: 111.79 GiB 
           block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> 
           rev: 61K1 scheme: MBR 
           ID-4: /dev/sdc maj-min: 8:32 vendor: Seagate model: ST3000DM001-1ER166 size: 2.73 TiB 
           block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 
           serial: <filter> rev: CC25 scheme: GPT 
           ID-5: /dev/sdd maj-min: 8:48 vendor: Toshiba model: DT01ACA050 size: 465.76 GiB 
           block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 7200 
           serial: <filter> rev: A750 scheme: GPT 
           ID-6: /dev/sde maj-min: 8:64 vendor: Western Digital model: WD5000AADS-00S9B0 
           size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s type: N/A 
           serial: <filter> rev: 0A01 scheme: GPT 
           ID-7: /dev/sdf maj-min: 8:80 type: USB vendor: Seagate model: Expansion Desk 
           size: 3.64 TiB block-size: physical: 4096 B logical: 4096 B type: N/A 
           serial: <filter> rev: 0739 scheme: MBR 
           ID-8: /dev/sdl maj-min: 8:176 type: USB model: Storage Device size: 3.69 GiB 
           block-size: physical: 512 B logical: 512 B type: N/A serial: N/A rev: 1.00 
           scheme: MBR 
           SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
           ID-9: /dev/sdm maj-min: 8:192 type: USB model: Storage Device size: 7.4 GiB 
           block-size: physical: 512 B logical: 512 B type: N/A serial: N/A rev: 1.00 
           scheme: MBR 
           SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
           ID-10: /dev/sdn maj-min: 8:208 type: USB model: Mass Storage Device size: 7.42 GiB 
           block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1.00 
           scheme: MBR 
           SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
Partition: ID-1: / raw-size: 20.49 GiB size: 20 GiB (97.61%) used: 11.85 GiB (59.2%) fs: ext4 
           dev: /dev/dm-0 maj-min: 253:0 mapped: root.fsm 
           ID-2: /boot raw-size: 512 MiB size: 487.2 MiB (95.16%) used: 103.2 MiB (21.2%) 
           fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2 
           ID-3: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%) used: 1.3 MiB (0.5%) 
           fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 
           ID-4: /home raw-size: 40.02 GiB size: 39.1 GiB (97.69%) used: 8.07 GiB (20.6%) 
           fs: ext4 dev: /dev/dm-1 maj-min: 253:1 mapped: 2.home.fsm 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 21.77 GiB used: 0 KiB (0.0%) priority: -2 
           dev: /dev/dm-3 maj-min: 253:3 mapped: swap 
Sensors:   System Temperatures: cpu: 29.8 C mobo: 27.8 C gpu: radeon temp: 42.0 C 
           Fan Speeds (RPM): N/A 
Repos:     Packages: note: see --pkg apt: 2946 lib: 1439 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://ftp.linux.org.tr/mx/repo/mx/repo/ bullseye main non-free
           Active apt repos in: /etc/apt/sources.list.d/skype-stable.list 
           1: deb [arch=amd64] https://repo.skype.com/deb stable main
Info:      Processes: 301 Uptime: 2h 42m wakeups: 3 Memory: 15.59 GiB used: 2.95 GiB (18.9%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Shell: Bash v: 5.1.4 running-in: quick-system-info-mx 
           inxi: 3.3.06 
Boot Mode: UEFI
I realize that it will probably be more useful to get the Remote/Host machine info, and I can add that in a further post.

The Remote/Host machine (where I am root) is on my local network, and hardwired (Ethernet) into the one router for all of my machines. Remote/Host machine is running MX-19.4 x64, Xfce (yes, overdue for an upgrade):

Here is a summary of what I have done so far:

1. Reviewed the entries on "Wake on LAN" on this forum
2. Enabled WOL in Remote/Host BIOS (with "enable external modems")
3. Added Static IP Address for Remote/Host on Router Address Table
4. "Advanced Networking Tool" on Remote/Host set to a static IP address (IPv4 Settings set to "Manual", with correct "Address", "Netmask," and "Gateway")
5. Remote/Host /etc/default/tlp changed to "WOL_DISABLE = N"
Also on Remote/Host:
6. Changed /etc/network/interfaces to include under "Primary Network Interface"--> "auto eth0"; "iface eth0 inet dhcp", with sub-entry "ethernet_wol g".
7. Tried a lengthier version of the above (which did not work), changing to "iface eth0 inet static", and adding "address", "netmask" and "gateway" values.
8. Installed on both Client, and Remote/Host: ethtool & wakeonlan programs
9. On Remote/Host machine, edited "Network Connections": Wake on LAN -- checking box labeled "magic" (presumably, for "magic packet"), .
10. Finally, from Client machine, used "wakeonlan IP_ADDRESS", and get result "Sending magic packet to IP_ADDRESS".

However, the remote/Host machine DOES NOT WAKE after sending magic packet.

I have tried waking the Server/Host computer from both Sleep/Suspend state, and from a "soft" Off state (i.e., receiving power, and wired via Ethernet to Router).

BTW, on Patito Feo (19.4), there is no /etc/tlp.conf file, which on some of the postings in this forum says that the .conf file is the main file to change.

So, I hope this is enough info for now, and I would really like to get WOL to work on my machines!

Thanks in advance to anyone who can help!

Important Update:

After re-booting the client/host machine, WOL worked ONE TIME ONLY to wake the remote machine from Suspend (using "wakeonlan IP_ADDRESS"), and only during exactly 1 Terminal session, then did not work on further retries. On further attempts, the Client machine reports that it is sending a magic packet to the Remote/Host machine (to correct port, and with correct MAC address, but nothing happens-- the Remote/Host machine stays asleep, i.e does not wake).

Further note: I have tried many times since, but WOL does not work; does not wake Remote PC.

If anyone has any further suggestions, it would be GREATLY appreciated!!!

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

Posted: Sat Jun 11, 2022 8:08 pm
by CharlesV
I am sure you checked this already, but I didnt see it - Does your ethernet card support WOL ? (Not all do )

And did you tried to set wake on broadcast messages ? ( b option in ethtool )
I have seen some machines NOT respond to the magicPacket, but respond to broadcast ... worth a try.

and verify that your card supports WOL and is it on using ethtool

# ethtool eth0 | grep Wake-on
-> Supports Wake-on: g
-> Wake-on: g

if still doesnt work, please post QSI from the remote machine

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

Posted: Sat Jun 11, 2022 10:10 pm
by towwire
On the machine you want to wake up, you may need to change some Bios settings. Is wake on Lan enable? Also check the network stack driver support if disabled will not let you boot from the network.

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

Posted: Sun Jun 12, 2022 9:25 am
by operadude
Thanks So Much for the Replies!!!
@CharlesV : Re: your points: Yes, the Ethernet card on Remote (and Client) machine supports WOL (I have checked with "ethtool eth0", and see the "Wake-on: g" enabled). As for "wake on broadcast", I will check on that (on the remote machine, I assume). Will check & get back to you. Thanks!
@towwire : I have enabled WOL on remote machine in BIOS (called something like "Enable External Modems" -- I'm assuming that this refers to WOL). On Remote machine, I have set ethtool to enable "Wake-on" (with "g" option). I will double-check this on remote machine. Regarding your point about "network stack driver support" (whether enabled or not), where do I find that? And, is that something I should be enabling on the remote, or client machine? (or both?)

Again, thanks very much to both of you for your helpful suggestions!!!

Will be in touch soon.

P.S. Yes, for my coming response to your helpful suggestions, I will do that from Remote Machine's login, so I can include the Remote Machine's Quick System Info (QSI)

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

Posted: Sun Jun 12, 2022 11:22 am
by towwire
Let me put it this way, If you have the motherboard manual then read all the Bios settings. If you do not have a manual then you need to download one and read it.

I can not tell you where all the setting are since it depends on the Bios. As an example on one of my computers If I 'Enable' a power saving mode then I can not 'Enable' PME event wake up, power on by mouse, power on by keyboard, and wake on LAN.

That is why you should read all the Bios settings as one setting can have impact on another one.

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

Posted: Sun Jun 12, 2022 2:12 pm
by operadude
@towwire :
Thanks for the reminder of checking the manually thoroughly (for Remote Machine).

I have the manual, and have read about all of the settings. Unfortunately, it's a typical manual with the bare minimum of info.

However, on the summary page at the beginning, the manual states that LAN is provided by an Atheros AR8121 PCIE Gigabit LAN Controller. The manual, under "Manageability", states the following: WOL, PXE, RPL, WOR, PME Wake-Up

OK, I Understand the first two, and presumably WOR is Wake On Remote (?). And, not sure what PME Wake-Up is, which you also mentioned (Not explained in the manual).

So, my knowledge of all the BIOS settings is still a bit limited. Having said that, I think I might have been in error to enable (in BIOS) "Power on by External Modems"; I now think that this might be for a physical modem that is connected to the computer (hence, "external"). Not sure exactly. I enabled that previously, because it seemed the closest setting for WOL.

Anyway, there are a number of Power Settings in BIOS: 1. Suspend Mode (S1, S3, Auto); 2. ACPI 2.0; 3. Power-on by External Modem; 4. Power-on by PCI Devices; 5. Power-on by PCIE Devices.

Re: numbers 3-5 above, it now occurs to me that these are referring to physical modems, PCI & PCIe cards, that are attached/inserted into PCI/PCIe slots. (Haven't even thought about that kind of thing for say, 20 years!) Therefore, these would have NO bearing on WOL over Ethernet(!?!)

Bottom line, I will play around with the various settings, and see what happens.

One last note: please clarify what you mean by "network stack driver support" (whether enabled or not). Where do I find that? And, is that something I should be enabling on the remote, or client machine? Or both?

@CharlesV :
I will check for "Wake on Broadcast", with the "b" option!

Sum-Up: Thanks again for the tips/info, and I'll post tomorrow regarding the follow-up!

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

Posted: Sun Jun 12, 2022 4:43 pm
by towwire
When you come back with the 'QSI' of the machine you want to wake up from a shut down state, I will get the manual and check it out.

Here some I copied from one of my motherboard manuals.

Code: Select all

PME Event Wake Up Allows the system to be awakened from an ACPI sleep state by a wake-up signal from a PCI or PCIe de- vice. Note: To use this function, you need an ATX
power supply providing at least 1A on the +5VSB lead. (Default: Enabled)

To go with it is this.

ACPI Suspend Type Specifies the ACPI sleep state when the system enters suspend. 
S1(POS)	Enables the system to enter the ACPI S1 (Power on Suspend) sleep state.
		In S1 sleep state, the system appears suspended and stays in a low power mode.
		The system can be resumed at any time. 
S3(STR) Enables the system to enter the ACPI S3 (Suspend to RAM) sleep state (default).
		In S3 sleep state, the system appears to be off and consumes less power than in the S1 state.
		When signaled by a wake-up device or event, the system resumes to its working state exactly where it was  left off.
		
ErP Support
		Determines whether to let the system consume less than 1W power in S5 (shutdown) state.
		(Default: Disabled) 
		Note: When this item is set to Enabled, the following four functions will become unavailable:
		PME event wake up, power on by mouse, power on by keyboard, and wake on LAN.
		
Onboard LAN Boot ROM
Allows you to decide whether to activate the boot ROM integrated with the onboard LAN chip. (Default: Disabled)

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

Posted: Mon Jun 20, 2022 7:38 am
by operadude
@towwire
Really sorry about being away for so long! So, here's the stats on the newly upgraded machine (MX21.1 Now!):

Code: Select all

Snapshot created on: 20220616_1008
System:    Kernel: 5.10.0-15-amd64 x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.0-15-amd64 
           root=UUID=<filter> ro quiet splash 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.16.1 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.1_x64 Wildflower April 9  2022 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Desktop Mobo: ASUSTeK model: P5KPL-CM v: x.xx serial: <filter> 
           BIOS: American Megatrends v: 0702 date: 08/27/2010 
Battery:   Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M185 serial: <filter> 
           charge: 55% (should be ignored) rechargeable: yes status: Discharging 
CPU:       Info: Dual Core model: Intel Core2 Duo E7500 bits: 64 type: MCP arch: Penryn 
           family: 6 model-id: 17 (23) stepping: A (10) microcode: A0B cache: L2: 3 MiB 
           flags: lm nx pae sse sse2 sse3 sse4_1 ssse3 vmx bogomips: 11733 
           Speed: 1600 MHz min/max: 1596/2926 MHz Core speeds (MHz): 1: 1600 2: 1600 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: EPT disabled 
           Type: mds status: Vulnerable: Clear CPU buffers attempted, no microcode; SMT disabled 
           Type: meltdown mitigation: PTI 
           Type: spec_store_bypass status: Vulnerable 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Retpolines, STIBP: disabled, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: NVIDIA GT218 [GeForce 210] vendor: Gigabyte driver: nouveau v: kernel 
           bus-ID: 01:00.0 chip-ID: 10de:0a65 class-ID: 0300 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.16.1 driver: 
           loaded: modesetting unloaded: fbdev,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1280x720 s-dpi: 96 s-size: 338x190mm (13.3x7.5") 
           s-diag: 388mm (15.3") 
           Monitor-1: HDMI-1 res: 1280x720 hz: 50 dpi: 46 size: 708x398mm (27.9x15.7") 
           diag: 812mm (32") 
           OpenGL: renderer: NVA8 v: 3.3 Mesa 20.3.5 direct render: Yes 
Audio:     Device-1: Intel NM10/ICH7 Family High Definition Audio vendor: ASUSTeK P5KPL-CM 
           driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:27d8 class-ID: 0403 
           Device-2: NVIDIA High Definition Audio vendor: Gigabyte driver: snd_hda_intel 
           v: kernel bus-ID: 01:00.1 chip-ID: 10de:0be3 class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.0-15-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Qualcomm Atheros AR8121/AR8113/AR8114 Gigabit or Fast Ethernet 
           vendor: ASUSTeK P5KPL-CM driver: ATL1E v: N/A modules: atl1e port: ec00 
           bus-ID: 02:00.0 chip-ID: 1969:1026 class-ID: 0200 
           IF: eth0 state: up speed: 100 Mbps duplex: full mac: <filter> 
           IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Drives:    Local Storage: total: 260.84 GiB used: 13.85 GiB (5.3%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Hitachi model: HDT721016SLA380 size: 149.05 GiB 
           block-size: physical: 512 B logical: 512 B speed: <unknown> type: HDD rpm: 7200 
           serial: <filter> rev: A3AA scheme: MBR 
           ID-2: /dev/sdb maj-min: 8:16 model: SATA SSD size: 111.79 GiB block-size: 
           physical: 512 B logical: 512 B speed: <unknown> type: SSD serial: <filter> rev: 61.3 
           scheme: MBR 
Partition: ID-1: / raw-size: 25 GiB size: 24.44 GiB (97.76%) used: 6.37 GiB (26.1%) fs: ext4 
           dev: /dev/sdb3 maj-min: 8:19 
           ID-2: /home raw-size: 40 GiB size: 39.2 GiB (98.00%) used: 7.48 GiB (19.1%) fs: ext4 
           dev: /dev/sdb5 maj-min: 8:21 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 6 GiB used: 0 KiB (0.0%) priority: -2 
           dev: /dev/sdb6 maj-min: 8:22 
Sensors:   System Temperatures: cpu: 49.0 C mobo: 41.0 C gpu: nouveau temp: 60.0 C 
           Fan Speeds (RPM): cpu: 2295 case-1: 0 
           Power: 12v: 12.14 5v: N/A 3.3v: 3.25 vbat: N/A gpu: nouveau mV: 900.00 
Repos:     Packages: note: see --pkg apt: 2045 lib: 1002 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://ftp.linux.org.tr/mx/repo/mx/repo/ bullseye main non-free
Info:      Processes: 201 Uptime: 35m wakeups: 14 Memory: 3.84 GiB used: 1.62 GiB (42.1%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Shell: Bash v: 5.1.4 running-in: quick-system-info-mx 
           inxi: 3.3.06 
Boot Mode: BIOS (legacy, CSM, MBR)
I will try to do some wake-on lan with the upgrade, but I'm not particularly optimistic.

Will be in touch soon.

Thanks for all of your help!

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

Posted: Mon Jun 20, 2022 1:31 pm
by towwire
I downloaded the manual from here, in case you would want a PDF version.
E4208_P5KPL-CM V3
https://www.asus.com/us/supportonly/p5k ... sk_Manual/

I went through it and you need to set it this way.

Power On By External Modems [Disabled]

Power On By PCI Devices [Enabled]
When set to [Enabled], this parameter allows you to turn on the system through a PCI LAN or modem card. This feature requires an ATX power supply that provides at least 1A on the +5VSB lead.

Power On By PCIE Devices [Enabled]
When set to [Enabled], this parameter allows you to turn on the system through a PCI Express card. This feature requires an ATX power supply that provides at least 1A on the +5VSB lead.

Your Lan controller is a PCIE Device but I would enable both.

There is a section that has LAN Option ROM [Disabled], it should stay [Disabled]
Here it is explain better than I can do it.
https://www.techarp.com/bios-guide/lan-boot-rom/

This should help you with the Bios setup.

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

Posted: Mon Jun 20, 2022 2:33 pm
by operadude
@towwire :happy:
Totally Awesome!
I have the manual (in PDF), but it wasn't clear to me exactly which power options, if any, should be enabled.
Thanks for the tip!!!
I will get on it tomorrow, and let you know.
Thanks again!
:cool:

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

Posted: Tue Jun 21, 2022 1:18 pm
by operadude
:frown: @towwire : Unfortunately, it's a NO GO with your recommendations: https://forum.mxlinux.org/viewtopic.php ... 67#p687267
Enabled both PCI and PCIE in BIOS, but still get no response for sending a Magic Packet.
I also see this in the manual, re: ACPI 2.0:
Power_Menu_1.png
I can try enabling that to see if it does anything.
Any further thoughts?
:confused:

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

Posted: Tue Jun 21, 2022 1:48 pm
by towwire
I think the Bios is setup correctly. Now your MX needs to be setup to do wol.

On the machine that you want to wake up, Run this in a terminal and post it back here.

Code: Select all

 sudo ethtool eth0 

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

Posted: Tue Jun 21, 2022 2:00 pm
by operadude
Yeah, I think it's all setup correctly on the "Remote" machine.
See my original post: https://forum.mxlinux.org/viewtopic.php ... 71#p685871, #6-#9.
When I run the ethtool command on the Remote machine, I get:
Wait... now I see that the Remote machine DOES NOT have Wake-On enabled ("Wake-on: d").
Previously it was set up correctly, with "g" instead of "d".
Maybe something happened with my re-install to MX21.1
I'll try to fix it, and get back to you.
Thanks for the Sanity Check!
:happy:

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

Posted: Tue Jun 21, 2022 2:37 pm
by operadude
@towwire : A bit of confusion here, given that I had updated the remote machine to MX21.1
So, it looks like all of my work in https://forum.mxlinux.org/viewtopic.php ... 71#p685871 reverted to defaults.
I went through #5-#9 and made the appropriate changes. Still doesn't seem to work, but I will take a closer look at the details tomorrow (starting to get late here).
Thank you very much for sticking with this!
Please let me know if you have any more words of wisdom.
:happy:

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

Posted: Tue Jun 21, 2022 10:36 pm
by towwire
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

You can do a search for 'crontab e' that is run in a terminal.

I'm not sure where the error is for now. Will see what you say next.

My set up is that I have 2 computer that are connected to an old modem/router that is now just a switch. That is connected to the main modem/router that has 2 computers and a printer connected also. Not one of them has a static address and even with power failures they all still have the same address as when they where first connected over a year ago. My computer is one connected to the switch an I can wake up one connected to the modem/router from a full shut down, that one was set up as shown in the above steps.

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

Posted: Wed Jun 22, 2022 2:10 pm
by operadude
@towwire : Thanks for the very detailed instructions!
I hope to get to this before the weekend. Some work/life stuff came up.
I really appreciate your very thorough feedback!
Will let you know how it goes.
Thanks Again!

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

Posted: Fri Jun 24, 2022 9:41 am
by operadude
:number1:
@towwire : You Da' Man! (Or Woman, Or Whatever, Who Cares!)
:celebrate: :toast2: :smiley2:
OK, so went through your checklist:
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

You can do a search for 'crontab e' that is run in a terminal.
I think the issue was that I was using "wakeonlan", which wasn't working.
I installed "etherwake", and, Bingo, Jackpot, Yahtzee!!!

Now, I will have to figure-out the whole crontab business, which I have never done. But...

Living Large, Dude (or Dudette, or Whatever!)

A Huge Game-Changer for Me!!! You Rock!
:dancingman:

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

Posted: Fri Jun 24, 2022 9:52 am
by operadude
OK, just to verify:
The WOL (Wake-On-Lan) now works when the computer is in Suspend Mode, and even....Wait for it!...When the computer is off!
Hallelujah, Hallelujah!
Amazing!!!
Thanks Again, @towwire !

Oh, yeah, I will have to investigate the whole crontab or cron-job thing in a day or so.
If you have any tips, I'd be most willing to hear!

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

Posted: Fri Jun 24, 2022 12:28 pm
by towwire
Happy you got it done and that I was able to help in pointing you in the right direction. This is something to look at.

https://phoenixnap.com/kb/set-up-cron-job-linux

The command you want to enter is run by root not user so you need to enter in a terminal.

Code: Select all

sudo crontab -e
Just use the default editor (nano). In the screenshot you can see that the one # is in a cursor box that you can use the down arrow to move below everything. You can also just click with your mouse in the blank area at the bottom.
Type in @reboot /usr/bin/ethtool -s interface wol g
Screenshot_2022-06-24_09-14-36.png
Click on Quit and then save. That's it.

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

Posted: Sun Jun 26, 2022 6:05 am
by operadude
:happy: @towwire : Looks like all is well, and don't even need to edit crontab!
However, it is awesome to know about crontab, and how easy it is to automate processes!!! Now, I can automate my backups regularly over-night!

Just for completeness-sake, I want to clarify that on the Remote machine, after my inital post, I upgraded from MX 19.4 to 21.1, so:

1. Edited /etc/tlp.conf (not /etc/tlp, as it was done in 19.4); and,
2. The "wakeonlan" program is NOT working, even after the appropriate changes to BIOS.
3. The "etherwake" program IS working! Again, BOTH from Suspend and "Soft-Off"

So, once again, a really Heartfelt Thanks!!!

Hope This Helps Others!
:wavehello:

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

Posted: Sun Jun 26, 2022 10:24 am
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.

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

Posted: Sun Jun 26, 2022 11:23 am
by operadude
Got it! I found it in MX-Tools.
Thanks Again!

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

Posted: Mon Jun 27, 2022 5:17 am
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:

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

Posted: Mon Jun 27, 2022 10:17 am
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

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

Posted: Mon Jun 27, 2022 1:14 pm
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?

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

Posted: Mon Jun 27, 2022 1:47 pm
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.

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

Posted: Mon Jun 27, 2022 1:56 pm
by operadude
:celebrate:

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

Posted: Tue Jun 28, 2022 11:22 am
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:

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

Posted: Tue Jun 28, 2022 12:38 pm
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.

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

Posted: Tue Jun 28, 2022 12:52 pm
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:

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

Posted: Tue Jun 28, 2022 2:01 pm
by operadude
I know this is off-topic, and maybe not even for this Forum (more of an electrical engineering question), but...

What information is getting lost with the un-plugging?

Is there some sort of signal to the LAN (chip?) that is lost, and has to be re-established at reboot?

I have an inquisitive mind, and am curious about all things (a blessing and a curse).

When the motherboard manual states:
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
it seems to me that when I am plugging the machine back in, there is definitely current (don't know how much) that is being sent to the +5VSB, since I see the LED for that lit-up! So, when I plug the machine back in, isn't there 1A supplied to the +5VSB, which should allow for WOL?

Again, I'm not sure if on Stand By (SB), that initially there's 1A, or that 1A doesn't "arrive" until reboot.

So, it seems that some information was lost after the unplugging.

Just curious what that is, exactly!

:hmm:

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

Posted: Tue Aug 09, 2022 5:06 pm
by mowest
I use WOL for three different machines, and it appears as if the network cards (at least the ones I have in the consumer grade hardware that I'm using) are configured by default with "Wake-on: d" or WOL is configured to to be off, but they supposedly can be configured with "pumbg" settings. If the PCI bus looses power wherever the network card holds that flipped bit of information that you set with "sudo ethtool -s eth0 wol g" must be like the RAM on your main system board and all information kept in that network card "ram" is lost when it ceases to have power running to it, and everything just goes back to default. I'm don't have an electronics or computer hardware degree, but I'm guessing that is how the network interfaces hold setting changes and why pulling the plug from the wall socket eliminates the setting.

I appreciated reading all of your posts and your adventures to use WOL. I have used the wakeonlan program to wake all of my computers without issue. I keep an old 1st Generation Raspberry Pi running at my office, and I can remote into that system through a VPN tunnel, and then I have ssh access to the rpi which I use to wake up a server at work or now just recently my MX Linux box too. At home I have my home lab server that runs Syncthing, it using a cronjob wakes up another server that is just for storing backups of the files managed by Syncthing, and after it runs a rsync script, it shuts the backup server down again. So that computer thanks to WOL is only on for less than 15 minutes per day.

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

Posted: Wed Aug 10, 2022 6:31 am
by operadude
@mowest : SE-WEET!!!
:celebrate: :spinning: :worship:

Also, thanks @towwire for the reference to the thread. He really saved me.
:toast: :winner:

What you say makes a lot of sense!

Yes, it seems that network info is getting lost, or better, not being remembered (a la RAM on NIC)!

You have given me new hope and inspiration for upping my WOL game!

Sounds like a great idea to use the WOL-SSH combo to wake up servers to do fun stuff.

I have 40-50 old PCs that I love to revive/resurrect with MX-Linux, and I am always backing-up.

Like you, I think WOL is just awesome, and when I wake my other computers and SSH into them, I kinda feel like Dr. Frankenstein resurrecting his monster.

I'm also reading your other post(s). Thanks again for the great ideas! (Servers & Cron job next!)

:dancingman:

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

Posted: Wed Aug 10, 2022 12:42 pm
by towwire
@operadude : You are welcome but like you or anyone here there have been times that I have need help too.

You can buy a clock that has a battery so that when you lose power the battery keeps the time even though the clock does not show the time. When the power comes back on the clock shows the correct time without you having to reset the clock time.

When you remove the power cord to the computer it is like removing the battery from the clock as there is no power going to the network card. When you boot the computer the operating system looks for all the hardware and sets it up. The crontab resets "Wake-on: d" to "wol g" on boot or reboot.

You can do this like I do with my wife's computer. It always has power connected to it and is just shutdown. If she tells me to start her computer I just use 'sudo etherwake <mac address here>' from my computer and her computer boots and is ready for her to enter her login password when she gets there. I could use 'MX User Manaager' and change it to 'Log in automatically' so it would be booted all the way, I just don't like that. But you could do yours that way and then ssh to do what you wanted with it.

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

Posted: Wed Aug 10, 2022 3:52 pm
by operadude
@towwire : Good idea!

Thanks again for all of your feedback, especially with the "etherwake" command, as the "wakeonlan" command did not work for me.

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

Posted: Sat Oct 15, 2022 3:28 pm
by finn000
Hello, I added a line to cron

Code: Select all

@reboot /usr/bin/ethtool -s eth0 wol g
But after reboot, the Wake-on parameter: d

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

Posted: Sat Oct 15, 2022 8:51 pm
by mowest
finn000 wrote: Sat Oct 15, 2022 3:28 pm Hello, I added a line to cron

Code: Select all

@reboot /usr/bin/ethtool -s eth0 wol g
But after reboot, the Wake-on parameter: d
Did you use the command...

Code: Select all

sudo crontab -e
to create the entry?

I believe that ethtool needs to be run with "sudo" privileges, so your crontab needs to be the root crontab in order to run the command successfully. I will be honest though, I run systemd on MX so I use a systemd service to run ethtool on boot.

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

Posted: Sat Oct 15, 2022 8:59 pm
by towwire
Let's see if you did create a cronjob.
1. From the menu open Job Scheduler.
2. We want to open it as root so on your keyboard Ctrl+R
3. enter your password.
4. does it look like this.
Screenshot_2022-10-15_17-24-20.png

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

Posted: Fri Nov 15, 2024 1:09 pm
by Senpai
towwire wrote: Sat Oct 15, 2022 8:59 pm Let's see if you did create a cronjob.
1. From the menu open Job Scheduler.
2. We want to open it as root so on your keyboard Ctrl+R
3. enter your password.
4. does it look like this.
Screenshot_2022-10-15_17-24-20.png
Hi:
I had the same problem for the wave-on-lan with MX in SysVinit, creating the cronjob with the path that you show in the image, it did not work, but changing the path to “/sbin/”, it works without problems, the command would look like this

Code: Select all

@reboot /sbin/ethtool -s eth0 wol g
, I attach image.


Best regards

Image

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

Posted: Sat Nov 16, 2024 11:24 am
by operadude
Senpai wrote: Fri Nov 15, 2024 1:09 pm
towwire wrote: Sat Oct 15, 2022 8:59 pm Let's see if you did create a cronjob.
1. From the menu open Job Scheduler.
2. We want to open it as root so on your keyboard Ctrl+R
3. enter your password.
4. does it look like this.
Screenshot_2022-10-15_17-24-20.png
Hi:
I had the same problem for the wave-on-lan with MX in SysVinit, creating the cronjob with the path that you show in the image, it did not work, but changing the path to “/sbin/”, it works without problems, the command would look like this

Code: Select all

@reboot /sbin/ethtool -s eth0 wol g
, I attach image.


Best regards

Image
WOW: A BLAST FROM THE PAST :p

Thanks for the Update :exclamation:

I will try your recommendation this week, and let you know how it goes :happy:

:cool:

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

Posted: Sun Dec 15, 2024 7:30 pm
by towwire
I only use SysVinit, it still works on my computer. But let it be known that I am still on MX 21.3.

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

Posted: Mon Dec 16, 2024 3:07 am
by operadude
towwire wrote: Sun Dec 15, 2024 7:30 pm I only use SysVinit, it still works on my computer. But let it be known that I am still on MX 21.3.
Another blast from the past :exclamation:

I will test on my (SysVinit) system, and let you know if it works...

Finished setting-up cronjob in Job Scheduler, and rebooting now...

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

Posted: Mon Dec 16, 2024 3:22 am
by operadude
@Senpai @towwire

Failed test using:

Image

pre-test data:

Code: Select all

opera-dude@GA-H270-HD3:~
$ date
Mon Dec 16 09:55:34 AM IST 2024
opera-dude@GA-H270-HD3:~
$ sudo ethtool eth0 | grep Wake-on
	Supports Wake-on: pumbg
	Wake-on: d
post-test (reboot) data:

Code: Select all

opera-dude@GA-H270-HD3:~
$ date
Mon Dec 16 10:12:48 AM IST 2024
opera-dude@GA-H270-HD3:~
$ sudo ethtool eth0 | grep Wake-on
	Supports Wake-on: pumbg
	Wake-on: d
Will try now using "sbin", instead...

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

Posted: Mon Dec 16, 2024 3:44 am
by operadude
Failure (using Job Scheduler):

$ sudo ethtool eth0 | grep Wake-on
[sudo] password for opera-dude:
Supports Wake-on: pumbg
Wake-on: d

However, manually, when I do this in CLI, I get:

Code: Select all

$ date
Mon Dec 16 10:30:08 AM IST 2024

$ sudo /sbin/ethtool -s eth0 wol g

$ sudo ethtool eth0 | grep Wake-on
	Supports Wake-on: pumbg
	Wake-on: g
Not sure why my setup in the Job Scheduler is not working :confused:


And, BTW, "ethtool" is no longer in "/usr/bin", but in "/sbin/", as @Senpai noted:

Code: Select all

$ /usr/bin/ethtool -s eth0 wol g
bash: /usr/bin/ethtool: No such file or directory
So, just not sure how to correctly set-up Job Scheduler. Did as suggested, but not working:

Image

I am starting Job Scheduler as root...

OK, see my error in the CLI:

I used "/usr/bin", when I should have used "/usr/sbin", as @towwire suggested.

Trying again...
Maybe that's the problem ?

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

Posted: Mon Dec 16, 2024 4:24 am
by operadude
@Senpai and @towwire :number1:

So, this DOES work:

Image

The problem was that even using "@reboot", it wasn't actually scheduling it until Midnight!

Image

Also, here is what I get when looking for where crontab ("cron") lives:

Code: Select all

$ which cron
/sbin/cron
opera-dude@GA-H270-HD3:~
$ su
Password: 
root@GA-H270-HD3:/home/opera-dude# which cron
/sbin/cron
I did a manual check, and it also lives in:

Code: Select all

/usr/sbin/
So, looks like we have a winner, either way!

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

Posted: Mon Dec 16, 2024 4:54 am
by DukeComposed
operadude wrote: Mon Dec 16, 2024 4:24 am The problem was that even using "@reboot", it wasn't actually scheduling it until Midnight!
That's odd. "@reboot" in a crontab is intended to be run when the system starts. As in "After I reboot the machine, cron should run this line as soon as it comes back up again". Maybe it should have been called "@startup", but nonetheless it doesn't have a scheduled time and date when it runs. This is all just assuming standard Vixie cron, of course. I don't know what other cron replacements do.

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

Posted: Mon Dec 16, 2024 5:02 am
by operadude
DukeComposed wrote: Mon Dec 16, 2024 4:54 am
operadude wrote: Mon Dec 16, 2024 4:24 am The problem was that even using "@reboot", it wasn't actually scheduling it until Midnight!
That's odd. "@reboot" in a crontab is intended to be run when the system starts. As in "After I reboot the machine, cron should run this line as soon as it comes back up again". Maybe it should have been called "@startup", but nonetheless it doesn't have a scheduled time and date when it runs. This is all just assuming standard Vixie cron, of course. I don't know what other cron replacements do.
Thanks for the feedback!

Yeah, something weird is going on:

I just rebooted, since I see that I deleted the default instructions for crontab, so I copied them from my KDE install and put them back on the Xfce (where I was modifying crontab via Job Scheduler).

On Xfce, where my cronjob lives:

Code: Select all

opera-dude@GA-H270-HD3:~
$ sudo crontab -l
[sudo] password for opera-dude:            

# # Edit this file to introduce tasks to be run by cron.
# # 
# # Each task to run has to be defined through a single line
# # indicating with different fields when the task will be run
# # and what command to run for the task
# # 
# # To define the time you can provide concrete values for
# # minute (m), hour (h), day of month (dom), month (mon),
# # and day of week (dow) or use '*' in these fields (for 'any').
# # 
# # Notice that tasks will be started based on the cron's system
# # daemon's notion of time and timezones.
# # 
# # Output of the crontab jobs (including errors) is sent through
# # email to the user the crontab file belongs to (unless redirected).
# # 
# # For example, you can run a backup of all your user accounts
# # at 5 a.m every week with:
# # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
# # 
# # For more information see the manual pages of crontab(5) and cron(8)
# # 
# # m h  dom mon dow   command
 
@reboot /usr/sbin/ethtool -s eth0 wol g
And, after re-boot (a few minutes ago):

Code: Select all

$ sudo ethtool eth0 | grep Wake-on
	Supports Wake-on: pumbg
	Wake-on: d
"Wake-on: " should be followed by a "g"; NOT a "d".

So, not sure :confused:

At this point, I'll just stick with "sudo etherwake <MAC Address>", which just works OOTB :happy:

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

Posted: Mon Dec 16, 2024 5:22 am
by DukeComposed
operadude wrote: Mon Dec 16, 2024 5:02 am Yeah, something weird is going on:

"Wake-on: " should be followed by a "g"; NOT a "d".

So, not sure :confused:

At this point, I'll just stick with "sudo etherwake <MAC Address>", which just works OOTB :happy:
I'd check the logs to see if the command is running at startup as expected. One of the problems with trying to schedule something to always happen at startup is making sure the thing you want to do doesn't get run before the device/file/mountpoint you want to edit is up and initialized.

I'd honestly check if I couldn't put my network interface configs in /etc/network/interfaces or /etc/network/if-pre-up.d or if-up.d instead.

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

Posted: Mon Dec 16, 2024 6:45 am
by operadude
@DukeComposed

Thanks!

Will check it out.

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

Posted: Tue Dec 17, 2024 10:23 am
by towwire
DukeComposed wrote: Mon Dec 16, 2024 4:54 am
operadude wrote: Mon Dec 16, 2024 4:24 am The problem was that even using "@reboot", it wasn't actually scheduling it until Midnight!
That's odd. "@reboot" in a crontab is intended to be run when the system starts. As in "After I reboot the machine, cron should run this line as soon as it comes back up again". Maybe it should have been called "@startup", but nonetheless it doesn't have a scheduled time and date when it runs. This is all just assuming standard Vixie cron, of course. I don't know what other cron replacements do.
For your info the times listed for the @reboot mean nothing as reboot is not a timed event.

Also remember this is on the machine to wake-up or start-up.

For example, if we wanted to have the system date written in a file called date.txt when Linux restarts, we would add the following string:

@reboot date >> ~/date.txt

Some url's that may help you understand.

Code: Select all

https://phoenixnap.com/kb/crontab-reboot

https://www.cyberciti.biz/faq/linux-execute-cron-job-after-system-reboot/
The computer that is going to give the "wake-up" only needs this command "sudo etherwake <mac address here>".
Hope this help's.

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

Posted: Tue Dec 17, 2024 10:58 am
by DukeComposed
towwire wrote: Tue Dec 17, 2024 10:23 am For your info the times listed for the @reboot mean nothing as reboot is not a timed event.
Is that not what I said?

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

Posted: Thu Dec 19, 2024 2:47 am
by operadude
@towwire & @DukeComposed

Thank you both for your feedback!

Duke (may I call you that?): I think the last post from towwire was directed to me, not you, and so he was clarifying my confusion.

This whole issue was resolved back in 2022, with great appreciation to the responders at that time. :number1:

This post has now morphed into a new one, and relates to cron jobs (crontab, Job scheduler, etc.).

If I want to get into that more, I'll make a new post.

Thanks again to the TOTALLY AWESOME MX-LINUX COMMUNITY :exclamation:

:yourock: