Sorry to post another Wake-on-LAN question but sifting through the other posts I've found (both on this site and others) I can't seem to resolve my problem. I am trying to setup wake-on-LAN for a Ubuntu 16.04 machine and despite half a day of tinkering I still can't get it to wake up after sending the magic packet. So far I've done the following:
- Enabled wake-on-LAN in my BIOS
- Enabled wake-on-LAN (persistently) in the NIC
- Changed the /etc/default/halt and /etc/default/tlp settings (see below).
- Confirmed that the "magic" packets I'm sending are making it to the machine.
I'm hoping someone here will either spot something I'm doing wrong or have some suggestion that may open up a new avenue of investigation; at this point I'm out of ideas. Thanks for your help!
Motherboard: Asrock Xtreme4 with onboard LAN
Long listing of debugging/detail information (comments above the commands explain what I am trying to show/do):
#
# Networking devices; trying to wake-on-lan from the main ethernet
# device 'enp0s31f6'
#
root@Ruby:/var/log# ifconfig
enp0s31f6 Link encap:Ethernet HWaddr 70:85:c2:5e:48:c7
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::57be:f8e8:ad34:811d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2018 errors:0 dropped:0 overruns:0 frame:0
TX packets:1036 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:296222 (296.2 KB) TX bytes:171521 (171.5 KB)
Interrupt:16 Memory:df200000-df220000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:234 (234.0 B) TX bytes:234 (234.0 B)
#
# Ubuntu release information for machine being configured for WOL.
#
root@Ruby:/var/log# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.3 LTS"
#
# Detail information on the main ethernet device. The 'g' character shows
# in both 'Supports Wake-on' and 'Wake-on' lines. This same output is
# consistent across system reboots (i.e., I don't have the issue with 'Wake-on'
# being changed to something like 'd' after reboot; this always shows up as
# 'g').
#
root@Ruby:/var/log# ethtool enp0s31f6
Settings for enp0s31f6:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: on (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
#
# Modified the halt defaults and added 'NETDOWN=no' as seen below.
#
root@Ruby:/var/log# cat /etc/default/halt
# Default behaviour of shutdown -h / halt. Set to "halt" or "poweroff".
HALT=poweroff
NETDOWN=no
#
# Updated the power settings configuration to NOT disable WOL. Not sure if
# this is really needed or not as this computer is not a laptop (simply following
# recommendations from online posts).
#
root@Ruby:/var/log# cat /etc/default/tlp | grep WOL
WOL_DISABLE=N
#
# Verified that magic packets are being received on the expected network device
# when sent from another linux machine. Output from the command used to send the
# packets was:
#
# $ wakeonlan -i 192.168.1.255 '70:85:c2:5e:48:c7'
# Sending magic packet to 192.168.1.255:9 with 70:85:c2:5e:48:c7
#
# I ran this 3 times and produced the capture output below on the target machine (i.e.,
# the computer I'm trying to start up via WOL):
#
root@Ruby:/var/log# tcpdump -i enp0s31f6 'udp and port 9'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp0s31f6, link-type EN10MB (Ethernet), capture size 262144 bytes
13:23:53.869476 IP hackpi.57568 > 192.168.1.255.discard: UDP, length 102
13:23:55.384924 IP hackpi.59471 > 192.168.1.255.discard: UDP, length 102
13:23:57.214933 IP hackpi.49245 > 192.168.1.255.discard: UDP, length 102
#
# When testing the wake-on-LAN settings I stop the machine with
# 'shutdown -h now' then after the lights turn off I try to send the magic
# packet with the command previously shown (see tcpdump capture comments
# above). No dice, machine never boots.
#
root@Ruby:/# shutdown -h now
Bios WOL Enabled: