wake on lan on pve

Beau

New Member
Mar 24, 2023
9
0
1
Hi I am trying to get wake on lan to work it is enabled in bios
are there settings I need to set on the network card in Linux?
 
Hi,

can you provide the output of pveversion -v and ethtool <interface-name> | grep Wake-on?
<interface-name> must be the name of the physical network interface.

Especially the latter command is important - that retrieves the current Wake-on-LAN settings from the network card. It is totally possible that you need to correctely configure Wake-on-LAN, as there are a few flags/modes it supports.
 
Hi Christoph,
here is the output
proxmox-ve: 7.4-1 (running kernel: 5.15.102-1-pve)
pve-manager: 7.4-3 (running version: 7.4-3/9002ab8a)
pve-kernel-5.15: 7.3-3
pve-kernel-5.15.102-1-pve: 5.15.102-1
pve-kernel-5.15.85-1-pve: 5.15.85-1
pve-kernel-5.15.74-1-pve: 5.15.74-1
ceph-fuse: 15.2.17-pve1
corosync: 3.1.7-pve1
criu: 3.15-1+pve-1
glusterfs-client: 9.2-1
ifupdown2: 3.1.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-1
libknet1: 1.24-pve2
libproxmox-acme-perl: 1.4.4
libproxmox-backup-qemu0: 1.3.1-1
libproxmox-rs-perl: 0.2.1
libpve-access-control: 7.4-2
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.3-4
libpve-guest-common-perl: 4.2-4
libpve-http-server-perl: 4.2-1
libpve-rs-perl: 0.7.5
libpve-storage-perl: 7.4-2
libspice-server1: 0.14.3-2.1
lvm2: 2.03.11-2.1
lxc-pve: 5.0.2-2
lxcfs: 5.0.3-pve1
novnc-pve: 1.4.0-1
proxmox-backup-client: 2.3.3-1
proxmox-backup-file-restore: 2.3.3-1
proxmox-kernel-helper: 7.4-1
proxmox-mail-forward: 0.1.1-1
proxmox-mini-journalreader: 1.3-1
proxmox-widget-toolkit: 3.6.4
pve-cluster: 7.3-3
pve-container: 4.4-3
pve-docs: 7.4-2
pve-edk2-firmware: 3.20230228-1
pve-firewall: 4.3-1
pve-firmware: 3.6-4
pve-ha-manager: 3.6.0
pve-i18n: 2.11-1
pve-qemu-kvm: 7.2.0-8
pve-xtermjs: 4.16.0-1
qemu-server: 7.4-3
smartmontools: 7.2-pve3
spiceterm: 3.2-2
swtpm: 0.8.0~bpo11+3
vncterm: 1.7-1
zfsutils-linux: 2.1.9-pve1


Supports Wake-on: pumbg
Wake-on: g
 
Thanks for the output!

Looking at the ethtool output, only "wake on magic packet activity" is currently enabled. Wake-on-LAN in general is a very finicky thing, and this might or might not work.

From personal experience, you might need enable set the p-flag as well, by executing ethtool -s <interface-name> wol pg.

The ArchWiki has a great page about Wake-on-LAN. To make the above setting permanent, I'd suggest using systemd-link.

Also, how did you try to wake the machine? (E.g. used tool etc.)

Hope this helps!
 
Hi I know it eno1

look at

[Match]
MACAddress=aa:bb:cc:dd:ee:ff

[Link]
NamePolicy=kernel database onboard slot path
MACAddressPolicy=persistent
WakeOnLan=magic

how do I find what I need to enter here NamePolicy=kernel database onboard slot path ?
 
First you need to retrieve the MAC address of the interface using ip link show eno1.

After that, create /etc/systemd/network/90-wakeonlan.link with the following contents:
Code:
[Match]
MACAddress=<mac-address-here>

[Link]
NamePolicy=kernel database onboard slot path
MACAddressPolicy=persistent
WakeOnLan=phy magic

Be sure to replace <mac-address-here> above with the actual MAC address from the before-mentioned command output.
 
Hi I
I have created the file after a reboot it is like the file is not being used do I need to start something?
or do I need to put something here NamePolicy=kernel database onboard slot path
 
Last edited:
Hi,

I have created the file after a reboot it is like the file is not being used do I need to start something?
1. Have you created it with the same filename as I suggested above? For systemd-link, esp. the extension .link is important - otherwise it won't be recognized.

2. Did you look at the ethtool output to see it worked?
If you just tried using Wake-on-LAN, it might fail due to different issues. If that is the case, what tool did you use to wake the machine up? And with what parameters.

or do I need to put something here NamePolicy=kernel database onboard slot path
No, that line is fine and is supposed to be like that. It just tells systemd-link if and how the interface should be renamed, such that the name is predictable.

Wake-on-LAN support unfortunately is more often than not rather a hit-and-miss, especially with consumer hardware where the manufacturers don't care that much.
 
hi
Code:
root@pve:/etc/systemd/network# ls
90-wakeonlan.link
root@pve:/etc/systemd/network#

Code:
root@pve:/etc/systemd/network# ethtool eno1  | grep Wake-on
        Supports Wake-on: pumbg
        Wake-on: g

it should p and g
 
I was recently trying to tackle this issue with a test PC I was messing with and came to the resolution below. Some of the steps were specific to my MSI board. I hope this helps. [REFERENCE]

Note: The Wake Up event features on the motherboard must be enabled first!

  • Set "ERP Ready" as Disabled in the BIOS Power Management menu. e.g. For MSI motherboard go to Settings => Advanced=> Power Management Setup=> ERP Ready [Disabled]
  • Enable “Resume By PCI or PCI-E Device” in the Wake Up Event Setup. e.g. go to Settings=> Advanced=> Wake Up Event Setup=> Resume By PCI-E Device [Enabled] and Resume By USB Device [Enabled] (Optional)
  • Boot into Proxmox, determine the actual physical NIC adapter name and modify the interfaces file so that wol will be permanent upon boot-up
  • Open a shell prompt and type ip addr; look through the list for the physical adapter name. It should match the physical MAC address displayed in the BIOS; replace <interface name> with the actual name of your physical NIC
  • Install ethtool (version 8.x will have it preinstalled) via CLI apt install ethtool -y
  • Check for wol status by selecting the physical NIC via CLI ethtool <interface name> e.g. Wake-on: pumbg, “g” means WOL is supported
  • Enable WOL on that interface via CLI ethtool -s <interface name> wol g
  • Make change permanent, add line below to the label of the physical interface; edit file => nano /etc/network/interfaces include => post-up /sbin/ethtool -s <interface name> wol g (don't include < >)
  • Save changes, exit, and restart server to test. After startup, verify the change is permanent (as above, look for “g”) execute in CLI ethtool <interface name>
Confirm that wol is enabled and the magic packet is received. Power off the server. Login to the router or use a wol app and attempt to turn on the server via the physical MAC address. Note: The link light of the Ethernet port on the router / switch will remain On; even when the server is powered off.
 
  • Like
Reactions: proxmoxajin
I'm still struggling with this. Followed all the steps here, network lights still go off.
Must be something in the bios.
Interface file has post-up /sbin/ethtool -s <interface name> wol pg (wasn't sure where to put this in the file though)

added the pg and shows

Supports Wake-on: pumbg
Wake-on: pg
Created this file
root@pve:/etc/systemd/network# ls
90-wakeonlan.link

Under options in the gui I also added the mac to wakeonlan.
My other 3 proxmos nodes had no issue with no configuration like this. Different motherboards though.
This pc used to be able to wol with a windows OS on it a while back.
Something has changed for sure
 
Got it fixed - somehow changing ”EUP Function”[Disabled]" - from enabled.

But now sometimes it is not shutting down. shutdown and reboots after
 
Last edited:
I had problem with motherboard onboard Nic not working well (despite vendors website and inside bios saying it would). Bought a separate dedicated NIC RTL8125B that explicitly was listed WOL, and then used that as separate NIC, for local node communication only, not internet.
The motherboard Nic remains for internet access. Now the WOL sent directly to RTL8125B works like a charm and no surprise reboots.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!