SOLVED: Wake on lan disabled every reboot

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post please read how to get help
Locked
mm1992
Level 1
Level 1
Posts: 23
Joined: Mon Jan 01, 2018 1:33 pm

SOLVED: Wake on lan disabled every reboot

Post by mm1992 »

I used to have my computer set to wake on lan. Recently (well, sometime within the past few months. For a while I was using a laptop to bridge wifi to ethernet and assumed that was the issue, but now I'm plugged into an orbi satellite) the wake on lan has gotten disabled. I checked BIOS, and there is nothing there to enable/disable it. Some googling led me to

Code: Select all

myles@Myles-PC:~$ sudo ethtool enp3s0 | grep Wake-on
	Supports Wake-on: pumbg
	Wake-on: d
so I run this:

Code: Select all

myles@Myles-PC:~$ ethtool -s enp3s0 wol g
And then I get this:

Code: Select all

myles@Myles-PC:~$ sudo ethtool enp3s0 | grep Wake-on
	Supports Wake-on: pumbg
	Wake-on: g
It works then, until I reboot. Then it goes back to how it was before. So I tried "sudo nano /etc/network/interfaces" and adding the "ethtool enp3s0 | grep Wake-on" as the last line in that file. That didn't work. How do I enable WOL to be enabled after every reboot?
Last edited by SMG on Thu Mar 10, 2022 1:57 pm, edited 2 times in total.
Reason: Locked 2-yr-old SOLVED topic to prevent future "re-awakenings".
rene
Level 19
Level 19
Posts: 9716
Joined: Sun Mar 27, 2016 6:58 pm

Re: Wake on lan disabled every reboot

Post by rene »

I believe that the correct way these days, certainly a way, is creating as root a file e.g. /etc/systemd/system/wol@.service consisting of

Code: Select all

[Unit]
Description=Wake-on-LAN (%i)
Requires=network.target
After=network.target

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

[Install]
WantedBy=multi-user.target
and enabling it via systemctl enable wol@enp3s0.

Ubuntu has switched to different network-management infrastructure ("netplan") than Mint so it's a little messy. The new stuff might have another and more native method available but certainly this would work anywhere.
mm1992
Level 1
Level 1
Posts: 23
Joined: Mon Jan 01, 2018 1:33 pm

Re: Wake on lan disabled every reboot

Post by mm1992 »

Thank you, that did the trick.
Shardann
Level 1
Level 1
Posts: 1
Joined: Sat Apr 24, 2021 4:36 am

Re: SOLVED: Wake on lan disabled every reboot

Post by Shardann »

Thank you rene, it worked for me too..
Charlymint
Level 1
Level 1
Posts: 1
Joined: Thu Mar 10, 2022 1:38 pm

Re: SOLVED: Wake on lan disabled every reboot

Post by Charlymint »

Thx a lot !!

Worked like a charm...

Charly
Locked

Return to “Networking”