1

The Wake-on-LAN works in Windows 10 both after sleep mode and after shutting down but it does not work in Ubuntu 18.04 Kernel 5.4.0-58-generic RTL8111/8168/8411. My ethernet card is RTL8111/8168/8411 and the installed driver is r8169 as you can see in the output of the following commands. This is a laptop, if it matters.

#lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic

#uname -r 5.4.0-58-generic

sudo lshw -C network

-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:01:00.0 logical name: enp1s0 version: 15 serial: *********** size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physicatiation configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full ncy=0 link=yes multicast=yes port=MII speed=100Mbit/s resources: irq:16 ioport:3000(size=256) memory:4f804000-4f804fff memory:4

I have noticed that, even though running sudo ethtool -s enp1s0 wol g changes the value of "Wake-on" variable displayed by ethtool from "d" to "g", making this does not make Wake-on-LAN functionality to work. That means, if I take the laptop to sleep mode right after updating the value of "Wake-on" variable from "d" to "g", the computer does not wake up on LAN.

Moreover, if I reboot the computer right after setting the value "g" on the "Wake-on" variable, this variable gets the value "d" back again after a reboot.

Does anyone have any suggestion to fix this?

  • This answer shows you a way to re-enable it after every boot. It was not clear to me if that is the only issue you are having. https://askubuntu.com/a/1051894/243321 if it works, but stops working after a reboot, this will fix that. – Organic Marble Dec 19 '20 at 04:53
  • I improved the explanation of the problem a bit because I realized the explanation was not clear. I hope it is clear now. – thosecars82 Dec 20 '20 at 09:56

2 Answers2

0

Assuming you are using NetworkManager, Try this: get your connection name

sudo nmcli connection show

modify it

sudo nmcli connection modify id "your connection name" 802-3-ethernet.wake-on-lan magic

That will modify your connection profile in /etc/NetworkManager/system-connections

reboot

Jean-Marie
  • 1,958
  • 1
  • 14
  • 11
  • Before trying this out I would like to mention my desktop environment in this case is LXDE. Will your suggested solution work considering LXDE is my desktop environment? – thosecars82 Dec 24 '20 at 08:43
  • I do not know about LXDE, but it probably uses NetworkManager also. Try the first command. if it works, then you are good to go. Anyway it will not break anything. – Jean-Marie Dec 24 '20 at 13:11
  • This did not work for me. I tried your suggestion by typing sudo nmcli connection modify id "Wired connection 1" 802-3-ethernet.wake-on-lan magic and rebooted after doing that. Even though the output of the command nmcli con show "Wired connection 1" | grep wake is 802-3-ethernet.wake-on-lan: magic now, booting on LAN does not work yet. Moreover, for some strange reason, the output of sudo ethtool enp1s0 | grep "Wake" is still ```Supports Wake-on: pumbg Wake-on: d
    
    
    – thosecars82 Jan 08 '21 at 14:52
  • Just in case, after trying the above steps, I also launched sudo nmcli con up id "Wired connection 1 and the output was Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3). This changed the output of sudo ethtool enp1s0 | grep "Wake" to Supports Wake-on: pumbg Wake-on: g Anyway, this did not fix it either. Moreover, after rebooting, the output of sudo ethtool enp1s0 | grep "Wake" got back to Supports Wake-on: pumbg Wake-on: d. – thosecars82 Jan 08 '21 at 15:03
  • I just found nmcli and ethtool display things that look like contradictory: nmcli connection show "Wired connection 1" | grep wake 802-3-ethernet.wake-on-lan: magic 802-3-ethernet.wake-on-lan-password: -- VS ```sudo ethtool enp1s0 | grep Wake-on Supports Wake-on: pumbg Wake-on: d
    
    
    – thosecars82 Jan 11 '21 at 10:10
0

I had the same issue where my ethernet card was not working. I updated the kernel to 5.9 and it worked like a charm.

John Hart
  • 31
  • 2