WOL only works after you've resumed from suspend (sleep) once

General support questions
Post Reply
jimj
Posts: 93
Joined: 2014/10/01 05:34:57

WOL only works after you've resumed from suspend (sleep) once

Post by jimj » 2019/02/13 02:21:51

I'm running the latest CentOS 7.6 on my home desktop. I use WOL (wake-on-lan) and also let my PC automatically suspend (sleep) to save power. I can resume my PC by pressing its power button or by sending it a WOL packet. For a long time (perhaps since I started using CentOS 7.0 years ago) I've had (what seemed to be) a very rare and intermittent WOL problem. Just a few times per year WOL wouldn't work. This problem was so rare I never spent any time trying to figure out what was wrong.

This last week I finally decided to try to debug this problem and I finally figured out what's going on. If I turn my PC on and let it suspend I can't resume it via WOL. However after I resume it once (via its power button) WOL now works flawlessly (until I reboot it and need to go through the manual resume process once).

I have no idea what changes after that first resume. Since this is a rare (and now avoidable) occurrence for me I'm also not interested in investing more time in solving this. However I am curious if anyone else has seen this (is it just me?, a quirk of my hardware?) and hopefully posting this will help someone else avoid this issue too.

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: WOL only works after you've resumed from suspend (sleep) once

Post by lightman47 » 2019/02/17 11:13:20

I have found that 'WOL' only works when the machine is shut down via software (shutdown -h now or GUI, for instance). After a power outage or power button shutdown I suspect the monitoring portions of the hardware are not energized, hence all the magic packets in the world aren't going to wake it.

As to suspend/hibernate - I know nothing/never use them. (my take on it).

jimj
Posts: 93
Joined: 2014/10/01 05:34:57

Re: WOL only works after you've resumed from suspend (sleep) once

Post by jimj » 2019/02/17 13:34:27

In addition to or instead of the "energized" theory I know that the OS must be configured correctly to allow WOL. So I believe during a clean shutdown (or suspend) the OS tells the BIOS to accept WOL packets. What's strange in my case is that my config must be correct since WOL always works except for the first time my PC is suspended. For example my computer is configured to wake on "g" (Wake on MagicPacket):

[root@black ~]# ethtool enp3s0 |grep Wake
Supports Wake-on: pumbg
Wake-on: g

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: WOL only works after you've resumed from suspend (sleep) once

Post by lightman47 » 2019/02/17 13:42:18

I've never had to do anything but enable it in in the BIOS on any of my machines, then it just worked.

FWIW

jimj
Posts: 93
Joined: 2014/10/01 05:34:57

Re: WOL only works after you've resumed from suspend (sleep) once

Post by jimj » 2019/02/17 13:44:44

lightman47 wrote:
2019/02/17 13:42:18
I've never had to do anything but enable it in in the BIOS on any of my machines, then it just worked.
On CentOS I believe it defaults to Magic Packet enabled and has always just worked for me too. On Windows depending on the card I've had to update drivers and change WOL settings.

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: WOL only works after you've resumed from suspend (sleep) once

Post by lightman47 » 2019/02/17 16:25:33

Ha - forgot there was Windows ...
:D

Post Reply