The Wake-on-LAN feature is a hardware setting rather than something the OS controls, so it technically makes sense that the machine remains suspended when receiving the magic packet. That said, it can be quite bothersome for people who want their servers to wake and return to operation.
First, let’s confirm that the driver used for the network card supports WoL. Open a terminal and type:
sudo ethtool <interface>
Note: Be sure to replace <interface> with the name of your device. If you’re not sure what the name is, ip link show will provide the interface name.
The output should look something like this:
Settings for enp0s31f6:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: off (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
Check the value of Wake-on contains a letter that is not d. If it does, this means to wake the machine, it needs to receive a "MagicPacket" rather than something else. There are several different options that the machine might be listening for. A complete list can be found in the documentation (search for the string Wake-on-LAN options).
If the value is d, this means the Wake-on value is disabled. If this is the case, you can enable it with this command:
sudo ethtool -s <interface> wol g
-s means "set", <interface> is the network interface, wol is "Wake on LAN", and g is "MagicPacket". You can choose other wake options as well, which are documented in the link above.
Unfortunately this command will need to be run every time your system boots, so be sure to add it to an appropriate startup script, such as part of the up rules in /etc/network/interfaces.
Hope this gives you the info you need to have your machines wake up from suspend.