You are not logged in.
Hello,
I wish to enable wake-on-LAN on my PC.
Running `sudo ethtool enp3s0`, I get:
```
Supports Wake-on: pumbg
Wake-on: d
```
Then I ran `sudo ethtool -s enp3s0 wol g`, and now get
```
Supports Wake-on: pumbg
Wake-on: g
```
After rebooting my PC, I find `Wake-on: d` back again.
The problem is how to set it permanently to `g`. Through [this](https://www.youtube.com/watch?v=2vP7z0X0NUc) video, the file `/etc/network/interfaces` is modified to contain `up ethtool -s eth0 wol g`. In arch the file and directory are different. Through googling `/etc/netctl/` seems to be what I am looking for, but the syntax of `/etc/netctl/examples/ethernet-custom` is different. I found [this](https://bbs.archlinux.org/viewtopic.php?id=51716) but I don't get how to benefit from it.
The closest resource is our beloved [arch-wiki](https://wiki.archlinux.org/title/Netctl), Section 4.6 Using hooks of Netctl page. However I am not sure whether this is the right way, or even how to exactly use it.
In brief, how do I permanently set `wake-on: g` on my network interface configurations?
Offline
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It is embarrassing how I did not find Wake-on-LAN page on arch wiki.
In that page, I tried 2.2.5 netctl method, but using only example 4.1.1 https://wiki.archlinux.org/title/Netctl … e_profiles
I have my_wol in /etc/netctl with:
Description='For Wake-on-LAN'
Interface=enp3s0
Connection=ethernet
IP=dhcp
#DHCPClient=dhcpcd
#DHCPReleaseOnStop=no
## for DHCPv6
#IP6=dhcp
#DHCP6Client=dhclient
## for IPv6 autoconfiguration
#IP6=stateless
upon running `netctl start my_wol` I get
```
Job for netctl@my_wol.service failed because the control process exited with error code.
See "systemctl status netctl@my_wol.service" and "journalctl -xeu netctl@my_wol.service" for details.
```
the systemctl logs are:
```
Dec 31 20:18:54 touny-pc systemd[1]: Starting Networking for netctl profile my_wol...
Dec 31 20:18:54 touny-pc network[3839]: Starting network profile 'my_wol'...
Dec 31 20:18:54 touny-pc network[3839]: The interface of network profile 'my_wol' is already up
Dec 31 20:18:54 touny-pc systemd[1]: netctl@my_wol.service: Main process exited, code=exited, status=1/FAILURE
Dec 31 20:18:54 touny-pc systemd[1]: netctl@my_wol.service: Failed with result 'exit-code'.
Dec 31 20:18:54 touny-pc systemd[1]: Failed to start Networking for netctl profile my_wol.
```
The method of nmcli, while seems simpler and more robust, didn't influence `Wake-on: d` of `sudo ethtool enp3s0` Eventhough I got `802-3-ethernet.wake-on-lan: magic` upon running `nmcli c show "wired1" | grep 802-3-ethernet.wake-on-lan` after rebooting.
I have found this post: https://bbs.archlinux.org/viewtopic.php?id=180068 but it did not help
Last edited by mostafatouny (2022-12-31 18:38:55)
Offline
After tinkering for a little bit, I got `Dec 31 20:48:25 touny-pc network[2881]: DHCP client 'dhcpcd' is not installed or not ready`
It seems what I am aspiring to do is out of my skills. Thank you @Trillby
Offline
After tinkering again, the method of systemd.link worked! I get `wake-on: g` immediately after booting up. Thank you again @Trillby
Offline