Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| linux:linux-tutorials:enable-wol-persistent [2024/02/07 15:41] – created Zyzonix | linux:linux-tutorials:enable-wol-persistent [2024/12/25 14:09] (current) – [Enable automatically at boot] Zyzonix | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Enable Wake-on-LAN persistent ===== | ===== Enable Wake-on-LAN persistent ===== | ||
| + | <callout type=" | ||
| + | ==== Check current setting and enable manually ==== | ||
| + | Firstly find out the interface on which WoL should be enabled. Therefore use '' | ||
| + | <code bash> | ||
| + | |||
| + | Your output may look like this: | ||
| + | <code bash> | ||
| + | enp1s0: flags=4163< | ||
| + | inet 192.168.0.2 | ||
| + | inet6 fe80:: | ||
| + | ether xx: | ||
| + | RX packets 138808 | ||
| + | RX errors 0 dropped 3324 overruns 0 frame 0 | ||
| + | TX packets 70435 bytes 59140948 (59.1 MB) | ||
| + | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
| + | |||
| + | lo: flags=73< | ||
| + | [...] | ||
| + | |||
| + | wlp2s0: flags=4099< | ||
| + | ether xx: | ||
| + | RX packets 0 bytes 0 (0.0 B) | ||
| + | RX errors 0 dropped 0 overruns 0 frame 0 | ||
| + | TX packets 0 bytes 0 (0.0 B) | ||
| + | TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 | ||
| + | </ | ||
| + | |||
| + | Then check the current Wake-on-LAN-state with '' | ||
| + | <code bash> | ||
| + | <code bash> | ||
| + | Replace ''< | ||
| + | |||
| + | |||
| + | The output may now look like this: | ||
| + | ++++ Show/Hide | | ||
| + | <code bash> | ||
| + | Settings for enp1s0: | ||
| + | Supported ports: [ TP MII ] | ||
| + | Supported link modes: | ||
| + | 100baseT/ | ||
| + | 1000baseT/ | ||
| + | Supported pause frame use: Symmetric Receive-only | ||
| + | Supports auto-negotiation: | ||
| + | Supported FEC modes: Not reported | ||
| + | Advertised link modes: | ||
| + | 100baseT/ | ||
| + | 1000baseT/ | ||
| + | Advertised pause frame use: Symmetric Receive-only | ||
| + | Advertised auto-negotiation: | ||
| + | Advertised FEC modes: Not reported | ||
| + | Link partner advertised link modes: | ||
| + | | ||
| + | | ||
| + | Link partner advertised pause frame use: No | ||
| + | Link partner advertised auto-negotiation: | ||
| + | Link partner advertised FEC modes: Not reported | ||
| + | Speed: 1000Mb/s | ||
| + | Duplex: Full | ||
| + | Auto-negotiation: | ||
| + | master-slave cfg: preferred slave | ||
| + | master-slave status: slave | ||
| + | Port: Twisted Pair | ||
| + | PHYAD: 0 | ||
| + | Transceiver: | ||
| + | MDI-X: Unknown | ||
| + | Supports Wake-on: pumbg | ||
| + | Wake-on: d | ||
| + | Link detected: yes | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | Important are the following lines: | ||
| + | <code bash> | ||
| + | [...] | ||
| + | Supports Wake-on: pumbg | ||
| + | Wake-on: d | ||
| + | [...] | ||
| + | </ | ||
| + | If the line '' | ||
| + | |||
| + | If the line '' | ||
| + | <code bash> | ||
| + | |||
| + | ==== Enable automatically at boot ==== | ||
| + | |||
| + | If not enabled in BIOS WoL has to be enabled before shutting down. This can be done by a system service (systemd-based distro required): | ||
| + | |||
| + | Firstly create the service file: | ||
| + | <code bash> | ||
| + | And add this content: | ||
| + | <code bash> | ||
| + | [Unit] | ||
| + | Description=Configure Wake-up on LAN | ||
| + | After=network-online.target | ||
| + | |||
| + | [Service] | ||
| + | Type=oneshot | ||
| + | ExecStart=/ | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=basic.target | ||
| + | </ | ||
| + | Remind to change the ''< | ||
| + | |||
| + | Then save the file and enable the service with: | ||
| + | <code bash> | ||
| + | |||
| + | // Sourced from [[https:// | ||