What I want is waking up a Manjaro computer only with manual WOL command, not automatic wake-up for any incoming network request, etc. I have tried the
g, so the state is like below:
Supports Wake-on: pumbg
but when I used NirSoft WOL utility, added the computer with the MAC address (since I thought MAC is enough, I entered 0.0.0.0 to the IP address field), and invoked “Wake up selected computers”, it did not work.
Arch page says that “one of
b along with
g might also be necessary to enable the feature.”, but I am not sure what flags I should use other than
g for the
ethtool -s interface wol g command. Again, what I want is waking up only this computer, and only when I manually send the wake up command. No other cases.
Please advise the flags I should use.
The Wake-on values define what activity triggers wake up:
p (PHY activity),
u (unicast activity),
m (multicast activity),
b (broadcast activity),
a (ARP activity), and
g (magic packet activity).
Option ‘g’ should be enough.
First check that you are receiving wol packets on target machine:
sudo tcpdump udp port 9
Edit: Just btw:
That’s not a valid ip address.
It does not seem to receive packets, because when I ran the command and kept the manjaro computer running, and ran the wake-up command from a Windows PC, there was no output from the command.
I mis-remembered it. I did not manually enter 0.0.0.0. In a dialogue to add a new computer, I only added the MAC address and 0.0.0.0 was automatically set by the NirSoft app. Does WoL need IP address? Isn’t MAC enough?
Anyway, I had enabled bridge on the Ethernet port. If I type
ip addr, I get
1: lo <loopback up...
2. enp3s0: <broadcast, multicast, up, lower_up...
link/ether <the MAC address I used for Wol> brd ff:ff:ff:ff:ff:ff
3. bridge0: <broadcast, multicast, up, lower_up...
link/ether <a different MAC address> brd ff:ff:ff:ff:ff:ff
I had run
ethtool -s enp3s0 ... so I use the MAC address of 2, right? Am I using NirSoft WOL utility incorrectly?
Yes, mac should be enough. I don’t know anything about NirSoft tool, so can’t really say, but first you have to figure out why aren’t you receiving packets. You are testing this in a LAN, same subnet right?
You can try
ff:ff:ff:ff:ff:ff for mac, but maybe you need ‘b’ mode enabled too then, no idea tbh.
On close inspection… it seems that the router is showing the MAC address of “bridge0” for that PC. But
sudo ethtool bridge0 | grep Wake-on does not return anything unlike enp3s0, and
sudo ethtool -s bridge wol g also fails. In either MAC address, the Manjaro PC does not seem to receive the WOL packet from NirSoft utility.
Is WOL on Linux hard? I once used it for Windows, and it was not that difficult. On the contrary, my problem was that it woke up to often unintentionally. If WOL on Linux is hard, I think I could just attach an ESP8266 and make it trigger the power button on a wireless command.
I have got it working by using a different GUI tool: Welcome To Depicus - Home of the Geek
This utility had input fields for MAC, Subnet Mask, and port number. It refused to send the packet unless all of the three fields were entered. I used the MAC of enp3s0, subnet mask 255.255.255.0, and the port number 9 (got from your previous command), and it worked.
This was different from the NirSoft tool which only had IP (not required) and MAC input for adding a new target. It also had scan feature, but the MAC address of the Manjaro PC in the scan result was that of bridge0, not enp3s0.
For LAN all you need is MAC address though. Maybe your original tool doesn’t use port 9 as default. (you could do a capture with more relaxed filters, ie.
tcpdump -n host <windows ip> and udp).
If you have bridged NIC (for VMs or whatever) then created bridge will have its own MAC address.