MX23: Suspend is changing wake-on-lan from disabled to enabled  [Solved]

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
toyyoda
Posts: 11
Joined: Mon Dec 02, 2019 11:58 am

MX23: Suspend is changing wake-on-lan from disabled to enabled

#1 Post by toyyoda »

I have a laptop with an Intel 82579LM ethernet card. I recently installed MX23 coming from MX19 (kernel 4.19) and did not have this issue with MX19. I have wake-on-lan disabled in the bios. When I boot up, ethtool shows "Wake-on: d" and the cat /sys/class/net/eth0/device/power/wakeup command gives a "disabled" result. But when I suspend, the NIC stays on with leds flashing. After coming back from suspend, ethtool shows Wake-on: g and cat /sys/class/net/eth0/device/power/wakeup gives an "enabled" result. When I shutdown, the NIC stays off and wake-on-lan is disabled again when I boot MXLinux. Is this a kernel bug or is this something I can fix?
Thanks in advance.

BitterTruth
Posts: 683
Joined: Tue Sep 22, 2020 7:36 pm

Re: MX23: Suspend is changing wake-on-lan from disabled to enabled

#2 Post by BitterTruth »

It's probably tlp enabling it. Have a read of this thread post here:

viewtopic.php?p=736769#p736769

That thread was all about keeping WOL enabled. It turned out that the tlp power save utility was disabling it on suspend for the OP. For you it's possibly the opposite: it might be enabling it.

Try and edit the tlp config and make sure when the laptop goes to suspend the WOL feature doesn't stay (or become) enabled.

Heres: from the arch wiki:
Enable WoL in TLP
When using TLP for suspend/hibernate, the WOL_DISABLE setting should be set to N in /etc/tlp.conf to allow resuming the computer with WoL.
Try the opposite and see if it helps:
WOL_DISABLE=Y

Make sure to do both for AC and battery

toyyoda
Posts: 11
Joined: Mon Dec 02, 2019 11:58 am

Re: MX23: Suspend is changing wake-on-lan from disabled to enabled

#3 Post by toyyoda »

Everything is commented out in tlp.conf (WOL_DISABLE=Y is there already). Uncommenting that line didn't change anyhing.

BitterTruth
Posts: 683
Joined: Tue Sep 22, 2020 7:36 pm

Re: MX23: Suspend is changing wake-on-lan from disabled to enabled  [Solved]

#4 Post by BitterTruth »

What init system are you using, sysvinit or systemd? Please post your QSI.

Systemd could be enabling it, network manger could also be doing it. I suspect the disable_wol script (that is run on suspend) here:

Code: Select all

sudo nano /usr/lib/pm-utils/power.d/disable_wol
It's job is to set WOL state to 'g' (magic packet only)

This is from the Debian Wiki on WOL- troubleshooting section (link below):
PM-Utils Conflicts
The pm-utils package contains scripts that are run on suspend, hibernate and on resume of the system. There is one script, /usr/lib/pmutils/power.d/disable_wol, which sets the configuration for interfaces to only wake on "Magic Packet" (g), regardless of the settings you may have configured in /etc/network/interfaces (or one of the files under /etc/network/interfaces.d, or manually using ethtool or in some other way). Look for lines in the file similar to the following:


disable) ethtool -s "${d##*/}" wol d>/dev/null 2>&1;;
enable) ethtool -s "${d##*/}" wol g>/dev/null 2>&1;;

Obviously, if you have set an interface to Wake on LAN in the event of a unicast packet or "Magic Packet" (ug), then suspend using pm-suspend, for example, this script will set the interface to "Magic Packet" only (g) as part of the suspension process.

You can detect the problem, once you know what you're looking for, by noticing through ethtool after a resume that the "Wake-on" settings for interfaces have been set to "g".

A simple fix (that will not interfere with package updates) is to add a file with the same name, disable_wol to the local configuration directory, /etc/pm/power.d/. This overrides the script in /usr/lib/pm-utils/power.d/disable_wol.
Rather than edit the original file, you can create the override file and just fill it with comments as per the example on the page. This will make sure updates don't affect your settings.

https://wiki.debian.org/WakeOnLan#Troubleshooting_WOL

toyyoda
Posts: 11
Joined: Mon Dec 02, 2019 11:58 am

Re: MX23: Suspend is changing wake-on-lan from disabled to enabled

#5 Post by toyyoda »

Using init, not systemd. This is basically a fresh install with just taskbar and theme changes.
You nailed it, the disable_wol script is turning it on during suspend. If I take the disable_wol file out of the folder it fixes the issue. I assume this is a bug (and probably not an MX bug), should I report this anywhere else?

BitterTruth
Posts: 683
Joined: Tue Sep 22, 2020 7:36 pm

Re: MX23: Suspend is changing wake-on-lan from disabled to enabled

#6 Post by BitterTruth »

Glad you got it solved. Please mark the post that solved it so it's easier for anyone else in the same position.

I'm not sure if it will be classed as a bug. I think it's supposed to be like that as default and if anyone wants to do it their own way then they put in the override.

toyyoda
Posts: 11
Joined: Mon Dec 02, 2019 11:58 am

Re: MX23: Suspend is changing wake-on-lan from disabled to enabled

#7 Post by toyyoda »

BitterTruth wrote: Tue Oct 03, 2023 8:41 am I'm not sure if it will be classed as a bug. I think it's supposed to be like that as default and if anyone wants to do it their own way then they put in the override.
Marked. I don't see how is it "supposed to" turn on wol when it is disabled everywhere? Most people have problems with turning it on and keeping it on, not turning if off :). And it wasn't happening in MX19.

Post Reply

Return to “MX Help”