You are not logged in.

#1 2025-07-26 00:28:02

VoltPleiar
Member
Registered: 2021-03-07
Posts: 13

Setting up wake on lan will be fun, they said.

Hi, I've been recently taking upon the task to set up wake on lan WOL on my system. Only to find out I don't have the 50-wired.link file! I have a 20-ethernet.network file and it points me to multiple bug posts on the arch forums, because apparently it's not optimal to have it match with Type=ether so I really want to set it up properly as well, and I've only noticed this because the guide to set up WOL tells me to add a line to it so it supports the wakeonlan=magic. So here's the 20-eth file if that helps:

[Match]
# Matching with "Type=ether" causes issues with containers because it also matches virtual Ethernet interfaces (veth*).
# See https://bugs.archlinux.org/task/70892
# Instead match by globbing the network interface name.
Name=en*
Name=eth*

[Link]
RequiredForOnline=routable

[Network]
DHCP=yes
MulticastDNS=yes

# systemd-networkd does not set per-interface-type default route metrics
# https://github.com/systemd/systemd/issues/17698
# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband.
# Use values from NetworkManager. From nm_device_get_route_metric_default in
# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c
[DHCPv4]
RouteMetric=100

[IPv6AcceptRA]
RouteMetric=100

As my OSU profile says, I'm a professional dweeb.

Offline

#2 2025-07-26 05:53:58

progandy
Member
Registered: 2012-05-17
Posts: 5,283

Re: Setting up wake on lan will be fun, they said.

The network file is set up properly, the comments only explain why it is set up with the name match instead of type match.

As for WOL, you will have to create the .link file and create all of the configuration shown in the example.
Start by copying /usr/lib/systemd/network/99-default.link as described in the note, change the match to match the correct interface and add the wol line.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#3 2025-07-26 06:07:59

seth
Member
Registered: 2012-09-03
Posts: 66,287

Re: Setting up wake on lan will be fun, they said.

20-ethernet.network is on the arch installation iso, why is that on your disk?
The idea would be to add the suggested 50-wired.link - make sure to also read the rest of the article to verify that your ethernet NIC is actually WOL capable resp. the feature allowed in the BIOS/UEFI and to chose the proper method.

Edit: F5ck

Last edited by seth (2025-07-26 06:08:25)

Online

#4 Yesterday 21:42:12

VoltPleiar
Member
Registered: 2021-03-07
Posts: 13

Re: Setting up wake on lan will be fun, they said.

I installed Arch via the Archinstall script, maybe that's why it's that way? So do I create the .link file by hand? Also the files under ~/systemd/network are just [20-ethernet.network  20-wlan.network  20-wwan.network] So there's no 99-default.link file.


As my OSU profile says, I'm a professional dweeb.

Offline

#5 Yesterday 21:47:25

seth
Member
Registered: 2012-09-03
Posts: 66,287

Re: Setting up wake on lan will be fun, they said.

I installed Arch via the Archinstall script, maybe that's why it's that way?

Most hopefully not.

So do I create the .link file by hand?

Using a text editor will likely work better tongue

Also the files under ~/systemd/network are

~/systemd/network is in your users $HOME - you're not supposed to have that path nor any files there.

To be clear, when you're talking about "the guide" you're talking about https://wiki.archlinux.org/title/Wake-on-LAN ?

Online

#6 Yesterday 21:53:45

VoltPleiar
Member
Registered: 2021-03-07
Posts: 13

Re: Setting up wake on lan will be fun, they said.

Seth wrote:

To be clear, when you're talking about "the guide" you're talking about https://wiki.archlinux.org/title/Wake-on-LAN ?

Yes, that's exactly what I was referring to.

Seth wrote:

Using a text editor will likely work better tongue

Haha yes! I mean using a text editor, I'm not about to hand-crank a power generator to make my own current to build the source code from scratch using nothing but a single button (story goes on for probably more than I should let my creativity go)


Seth wrote:

~/systemd/network is in your users $HOME - you're not supposed to have that path nor any files there.

So am I just on the wrong file? That would be absolutely comical.


As my OSU profile says, I'm a professional dweeb.

Offline

#7 Yesterday 21:59:23

seth
Member
Registered: 2012-09-03
Posts: 66,287

Re: Setting up wake on lan will be fun, they said.

There's not gonna be a /etc/systemd/network/50-wired.link

ls /etc/systemd/network/
ls ~/systemd/network/

Online

#8 Yesterday 22:03:21

VoltPleiar
Member
Registered: 2021-03-07
Posts: 13

Re: Setting up wake on lan will be fun, they said.

Well, now we have a sorta newbie question here, what exactly is the ~ supposed to mean? Because I know I did type ~/systemd/network but I really meant /etc/systemd/network/ sorry for the confusion.
I though the ~ was short for on that path or something. That's a mistake I won't make twice.

Last edited by VoltPleiar (Yesterday 22:04:10)


As my OSU profile says, I'm a professional dweeb.

Offline

#9 Yesterday 22:08:07

seth
Member
Registered: 2012-09-03
Posts: 66,287

Online

#10 Yesterday 22:09:43

VoltPleiar
Member
Registered: 2021-03-07
Posts: 13

Re: Setting up wake on lan will be fun, they said.

TL.DR.: I need to make the .link file with Vim, but now how do I exit Vim?


As my OSU profile says, I'm a professional dweeb.

Offline

#11 Yesterday 22:25:39

seth
Member
Registered: 2012-09-03
Posts: 66,287

Online

Board footer

Powered by FluxBB