You are not logged in.

#1 2021-06-18 23:09:28

themusicalduck
Member
Registered: 2011-07-04
Posts: 123

[SOLVED] Unable to set Wake-on by default with ethtool or use WOL.

I'm hoping to set up wake on LAN on my desktop. I've enabled PCI-E Power on in the BIOS and tried a variety of ways to enable it on the operating system level but cannot seem to make it work.

If I run

sudo ethtool -s enp3s0 wol g

afterwards ethtool says Wake-on: g

If I suspend my PC and send a magic packet, the PC doesn't wake up.

If I unsuspend it manually (by pressing the keyboard) and run ethtool again, Wake-on is set back to "d".

I tried setting it using NetworkManager. nmcli says 802-3-ethernet.wake-on-lan is "magic" but it doesn't work. I also set 802-3-ethernet.auto-negotiate to yes but it didn't make a difference.

So I've tried swapping to systemd-networkd. First I created a 50-wired.link file (like detailed in the wiki) which didn't work and also tried using systemd-wol in the AUR which also didn't work. I also tried creating a udev rule exactly like in the wiki.

After every solution Wake-on is always shown as disabled on boot and if I enable it manually, it always shows as disabled after an unsuspend. It also never wakes up from suspend or shutdown even if I set it to g manually using ethtool.

I was able to verify the packet is getting there using the nc command on the wiki.

Does anyone have any more ideas why I can't seem to get the setting to persist? Or why on manual settings WOL doesn't work anyway?

This is my full output for ethtool:

Settings for enp3s0:
	Supported ports: [ TP	 MII ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full
	                                     100baseT/Half 100baseT/Full
	                                     1000baseT/Full
	Link partner advertised pause frame use: Symmetric
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Auto-negotiation: on
	master-slave cfg: preferred slave
	master-slave status: slave
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: external
	MDI-X: Unknown
	Supports Wake-on: pumbg
	Wake-on: g
	Link detected: yes

Thank you.

Last edited by themusicalduck (2021-06-19 18:39:11)

Offline

#2 2021-06-19 06:51:36

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [SOLVED] Unable to set Wake-on by default with ethtool or use WOL.

I have the same trouble with Wake-on-lan after changing motherboard. My old motherboard worked straightforward but my newer one I can't get to send magic packets.
I was just wondering what your hardware is like.

Last edited by d_fajardo (2021-06-19 06:55:55)

Offline

#3 2021-06-19 07:03:54

progandy
Member
Registered: 2012-05-17
Posts: 5,193

Re: [SOLVED] Unable to set Wake-on by default with ethtool or use WOL.

What is your ethernet card / chip / driver? Maybe there is a kernel option for its driver.

It might be necessary to shut down networking, to get WOL to work in suspend or hibernate states and restart it afterwards.
Also, you might have to enable the network card as a wakeup source in /proc/acpi/wakeup,

(I have never tried to use WOL, though)

Last edited by progandy (2021-06-19 07:04:38)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2021-06-19 17:17:44

themusicalduck
Member
Registered: 2011-07-04
Posts: 123

Re: [SOLVED] Unable to set Wake-on by default with ethtool or use WOL.

The ethernet card I have is:

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 26)

The motherboard is ASUS TUF Gaming X570-Plus.

I saw some information about installing the r8168 module and setting the module option s5wol=1. I tried this but didn't have any luck. I also started having problems getting my PC to suspend at all and sometimes having to force reboot after a suspend failed, so I've put my system back to how it was.

I can't quite figure out how to add the card to /proc/acpi/wakeup. I tried to add it manually with:

echo "GLAN     S4    *enabled   pci:0000:03:00.0" >> /proc/acpi/wakeup

But it didn't work. I also made a udev rule:

ACTION=="add", SUBSYSTEM=="net", NAME=="enp*", ATTR{power/wakeup}="enabled"

and rebooted but no luck there either.

I can't see any reference to the network card in the list already:

cat /proc/acpi/wakeup
Device	S-state	  Status   Sysfs node
GPP0	  S4	*disabled
GPP2	  S4	*disabled
GPP3	  S4	*disabled
GPP4	  S4	*disabled
GPP5	  S4	*disabled
GPP6	  S4	*disabled
GPP7	  S4	*disabled
GPP8	  S4	*enabled   pci:0000:00:03.1
X161	  S4	*enabled   pci:0000:07:00.0
GPP9	  S4	*disabled
X162	  S4	*disabled
GPPA	  S4	*disabled
GPPB	  S4	*disabled
GPPC	  S4	*disabled
GPPD	  S4	*disabled
GPPE	  S4	*disabled
GPPF	  S4	*disabled
GP10	  S4	*disabled
GP11	  S4	*disabled
GP12	  S4	*enabled   pci:0000:00:07.1
GP13	  S4	*enabled   pci:0000:00:08.1
XHC0	  S4	*enabled   pci:0000:0b:00.3
GP30	  S4	*enabled   pci:0000:00:08.2
GP31	  S4	*enabled   pci:0000:00:08.3
PS2K	  S3	*disabled
PS2M	  S3	*disabled
BXBR	  S4	*enabled   pci:0000:00:01.2

Frustratingly I tested WOL on Windows and it worked perfectly with zero configuration. At least I definitely know now the hardware is capable.

I have the same trouble with Wake-on-lan after changing motherboard. My old motherboard worked straightforward but my newer one I can't get to send magic packets.
I was just wondering what your hardware is like.

I've tried a few times on different hardware to make WOL work. I was never successful (on Linux). Closest I got was it working occasionally on my old desktop, but still most of the time failing. I'm really hoping I can figure it out this time because I'm moving and can't take my desktop with me. I want to use it as a remote system but I need to be able to reliably suspend and wake it up.

Offline

#5 2021-06-19 18:38:47

themusicalduck
Member
Registered: 2011-07-04
Posts: 123

Re: [SOLVED] Unable to set Wake-on by default with ethtool or use WOL.

Ok, I think I've found the solution. I had TLP installed but for some reason thought I didn't. After adding WOL_DISABLE=N to /etc/tlp.conf it seems to work now, even from a full power off.

I'm still having problems with suspending it. I always have to do it twice and dmesg shows me:

[   69.255653] Freezing of tasks failed after 20.006 seconds (0 tasks refusing to freeze, wq_busy=1):
[   69.255659] Showing busy workqueues and worker pools:
[   69.255667] workqueue events_freezable_power_: flags=0x86
[   69.255668]   pwq 64: cpus=0-31 flags=0x4 nice=0 active=0/0 refcnt=3
[   69.255674]     delayed: sync_hw_clock
[   69.255706] workqueue usb_hub_wq: flags=0x4
[   69.255710]   pwq 2: cpus=1 node=0 flags=0x0 nice=0 active=2/0 refcnt=4
[   69.255714]     in-flight: 130:hub_event, 131:hub_event
[   69.255720]     delayed: hub_event
[   69.255778] pool 2: cpus=1 node=0 flags=0x0 nice=0 hung=1s workers=4 idle: 1097 25

I tried to disable everything (even PCIE power on in the BIOS) to see if it was related to changes I've made but it doesn't seem to help, so I can only assume it's another issue for a new thread. I'll mark this one as solved. Thank you for the suggestions.

Last edited by themusicalduck (2021-06-19 18:53:22)

Offline

#6 2021-06-19 18:47:46

progandy
Member
Registered: 2012-05-17
Posts: 5,193

Re: [SOLVED] Unable to set Wake-on by default with ethtool or use WOL.

For suspend, maybe try to disable autosuspend for your network card and all parent devices: https://www.kernel.org/doc/Documentatio … ices-power

Set /sys/devices/.../power/control to "on"
(maybe some additional settings in tlp)

Edit: Oh, not a problem with WOL in suspend, but with suspend itself. Yeah, that is a problem for another thread, but maybe try without tlp first.

Last edited by progandy (2021-06-19 18:49:42)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#7 2021-06-19 18:56:17

themusicalduck
Member
Registered: 2011-07-04
Posts: 123

Re: [SOLVED] Unable to set Wake-on by default with ethtool or use WOL.

It's very strange that tlp is installed but isn't enabled or running. But somehow changing that setting in tlp.conf made a difference to my problem.

I might experiment with removing tlp entirely because I don't really need it. Thanks for the idea.

Offline

Board footer

Powered by FluxBB