I have two machines, both running Ubuntu 18.04. My objective to to have WOL working on both machines.
On one machine (PC1) I have WOL working perfectly, however I cannot get WOL working on the other machine (PC2).
My Set up (on both PCs) is:
I have disabled Network Manager as follows:
sudo systemctl stop NetworkManager
sudo systemctl disable NetworkManager
sudo systemctl mask NetworkManager
I have enabled networkd as follows:
sudo systemctl unmask systemd-networkd.service
sudo systemctl enable systemd-networkd.service
sudo systemctl start systemd-networkd.service
I have modified the only file in directory /etc/netplan, namely /etc/netplan/01-network-manager-all.yaml so it looks like this (PC1):
network:
version: 2
renderer: networkd
ethernets:
eno1:
addresses:
- 192.168.1.113/24
gateway4: 192.168.1.1
wakeonlan: true
nameservers:
addresses: [103.86.96.100, 103.86.99.100]
PC2 is exactly the same except eno1 is enp1s0 and the IP address is different (of course).
Both machines boot up fine, the ethernet connection is OK, I can access internet OK from both machines.
If I type
sudo ethtool enp1s0
on PC2 I get this (extract):
Supports Wake-on: pumbg
Wake-on: d
on PC1 (eno1) I get (extract)
Supports Wake-on: pumbg
Wake-on: g
If I type (on PC2):
sudo ethtool -s enp1s0 wol g
and then
sudo ethtool enp1s0
I get
Supports Wake-on: pumbg
Wake-on: g
If I then switch off PC2, WOL works as expected (but this, of course, is only 'one-time').
If I put the line sudo ethtool -s enp1s0 wol g in a startup script or a shutdown script that I have on PC2 (both run with sudo permissions) then WOL doesn't work.
The only difference I perceive between PC1 and PC2 is the motherboard; PC2 has a Gigabyte GA-H110M-S2H; PC1 has an ASUS SABERTOOTH X79)
I would be most grateful for any suggestions or insights anyone may have.
Thanks in advance.