• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Wake on LAN not working after deploying with shutdown

Scheduled Pinned Locked Moved Solved
FOG Problems
2
3
558
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    Kazso
    last edited by Mar 5, 2024, 11:12 AM

    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 ?

    T 1 Reply Last reply Mar 5, 2024, 11:21 AM Reply Quote 0
    • K
      Kazso
      last edited by Mar 7, 2024, 9:43 AM

      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.

      1 Reply Last reply Reply Quote 1
      • T
        Tom Elliott @Kazso
        last edited by Mar 5, 2024, 11:21 AM

        @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.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • K
          Kazso
          last edited by Mar 7, 2024, 9:43 AM

          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.

          1 Reply Last reply Reply Quote 1
          • [[undefined-on, K Kazso, Mar 8, 2024, 10:43 PM]]
          • 1 / 1
          1 / 1
          • First post
            1/3
            Last post

          156

          Online

          12.0k

          Users

          17.3k

          Topics

          155.2k

          Posts
          Copyright © 2012-2024 FOG Project