Question Wake on LAN with PCIe NIC Ubuntu 24.04 server.

anvoice

Honorable
Jan 12, 2018
145
11
10,615
[Moderator Note: Moving thread from Systems to Networking - Edited question to include Ubuntu 24.04 server.]

Because the 2.5Gbe port on my motherboard went bad, I had to replace with a PCIe NIC (RTL8125B PCI Express). The NIC works, but unlike my motherboard port, doesn't wake on LAN. I've read conflicting answers on how this works with PCIe cards: some say the motherboard will power the built-in NIC in the off state but not the PCIe one, thus no ability to wake on LAN with PCIe. Others say the connection are the same for the built-in NIC (to PCI or PCIe), just that the built-in ones are non-removable. I've read about success stories of people using wake on LAN with these PCIe NICs as well, so it should be possible.

The system is running Ubuntu 24.04 server. The motherboard is a Gigabyte x570 Aorus Master. Wake on LAN is enabled in the BIOS, although I did not find any options regarding specifically "wake on PCIe events". The previous built-in adapter did indeed turn the system on from sleep, just not this one.

I also made sure that the system gets the magic packet in the on state by using sudo nc -ul -p 9 and sending the magic packet: the packet is received.

Question: Does anyone have an idea of what might be going wrong? Am I wasting time trying to get this to work?
 
Last edited by a moderator:
I never looked into the details of how this actually works at the chip level.

So when your machine is in standby there is a small amount of 5 volt power. This is what the built in ethernet chip runs on. The pcie slot also has a connection to this power. So in theory at least a pcie ethernet card can be powered.

What I never saw in detail is how the ethernet chip actually tells the machine to power on. The CPU is not running so this is some kind of hardware on the motherboard. My guess would be it somehow would in effect connect the same pins the power switch connects to on the motherboard. Not that I have any proof it works that way. For it to work on the PCIE card there would have to be some kind of special pin that would then connect to the circuits that in effect push this button. This all hardware stuff it is not even the BIOS at this level. The bios doesn't run until the cpu comes on.

We used to use wake on lan to try to turn on test racks of servers. It was extremely flaky. It has been made much worse now that motherboard support microsofts proprietary forms of sleep/low power stuff. Even though you are running linux the motherboard has speical support.

We went to using the bios option that does boot on power restore. This used to be expensive to use power controllers to turn the power on and off remotely but now days every home improvement store sell electical outlets you can turn on and off remote. If you really want you can even access these from the internet where wake on lan you can't. This tends to work very well unlike wake on lan where you had to send mulitple packets manytimes to get it to wake.

Maybe someone know if you can make a pcir ethenret card do wake on lan but it will be much simpler to just use fancy electrial outlets.
 

lantis3

Distinguished
Nov 5, 2015
537
82
18,970
Wake on LAN is enabled in the BIOS, although I did not find any options regarding specifically "wake on PCIe events". The previous built-in adapter did indeed turn the system on from sleep, just not this one.
BIOS setting is for onboard NIC, has nothing to do with add-on NIC


You might need to contact vendor to see if your add-on NIC supports WOL.