7

WOL was working great on Bionic until yesterday's kernel update. How to diagnose/recover it?

Edit: if set to boot from 4.15.0-23 kernel it works. If set to boot from 4.15.0-24 it does not.

Edit2: WoL can be enabled with

sudo ethtool -s [card] wol g

but it isn't persistent. Searching for how to set it every boot.

Edit3: Per a comment by Kai-Heng Feng on this bug report this was an advertent change! (and therefore not a bug)

This is because the fix of LP: #1752772 has one commit [1] that disables WoL by default.
Set WoL explicitly should solve your issue.

[1] https://github.com/torvalds/linux/commit/7edf6d314cd061e1d0a1b7bc0b511d64322c3f72
Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • 2
    There seems to be another kernel update, linux 4.15.0-25.27, on the way: https://lists.ubuntu.com/archives/bionic-changes/2018-July/date.html. Maybe that'll fix things? But I don't know if there's some sort of changelog for you to look at. – DK Bose Jul 03 '18 at 14:23
  • 1
    You can boot an older kernel version from the Advanced Options menu in GRUB – You'reAGitForNotUsingGit Jul 03 '18 at 15:43

2 Answers2

13

To make this persistent I created a script in /etc/network/if-up.d

#!/bin/sh

/sbin/ethtool -s [card] wol g

This re-enables WoL every boot.

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • 1
    This worked for me – user2686101 Jul 07 '18 at 14:18
  • 1
    You may be interested that Arch Linux lists 9 ways to make it persistent (except your method :)): https://wiki.archlinux.org/index.php/Wake-on-LAN – WinEunuuchs2Unix Jul 08 '18 at 18:15
  • 2
    Now there are 10! – Organic Marble Jul 08 '18 at 18:18
  • This didn’t work for me in Ubuntu 22.04. However, I was able to create a crontab entry that does the same thing: In the terminal, enter "sudo crontab -e", then enter the line "@reboot /sbin/ethtool -s [card] wol g" where [card] is replaced with the network interface controller (enp4s0 in my case) found by running "ip a". – James Nov 22 '23 at 05:13
2

It seems that Wol is disabled by default in the r8169 module for now, and now we must use userspace tools like ethtool to get it: #1752772 and r8169 ethernet card don't work after returning from suspension. See also Wake-on-lan Ubuntu support on getting Wake-on-lan persistent on boot. Or just use nm-connection-editor in Network-manager for that.

pelm
  • 21
  • 3