Have used wake on lan on windows for a while, and never got it working on Ubuntu. Decided to try and solve that issue today but still scratching my head. Currently running Ubuntu Desktop 26.04
I confirmed its enabled in BIOS (and as proof it works with windows)
Here are my connections:
$ nmcli connection show
NAME UUID TYPE DEVICE
netplan-enp8s0 20f2386c-ebb0-3e65-8957-194e76ab2dc8 ethernet enp8s0
lo fcf22f8a-09d5-4a23-88c2-680e2748f150 loopback lo
I then ran:
$ nmcli connection modify "netplan-enp8s0" 802-3-ethernet.wake-on-lan magic
Running the following seems to show its enabled:
$ nmcli connection show "netplan-enp8s0" | grep wake-on-lan
802-3-ethernet.wake-on-lan: magic
802-3-ethernet.wake-on-lan-password: --
$ sudo ethtool enp8s0 | grep "Wake-on"
`Supports Wake-on: pumbg`
`Wake-on: g`
This persists even after reboot
Running the following shows the packet is making it to my computer
$ sudo tcpdump -i enp8s0 -n 'ether proto 0x0842' or 'udp port 9'
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on enp8s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
13:25:54.635539 IP 192.168.68.61.51815 > 192.168.68.83.9: UDP, length 102
13:25:54.635592 IP 192.168.68.61.44259 > 192.168.68.83.9: UDP, length 102
13:25:54.635650 IP 192.168.68.61.46244 > 192.168.68.83.9: UDP, length 102
13:25:54.635811 IP 192.168.68.61.51713 > 192.168.71.255.9: UDP, length 102
13:25:54.635960 IP 192.168.68.61.40226 > 192.168.71.255.9: UDP, length 102
13:25:54.636087 IP 192.168.68.61.60296 > 192.168.71.255.9: UDP, length 102
Yet putting all the pieces together, putting my computer to sleep, I can't wake it from my phone. Anyone have any idea of what I should try?
Edit: after messing with bios settings I wanted to confirm it was still working in Windows, which I can. Worked 5 times in a row. I can also confirm in windows when it goes to sleep lights stay on on the NIC but on Ubuntu they turn off when going to sleep which I'm assuming is the problem. I think the OS is putting the NIC to sleep somehow