Wake on Wireless (WoWLAN) is a feature to switch on a computer via the network wirelessly.
This details how to enable WoWLAN on our system.
-
Check if WoWLAN is supported on your wireless interface using
iw
:iw list
Sample entry showing that WoWLAN is supported:
WoWLAN support: * wake up on disconnect * wake up on magic packet * wake up on pattern match, up to 1 patterns of 1-128 bytes, maximum packet offset 0 bytes * can do GTK rekeying * wake up on network detection, up to 10 match sets
Do also note the first line of the output of
iw list
:Wiphy phy0
The
phy0
in the output ofiw list
indicates the name of the wireless interface. -
Check the status of WoWLAN on said interface (i.e.
phy0
):iw phy0 wowlan show
Sample output:
WoWLAN is disabled.
-
If WoWLAN is not enabled, enable wake up on magic packet on said interface (i.e.
phy0
):sudo iw phy0 wowlan enable magic-packet
Check the status of WoWLAN again:
iw phy0 wowlan show
Sample output after WoWLAN enablement:
WoWLAN is enabled: * wake up on magic packet
To make it persistent, create a
wowlan@
systemd
service:sudo nano /etc/systemd/system/wowlan@.service
Copy the content of the sample wowlan@.service file, paste it into the service file you created, and save it.
Then, start and enable the
wowlan@
service for the wireless interface. Assuming the wireless interface isphy0
, the service name would bewowlan@phy0.service
. -
You can use
iw
to get the MAC address of your wireless interface:iw dev
Sample output:
phy#0 Interface wlp4s0 ifindex 3 wdev 0x1 addr 80:eg:f9:5f:06:28 type managed channel 48 (5240 MHz), width: 80 MHz, center1: 5210 MHz txpower 3.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0
From this example, the interface,
phy0
's, name iswlp4s0
, and the MAC address is80:eg:f9:5f:06:28
.
This details how to trigger WoWLAN on a system from another system.
Important
This only works if the target system is connected to the same network wirelessly, and the target system's power is on (i.e. sleeping, not shutdown).
-
Install the
wakeonlan
package usingyay
.It is also available on
homebrew
for macOS:brew install wakeonlan
-
Run the
wakeonlan
command with the MAC address of the target system that you wish to wake (i.e.80:eg:f9:5f:06:28
):wakeonlan 80:eg:f9:5f:06:28