Use a network card placeholder in the Wake on LAN steps
This commit is contained in:
1 parent
e79f7da555
commit
f14c65e71a
2 files changed
+14
-6
No files matched your search
@@ -231,11 +231,15 @@ ip -br link
|
||||
|
||||
You get something like `enp1s0 UP aa:bb:cc:dd:ee:ff`. Keep both: the interface name for the commands below, the MAC address for the machine that will send the packet.
|
||||
|
||||
::warning
|
||||
The interface name `enp1s0` above is only an example. In the commands and the service file below, replace `<your-network-card-id>` with the name you got from `ip -br link` on your own machine, otherwise the setting will be applied to a card that doesn't exist.
|
||||
::
|
||||
|
||||
#### Check the card supports it
|
||||
|
||||
```bash [Terminal]
|
||||
sudo apt install ethtool
|
||||
sudo ethtool enp1s0 | grep -i wake
|
||||
sudo ethtool <your-network-card-id> | grep -i wake
|
||||
```
|
||||
|
||||
The answer looks like `Supports Wake-on: pumbg` then `Wake-on: d`. The letter that matters is **g**, for magic packet. If the *Supports* line doesn't have it, the card can't do it and there's nothing to configure. `Wake-on: d` simply means disabled, which the next step fixes.
|
||||
@@ -243,7 +247,7 @@ The answer looks like `Supports Wake-on: pumbg` then `Wake-on: d`. The letter th
|
||||
#### Turn it on
|
||||
|
||||
```bash [Terminal]
|
||||
sudo ethtool -s enp1s0 wol g
|
||||
sudo ethtool -s <your-network-card-id> wol g
|
||||
```
|
||||
|
||||
Run the check again, `Wake-on` should now be `g`. This setting is reset at every boot, so it needs to be reapplied automatically.
|
||||
@@ -261,7 +265,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/ethtool -s enp1s0 wol g
|
||||
ExecStart=/usr/sbin/ethtool -s <your-network-card-id> wol g
|
||||
|
||||
[Install]
|
||||
WantedBy=basic.target
|
||||
|
||||
Reference in new issue
Block a user