https://wiki.archlinux.org/index.php/Wake-on-LAN
ip addr
su
ethtool enp1s0f0
ethtool enp1s0f1
ethtool -s enp1s0f0 wol g
ethtool enp1s0f0
What the g
or the other options mean is stated here (source):
p Wake on phy activity
u Wake on unicast messages
m Wake on multicast messages
b Wake on broadcast messages
a Wake on ARP
g Wake on MagicPacket(tm)
s Enable SecureOn(tm) password for MagicPacket(tm)
d Disable (wake on nothing). This option clears all previous options.
Permanently enable WOL
by creating the file /etc/systemd/system/wol@.service
as root with the following content:
[Unit]
Description=Wake-on-LAN for %i
Requires=network.target
After=network.target
[Service]
ExecStart=/usr/bin/ethtool -s %i wol g
Type=oneshot
[Install]
WantedBy=multi-user.target
Then activate this new service for your network adapter:
systemctl enable wol@enp1s0f0
systemctl start wol@enp1s0f0
Suspend:
# Install using pacman -S pm-utils
sudo pm-suspend
# or ( see https://wiki.archlinux.org/index.php/systemd#Power_management )
systemctl suspend
To get the package to a PC on a different (routed) subnet, simply include the IP address when waking it up. (Some resources for more complicated subnet setups: 1 2 3).
Wakeup from Mac OS X
# Install using brew install wakeonlan
wakeonlan 00:de:ad:be:ef:ff