Question Wake on LAN with PCIe NIC on Ubuntu 24.04 Server ?

anvoice

Honorable
Jan 12, 2018
147
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.
 
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.
 
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.
Interesting info. I don't think these fancy outlets can actually power on a computer: they just cut or supply power, which is fine for turning on a lamp or something with a permanent on switch, but not sure how that would work with a computer that needs to be switched on via a button or something like the WOL command.

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.
The description states it supports WOL. Also, I should have mentioned this earlier, but I have the WOL flag set to "g" via startup service during boot, so it's always on. Fast boot is disabled. Not sure what else to try.
 
Last edited:
Interesting info. I don't think these fancy outlets can actually power on a computer: they just cut or supply power, which is fine for turning on a lamp or something with a permanent on switch, but not sure how that would work with a computer that needs to be switched on via a button or something like the WOL command.


The description states it supports WOL. Also, I should have mentioned this earlier, but I have the WOL flag set to "g" via startup service during boot, so it's always on. Fast boot is disabled. Not sure what else to try.
There is a option in almost every bios that talk about boot on power restore. It has different names.

It would be used say if you had a power failure and when the power is restored it will boot.

It is like wake on lan it is some special hardware function on the motherboard but it is much simpler.

We used it all the time on server racks. I have used exactly this method on one of my machine when I needed to reboot it remotely. Wake on WAN/internet does not exist so the only way I had to restart a machine when I was away from home was with one of these plugs.
 
There is a option in almost every bios that talk about boot on power restore. It has different names.

It would be used say if you had a power failure and when the power is restored it will boot.

It is like wake on lan it is some special hardware function on the motherboard but it is much simpler.

We used it all the time on server racks. I have used exactly this method on one of my machine when I needed to reboot it remotely. Wake on WAN/internet does not exist so the only way I had to restart a machine when I was away from home was with one of these plugs.
Didn't know that, thanks! I'll look into that, although I haven't lost all hope of getting WOL to work.

On a small side note, my main interest is indeed "wake on WAN". I was going to create a service on my router to which I would VPN and then send the WOL packet to the computer. Assuming WOL ever works of course.
 
Depends on the router asus has the ability to do that in is factory feature set. The other issue I have "lately?" is bios manufactures now support a lot of the microsoft sleep/suspend modes. These seem to over ride the WOL bios settings. I think that is part of why it is very flaky at times.

Many people can use the low power options and the machine will not use much more power than if you turn it off.

The other trick I found is you can use the sleep option rather than shutdown. You can then turn off the power physically. When it boots it will reload all the applications that were active. You still need the boot on power option in the bios.