1

I've recently updated one of my machines from Ubuntu 21.10 to 22.04 without any major issues. However, it seems like my Wake-on-LAN configuration has broken down somehow.

WoL is enabled at the BIOS/UEFI level and a systemd service is run during boot:

[Unit]
Description=Enable Wake-up on LAN

[Service] Type=oneshot ExecStart=/sbin/ethtool -s %i wol g

[Install] WantedBy=basic.target

Now however, this command just yields:

netlink error: Operation not supported

And even when checking with ethtool manually by running:

sudo ethtool enp4s0

There's no mention of Wake-On: anymore. Has something changed in 22.04 to the network stack that disables WoL support? Or is there something I can do to debug this further?

Xaldew
  • 113

3 Answers3

3

I solved the issue on a Qualcomm Atheros AR816x/AR817x adapter. Use at own risk!

I've done this fully remote on the affected machine with success.

sudo dmesg  | grep -i ethernet
[    7.494311] alx 0000:05:00.0 eth0: Qualcomm Atheros AR816x/AR817x Ethernet […]

Add Mainline Repository

This step is needed to install a newer kernel. As time of writing this the latest kernel version of Ubuntu 22.04 LTS is 5.15.0, but the patches only work with some versions. I failed to apply the patches on 5.15.0. I'm to lazy to compile and build the kernel from the sources.

As described in Ubuntu Mainline Kernel Installer:

sudo add-apt-repository ppa:cappelikan/ppa
sudo apt update
sudo apt install mainline

Install Kernel 5.16.xx

After adding the Mainline Repository you can install other kernel versions easily:

sudo mainline --install 5.16.20
sudo systemctl reboot

Note: A list of available versions can be gathered with: mainline --list

Patch the module

Before apply the patch, check the current running kernel version:

uname -r
5.16.20-051620-generic

Apply the patch:

git clone https://github.com/haojunyu/alx_dkms_installer
cd alx_dkms_installer
./setup

Note this repository is a fork of the Upstream / Orign, since the pull request: feat: add 5.16,support ubuntu22.04 is still open. (As time of writing).

Reboot again: sudo systemctl reboot

Check WOL capabilities

sudo ethtool enp5s0 | grep -i wake
        Supports Wake-on: pg
        Wake-on: pg

I'm able to power on the machine via WoL now. Powered it off and could power it on again via WoL.

Final Notes

I also tried the 6.0.9 kernel without patching. Still no WoL. I assume there won't be a fix. This hardware is a way of outdated.

Hannes
  • 76
  • Thanks for this, I'll see if I can try this out at some point. And you are probably right with your assessment, but I personally disagree with this being "way outdated". This chip is part of desktop motherboards that are less than 5 years old and really should not be phased out so quickly. – Xaldew Dec 03 '22 at 14:23
1

Looks like the newer kernel disables WoL on some adapters. Depending on your adapter that can be the case. See:

I have a AR8161 (Qualcomm Atheros AR816x/AR817x) and the same issue after upgrading Ubuntu from 20.04 to 22.04. You can check your adapter with sudo dmesg | grep -i ethernet.

Maybe a newer kernel will fix this or there are patches around which work.

Hannes
  • 76
0

The following solution worked for me after WOL stopped working after upgrading from 20.04 to 22.04

in /etc/tlp.conf set:

WOL_DISABLE=N 

I believe the cause of my issue was when updating to 22.04 the previously existing /etc/tlp.conf file was replaced with a default version which had #WOL_DISABLE=Y

original solution source: https://ubuntu-mate.community/t/wake-on-lan-persistance-issues-22-04/25600/4

additional references:

Trouble with wakeonlan with Ubuntu 20.04

wakeonlan with Ubuntu 20.10 stopped working

  • 2
    This looks okay, but all links are essentially circular "this works" arguments. I've never heard of TLP or /etc/tlp.conf, could you add some actual documentation for what it is? In fact, https://linrunner.de/tlp/ mentions this is a battery saving utility, which doesn't make sense in my case (it's a desktop), why would installing this fix it? – Xaldew Feb 03 '23 at 12:17
  • Additionally, it would probably benefit a lot of users if you included what network adapter you have installed e.g., by running sudo dmesg | grep -I ethernet – Xaldew Feb 05 '23 at 12:45
  • For WOL to work, two things are important: that the hardware supports is and is properly set up, and that software doesn't disable it. I did not consciously install tlp on my Ubuntu 22.04 desktop, but it is in fact installed; it is a dependence of the ubuntu-mate-desktop package.

    In /usr/share/tlp/defaults.conf, the line "WOL_DISABLE=Y" is present, so to prevent WOL from being disabled by tlp it is necessary to add the line "WOL_DISABLE=N" to /etc/tlp.conf.

    This does explain why WOL broke for me after switching to MATE! :-)

    – BertD Nov 14 '23 at 11:13