Wake on LAN not working after deploying with shutdown
-
After I deploy a computer with the shutdown option, I can’t wake it up anymore.
Wake on LAN works fine, when the computer has been shut down from either Windows or Linux (it enters the S5 power state). But after a FOG deployment WoL no longer works.
I assume the problem is with FOS (FOG Operating System) itself.
I tried to rebuild FOS (kernel 6.1.63) with every ACPI option I could find with “make menuconfig” in both the kernel (bzImage) and the FS (init.xz).
I tested this custom build with the “Debug” task. FOS loads fine. WoL still doesn’t work after shutting down the computer from FOS with the “poweroff” command.
Acpitool command supports only sleep (S3, S4), but not shutdown (S5).
What options are needed for FOS to support S5? Is it even possible to build a custom FOS from the official repo with S5 support: https://github.com/FOGProject/fos ? -
Thanks for clarifying it.
The default bzImage kernel already had the network drivers needed for my setup (onboard Realtek NIC). I checked the WoL status of the ethernet adapter with ethtool. It showed:Supports Wake-on: pumbg Wake-on: d
So WoL was supported, but disabled.
Then I followed this guide to enable WoL on boot: https://wiki.archlinux.org/title/Wake-on-LAN
I created the /etc/udev/rules.d/81-wol.rules file in init.xz and init_32.xz, and added this rule:ACTION=="add", SUBSYSTEM=="net", ATTR{address}!="00:00:00:00:00:00", RUN+="/usr/sbin/ethtool -s $name wol g"
I use ATTR{address} instead of NAME, so this rule would apply to any network interface (except loopback), regardless of the interface name.
With this rule in place I can wake up computers after a shutdown task (deploy with shutdown or capture with shutdown).TLDR; I only needed to add an udev rule to the pre-built init.xz and init_32.xz (https://github.com/FOGProject/fos/releases/latest) to enable WoL.
-
@Kazso WOL doesn’t care about FOS period.
WOL is a network controller thing, not, specifically, an OS thing. While a running OS can set the firmware to allow/disable WOL on a network card, the actual reception and operation isn’t anywhere close to the OS layer.
To the point you’re referring to, there are some kernels that load the network accessible via firmware specific loaded drivers and those firmware may flip (temporarily) some options. By temporarily, usually we see this issue prop up from time to time, but after booting into the Windows Operating System or another OS where the settings for the card are adjusted to allow WOL things tend to work correction.
TLDR; The issue isn’t the operating system, it’s more likely the kernel’s firmware loading the network card drivers for use with FOS (and maybe other linux operating systems) that’s setting this WOL bit to a disabled state.
-
Thanks for clarifying it.
The default bzImage kernel already had the network drivers needed for my setup (onboard Realtek NIC). I checked the WoL status of the ethernet adapter with ethtool. It showed:Supports Wake-on: pumbg Wake-on: d
So WoL was supported, but disabled.
Then I followed this guide to enable WoL on boot: https://wiki.archlinux.org/title/Wake-on-LAN
I created the /etc/udev/rules.d/81-wol.rules file in init.xz and init_32.xz, and added this rule:ACTION=="add", SUBSYSTEM=="net", ATTR{address}!="00:00:00:00:00:00", RUN+="/usr/sbin/ethtool -s $name wol g"
I use ATTR{address} instead of NAME, so this rule would apply to any network interface (except loopback), regardless of the interface name.
With this rule in place I can wake up computers after a shutdown task (deploy with shutdown or capture with shutdown).TLDR; I only needed to add an udev rule to the pre-built init.xz and init_32.xz (https://github.com/FOGProject/fos/releases/latest) to enable WoL.
-