Article 5QXV2 Wake on lan works with Windows 10 but not with Proxmox (debian 11-based)

Wake on lan works with Windows 10 but not with Proxmox (debian 11-based)

by
9bit
from LinuxQuestions.org on (#5QXV2)
Hi All,

I confirmed that Wake On Lan (WOL) works with Windows 10 Pro on a Lenovo ThinkStation P310 with onboard Intel I219-LM GB Ethernet controller. I had to make some changes in the adapter settings (eg. disable "reduce speed on power down") and the UEFI BIOS to make it work. I was able to wake up the system from a "Hibernate" or "Sleep" mode by sending a magic packet from another windows host. All good up to here.

I then installed Proxmox 7 (5.11.22-4-pve, which is Debian 11-based) on the same hardware. I can't get WOL to work with Proxmox, no matter what. At this point I am not sure if it is a configuration issue or a BUG?
  • The BIOS (is up-to-date) supports WoL and is enabled.
  • The NIC supports WoL and is (/was already correctly) enabled and set to "g".
Things I tried:
  1. Updated cat /etc/network/interfaces so that at every boot, it sets the vmbr0 interface's wol to "g", using ethtool (see #1 below).
  2. Created script to bring the ethernet interface eno1 down properly at shutdown, based on this bug (see #2 below).
  3. I also created a systemd service "wol.service", to also set the eno1 interface's wol to "g", using ethtool (see #3 below).
  • When the machine is powered on, I successfully tested receiving magic packets using netcat.
  • When the machine is powered off, and I send magic packets using apps like "wol" (from a windows host), an android app (landroid), I understand that they are reaching the NIC as I can see the ethernet port flashing, but the machine doesn't boot...
  • I tried sending packets to the combination of host's MAC and IP (as well as broadcast to 255.255.255.255), ports 7,9,4343,4000,etc. no luck.
Any suggestions?

<------FYI:------>

[#1] Updated cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
address 192.168.1.16/28
gateway 192.168.1.1
bridge-ports eno1
bridge-stp off
bridge-fd 0
post-up /sbin/ethtool -s eno1 wol g

[#2] Created script to bring the ethernet interface down properly at shutdown
vi /etc/rc6.d/wol_poweroff.sh
cp /etc/rc6.d/wol_poweroff.sh /etc/rc0.d/wol_poweroff.sh

Script wol_poweroff.sh contains:
#!/bin/bash
ifconfig eno1 down
poweroff

Finally changed permissions to make it executable:
sudo chmod 755 /etc/rc0.d/wol_poweroff.sh && sudo chmod 755 /etc/rc6.d/wol_poweroff.sh

[#3] vi /etc/systemd/system/wol.service
[Unit]
Description=Wake-on-LAN for eno1
Requires=network.target
After=network.target

[Service]
ExecStart=/sbin/ethtool -s eno1 wol g
ExecStop=/sbin/ethtool -s eno1 wol g

[Install]
WantedBy=multi-user.target
----------------------------------------------------------
Loaded: loaded (/etc/systemd/system/wol.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Mon 2021-10-18 23:10:52 CEST; 1min 57s ago
Process: 950 ExecStart=/sbin/ethtool -s eno1 wol g (code=exited, status=0/SUCCESS)
Process: 955 ExecStop=/sbin/ethtool -s eno1 wol g (code=exited, status=0/SUCCESS)
Main PID: 950 (code=exited, status=0/SUCCESS)
CPU: 2ms

Oct 18 23:10:52 pve systemd[1]: Started Wake-on-LAN for eno1.
Oct 18 23:10:52 pve systemd[1]: wol.service: Succeeded.

System info

root@pve:~# ethtool eno1
Settings for eno1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
MDI-X: off (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes

root@pve:~# lspci -knn
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I219-LM [8086:15b7] (rev 31)
DeviceName: Onboard LAN
Subsystem: Lenovo Ethernet Connection (2) I219-LM [17aa:30c0]
Kernel driver in use: e1000e
Kernel modules: e1000e

root@pve:~# dmesg | grep e1000e
[ 1.469484] e1000e: Intel(R) PRO/1000 Network Driver
[ 1.469576] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 1.470520] e1000e 0000:00:1f.6: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[ 1.549647] e1000e 0000:00:1f.6 0000:00:1f.6 (uninitialized): registered PHC clock
[ 1.615577] e1000e 0000:00:1f.6 eth0: (PCI Express:2.5GT/s:Width x1) 4c:cc:6a:a0:ea:33
[ 1.615689] e1000e 0000:00:1f.6 eth0: Intel(R) PRO/1000 Network Connection
[ 1.615845] e1000e 0000:00:1f.6 eth0: MAC: 12, PHY: 12, PBA No: FFFFFF-0FF
[ 1.616657] e1000e 0000:00:1f.6 eno1: renamed from eth0
[ 8.801029] e1000e 0000:00:1f.6 eno1: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx

BIOS Information
Vendor: LENOVO
Version: FWKTB8A
Release Date: 06/07/2021
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 16 MB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25"/1.2 MB floppy services are supported (int 13h)
3.5"/720 kB floppy services are supported (int 13h)
3.5"/2.88 MB floppy services are supported (int 13h)
Print screen service is supported (int 5h)
8042 keyboard services are supported (int 9h)
Serial services are supported (int 14h)
Printer services are supported (int 17h)
ACPI is supported
USB legacy is supported
BIOS boot specification is supported
Targeted content distribution is supported
UEFI is supported
BIOS Revision: 1.184
Firmware Revision: 1.22

Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: LENOVO
Product Name: 30ASS0ME1R
Version: ThinkStation P310latest?d=yIl2AUoC8zA latest?i=BpNYW83IrDY:GLT5rpLisxE:F7zBnMy latest?i=BpNYW83IrDY:GLT5rpLisxE:V_sGLiP latest?d=qj6IDK7rITs latest?i=BpNYW83IrDY:GLT5rpLisxE:gIN9vFwBpNYW83IrDY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments