2

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
  • 123

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
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