1

Recently I started playing a bit with Wake-on-LAN to make my home setup a little bit more confortable, but in the process I got curious about ACPI configuration.

After a quick check, I noticed that my Ethernet controller had support for WOL, so I played with it a bit:

Settings for eth0:
    [...]
    Supports Wake-on: pumbg
    Wake-on: g

After some tests, I realised that:

  • When my computer is suspended, WOL works fine from another device.
  • When my computer is shutdown, nothing happens.

Now the thing is, I want to use WOL so that my computer can get ready before I arrive home. I have no need for the feature if I need to keep the computer in suspend mode for it to work (the system would resume in just a few seconds anyway).

I investigated a bit, and noticed that my Ethernet card had an S4 S-state entry in /proc/acpi/wakeup:

Device  S-state   Status    Sysfs node
PXSX    S4        *enabled  pci:0000:09:00.0

From what I've read, this means that my Ethernet controller can be used as a trigger when and only when the system is in state S4 (or below), which corresponds to hibernation. This explains why I can use WOL when in suspend mode (S1/S3), but not once I've run poweroff (which I believe puts the machine in S5, Soft Off).

I'm not very familiar with ACPI, and my knowledge in hardware certainly doesn't extend to Ethernet controllers. What I'm wondering is: is there any way I could have my system maintain power to the Ethernet controller in S5 (when the system has been powered off) ? Does my (3.13) Linux kernel have a say there, or is it all up to my motherboard's (or controller's) design?

It seems like I can decide which devices can serve as triggers by writing to /proc/acpi/wakeup (which I believe is deprecated now). But can I be more specific, and also decide at which state a device may wake the machine up?

1

It's up to the motherboard's design.

/proc/acpi/wakeup is generated from your motherboard's self-description in ACPI tables. It lists all devices that your computer can use for wakeup events and the states the mainboard supports for these wakeups. You cannot be more specific than enabling/disabling a wakeup source, but there might be more settings in the BIOS menu.

You're right in that poweroff puts the machine in S5. But S5 and S4 are quite similar states. Often the only difference are some bits in registers on a chip in the motherboard that are set on hibernation. That means that in terms of hardware it's often possible to configure wakeup from S5 if you manage to manually change the relevant registers by poking I/O ports of your motherboard or writing to an I²C device. You'd need to read the data sheets for the chipset, SuperIO chip, etc. for that to work. Alternatively it might be possible to modify the init daemon to replace the last part of the shutdown sequence with something like hibernation+reboot to force the BIOS to keep the wakeup sources active.

As wakeup from S4 is supported on your machine, the simplest solution would be to use hibernation (e.g. via pm-hibernate) instead of using poweroff.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.