Some motherboards disable power to their ethernet port upon sleep and so WoL will not work.
This is particularly common if the NIC is a power hungry 10GbE port.
However, in the particular case I found, the motherboard also disables oower to any usb GigE adapter attached.
The solution I found was to attach a USB hub with SD slots and integrated GigE port. As SD cards require power to remain mounted, the motherboard did not shutdown power to this adapter and WoL worked.
20 years ago, I used to have a Linux server running Slackware at home, that would wake up the two PCs we had at home to back up their data if they were turned off.
If they were already turned on, they would send a WOL packet to the Linux server to turn it on in case the that server was off, and then start the backup routine. And the last one would tell the Linux server to turn-off itself. It used to work really great, good times.
Note: If you're going to use an SBC _only_ for wake up signals, you might want to look into alternatives for the RPi such as the Radxa RockPi S [1]. My home server, for example, runs continuously at 7W, which beats many RPi models. Of course, a Pi to wake things doesn't need that much power and could be an older model, but even then, you'd still be burning "empty Watts".
Of course, the RockPi doesn't give you any KVM like functionality, though.
I did this recently as I was struggling to get WoL to work with my consumer PC. It seems like this ultra low-level stuff is a total crapshoot so if you can dodge it by just wiring up the power button, that's a good option.
In in the end I just went the whole hog and set up a PiKVM, so now if I mess up the machine's networking (or even completely break the OS) I can still recover it remotely even though it doesn't have a proper BMC or anything like that.
In general this approach seems ugly in principle but I really like it in practice. It lets you retrofit solid remote capabilities onto consumer hardware. That way you have such a broader market to buy from.
That's what I was thinking too. My home server consumes like 15 W and is silent.
If you get a rack mounted server made for data centers and stick it in a closet so you can't hear it then yes, i guess this approach makes sense.
How do you accurately measure how much current a PC is drawing at any given time? Do you have some kind of measurement device inline with the power cord?
I would be tempted to try using the Pi as a router & firewall with the server on another subnet, having it wake the server using traditional WOL as needed. That feels simpler to me and more controlled. But my overall feeling is that not much power is saved here overall compared to a well set up server. Good project though quite educational.
You could set a calendar schedule for waking up itself and backing up the clients, and at night the server would go into standby only if no clients were running anymore since X minutes.
Mine idles at around 130W from the walls. I think it's mostly the hard drives, maybe the SAS controller. I've migrated a few services to a miniPC and started turning it off too.
The main issue for me is the heat. I've got it next to me and 130W of heat adds up in the summer.
Do you usually run it full tilt? What's it typically using on average? I've forgotten how much mine averages, I only remember being surprised how little it sips because it's mostly idle.
It's surprising because reddit (and HN) would make you think you're throwing away tons of money unless you go with some tiny ARM board and that's not true.
Are you talking about processor's C-states? My old 6th gen i3 stays most of the time idling around C8, averaging 5w, really impressive, I suppose newer gens will be even more efficient
C8 is a good state if you can get it. Intel is really good at this. They don't even bother energizing the L3 caches immediately when exiting deep package C-states. But there are lots of conditions that will inhibit C8, notably an Ethernet link on a NIC capable of PTP. This is why wireless is better.
If one can afford a GPU with a MSRP of $1999 and was scalped for $2999 during the initial craze, you are probably not struggling to pay your electric bill.
You can use nvidia-smi to set a target maximum power draw and performance mode to bring idle power levels down. Also make sure your computer is using the server/headless mode driver to keep idle power consumption down.
1W is a unicorn as just plugging in a power supply with no PC parts hooked up will register 1W. <10W is more realistic. Select a PC that can run off a laptop charger. Check manufacturer spec sheets for the idle power consumption. Don't install any PCIe cards or hard drives. Use powertop --autotune.
Only put the RAM you need in the box, use peripherals with working ASPM, attach them to the northbridge PCI ports instead of the CPU's root ports, use wireless instead of wired networking, and don't attach a display.
Chiplet based Ryzen CPUs inherently have higher idle power draw. Monolithic chips like 5600G have lower idle power draw. The motherboard, power supply, and internal peripherals all need to be carefully selected to get a really low idle figure.
Whatever software you are using is totally, utterly broken. Not sure what else I can tell you. Even a completely decked out Ryzen AI Max Pro 395 idles at 5W in Windows S0 (see: https://h20195.www2.hp.com/v2/getpdf.aspx/c09133726.pdf)
Indeed. Frankly, that would be a nice standardized solution to your machine register itself on a Bonjour Sleep Proxy and can be cheaper than Pi with a used AppleTV off of eBay.
Nothing to stop you setting that up on the secondary device to trigger the listen/wake scripts, but if someone malicious is on your local network and has permission to trigger WOL, chances are you have bigger issues.
All this complexity to save a few bucks per year on your electricity bill? This is ridiculous, the Pi costs far more than what you can be expected to save.
I think it turned out a lot more complicated than the author expected, but that their solution they kindly wrote up will be pragmatic for someone.
(For example, imagine a big home GPU server that is needed only intermittently, and you want it to spin up automatically on network traffic from family's various devices that you can't modify.)
Of course, if you have simpler needs, and you're willing to send a WOL magic packet from the using devices, you can do in a few lines of shell script. It's a 1-line ssh-to-something-that-can-etherwake-on-that-vlan script, then wait in a loop for the service you need to appear, then 1-line ssh-to-server-to-shutdown when you're done.
In many European countries electricity is quite expensive. In the U.K. for example, running 20 watts nonstop for a year will cost you around $65 on a typical tariff. If you have more than one home server the savings can quickly add up.
Also 20W is fairly low for idle draw right? Like I think you can get proper machines down that low if you know what to look for but most stuff bigger than a mini PC is gonna be drawing 40+? I might be slightly miscalibrated though.
Anyway it's not about the money for me it's any the aesthetics. Burning power for nothing is yucky.
Edit: just been Googling around. OP is running one of these HP mini PCs. They are pretty efficient! Some go well below 10W. So yeah I would say for the specific use case it's unlikely to matter very much. But still it's a useful thing to be able to do in general.
I don't know any sysadmins who would do this. Task scheduler for Windows or rtcwake for Linux. We try to reduce complexity with existing battle tested tools, not create whatever this is. This is definitely not the easy way.
I definitely am. But this is a very solved problem. It just adds brittleness to the system. Maintenance for this is going to suck. It's going to break in less than a year because you forgot to set a static IP address, or a Python library changes, or the SD card in the PI gets corrupted, or the jack on it fries, or its cheap PSU died and fries the board, etc. Then you're going to have to try to remember how the damn thing works, then figure out what other tiny change somewhere broke something. You should never add more failure points to infra, ever.
While not Linux I have my Windows 11 rackmount gaming server sleep after 30 minutes but wake every morning at 8am for backups using WakeupOnStandBy which works great. I tried using built-in Windows task scheduler but it never worked correctly.
Seems to me that if you want to waste time and money engineering your setup more net efficient, just buy a few solar panels and LiFePo4 batteries to buffer. You can run other stuff off of it, too.
I always choose “make more money” over “pinch pennies”.
Some motherboards disable power to their ethernet port upon sleep and so WoL will not work.
This is particularly common if the NIC is a power hungry 10GbE port.
However, in the particular case I found, the motherboard also disables oower to any usb GigE adapter attached.
The solution I found was to attach a USB hub with SD slots and integrated GigE port. As SD cards require power to remain mounted, the motherboard did not shutdown power to this adapter and WoL worked.
20 years ago, I used to have a Linux server running Slackware at home, that would wake up the two PCs we had at home to back up their data if they were turned off. If they were already turned on, they would send a WOL packet to the Linux server to turn it on in case the that server was off, and then start the backup routine. And the last one would tell the Linux server to turn-off itself. It used to work really great, good times.
Well done. But note: you can grab an ATX control board, or configure the RPi as a USB Gadget to wake the machine via power button or keyboard.
Note: If you're going to use an SBC _only_ for wake up signals, you might want to look into alternatives for the RPi such as the Radxa RockPi S [1]. My home server, for example, runs continuously at 7W, which beats many RPi models. Of course, a Pi to wake things doesn't need that much power and could be an older model, but even then, you'd still be burning "empty Watts".
Of course, the RockPi doesn't give you any KVM like functionality, though.
[1]: https://wiki.radxa.com/RockpiS
RPi Zero uses 0.4 W if you turn off leds: https://www.jeffgeerling.com/blogs/jeff-geerling/raspberry-p...
I did this recently as I was struggling to get WoL to work with my consumer PC. It seems like this ultra low-level stuff is a total crapshoot so if you can dodge it by just wiring up the power button, that's a good option.
In in the end I just went the whole hog and set up a PiKVM, so now if I mess up the machine's networking (or even completely break the OS) I can still recover it remotely even though it doesn't have a proper BMC or anything like that.
In general this approach seems ugly in principle but I really like it in practice. It lets you retrofit solid remote capabilities onto consumer hardware. That way you have such a broader market to buy from.
This seems like a smart option, that would also allow power cycling the machine remotely I’m assuming, in case it goes totally out to lunch.
(2023), discussed at the time: https://news.ycombinator.com/item?id=35627107
Thanks! Macroexpanded:
Making a Linux home server sleep on idle and wake on demand – the simple way - https://news.ycombinator.com/item?id=35627107 - April 2023 (237 comments)
That's what I was thinking too. My home server consumes like 15 W and is silent. If you get a rack mounted server made for data centers and stick it in a closet so you can't hear it then yes, i guess this approach makes sense.
In the UK, every 10W of 24/7 load is ~£25/year (33 USD).
It’s very easy for even the small things to add up.
I use a Mac Mini. When nothing it up, it draws like 7W!
How do you accurately measure how much current a PC is drawing at any given time? Do you have some kind of measurement device inline with the power cord?
You can use "smart" plug such as the Sonoff S31 (flash ESPHome to make it cloud-free).
And for one-off testing there's the standard P3 Kill-a-watt.
https://en.wikipedia.org/wiki/Kill_A_Watt
Works good IME, but you have to plug it into the wall first. Sometimes if you plug the appliance in, and then plug the KAW in, it will miscalibrate
I have it plugged into a IKEA smart plug.
Use `powerprofilesctl set power-saver` to set to a low use profile
I would be tempted to try using the Pi as a router & firewall with the server on another subnet, having it wake the server using traditional WOL as needed. That feels simpler to me and more controlled. But my overall feeling is that not much power is saved here overall compared to a well set up server. Good project though quite educational.
This reminds me of this old plugin for Windows Home Server: https://www.green-it-software.com/products/lights-out-for-wh...
You could set a calendar schedule for waking up itself and backing up the clients, and at night the server would go into standby only if no clients were running anymore since X minutes.
Well done. I really enjoy blog posts that dive into topics that probably cross the minds of most home lab-ers at one point or another.
Have you measured the power consumption of your "high power consumption" server?
Mine idles at around 130W from the walls. I think it's mostly the hard drives, maybe the SAS controller. I've migrated a few services to a miniPC and started turning it off too.
The main issue for me is the heat. I've got it next to me and 130W of heat adds up in the summer.
My home server setup when running at full tilt consumes approx 160 watts iirc.
I'd love it if I could turn off my systems for when I really need them.
Do you usually run it full tilt? What's it typically using on average? I've forgotten how much mine averages, I only remember being surprised how little it sips because it's mostly idle.
It's surprising because reddit (and HN) would make you think you're throwing away tons of money unless you go with some tiny ARM board and that's not true.
Seriously. You can get running states around 1W these days.
Are you talking about processor's C-states? My old 6th gen i3 stays most of the time idling around C8, averaging 5w, really impressive, I suppose newer gens will be even more efficient
C8 is a good state if you can get it. Intel is really good at this. They don't even bother energizing the L3 caches immediately when exiting deep package C-states. But there are lots of conditions that will inhibit C8, notably an Ethernet link on a NIC capable of PTP. This is why wireless is better.
What to do about this? https://forums.developer.nvidia.com/t/phantom-rtx-5090-high-...
If one can afford a GPU with a MSRP of $1999 and was scalped for $2999 during the initial craze, you are probably not struggling to pay your electric bill.
You can use nvidia-smi to set a target maximum power draw and performance mode to bring idle power levels down. Also make sure your computer is using the server/headless mode driver to keep idle power consumption down.
I suggest not putting a ridiculous GPU in your backup server.
Not everyone's "home server" is a backup server - some are for AI experiments.
Running states around 1W? How?
1W is a unicorn as just plugging in a power supply with no PC parts hooked up will register 1W. <10W is more realistic. Select a PC that can run off a laptop charger. Check manufacturer spec sheets for the idle power consumption. Don't install any PCIe cards or hard drives. Use powertop --autotune.
> Select a PC that can run off a laptop charger.
(looking at my 330W laptop charger)
I’m not sure that is the constraint you think it is.
To be more specific a 65W or 90W laptop power supply.
Only put the RAM you need in the box, use peripherals with working ASPM, attach them to the northbridge PCI ports instead of the CPU's root ports, use wireless instead of wired networking, and don't attach a display.
I do basically all of that, CPU idles around 5% but still consumes over 100W. (Minus the Wireless part)
(5800X + 64GB)
I can enable Eco Mode in the BIOS, which will bring down the CPU to about 65W max although its still at about 100W total system.
Chiplet based Ryzen CPUs inherently have higher idle power draw. Monolithic chips like 5600G have lower idle power draw. The motherboard, power supply, and internal peripherals all need to be carefully selected to get a really low idle figure.
Whatever software you are using is totally, utterly broken. Not sure what else I can tell you. Even a completely decked out Ryzen AI Max Pro 395 idles at 5W in Windows S0 (see: https://h20195.www2.hp.com/v2/getpdf.aspx/c09133726.pdf)
This sounds very similar to Apple’s DNS-SD Sleep Proxy Services.
Indeed. Frankly, that would be a nice standardized solution to your machine register itself on a Bonjour Sleep Proxy and can be cheaper than Pi with a used AppleTV off of eBay.
for ideal I need port knocking for wake up
Nothing to stop you setting that up on the secondary device to trigger the listen/wake scripts, but if someone malicious is on your local network and has permission to trigger WOL, chances are you have bigger issues.
any half decent router will allow you to create static arp entries for another host
no need for a standin
Yep, here is the page for it on FreshTomato (the firmware the author switched to): https://wiki.freshtomato.org/doku.php/basic-static#static_ar...
All this complexity to save a few bucks per year on your electricity bill? This is ridiculous, the Pi costs far more than what you can be expected to save.
I think it turned out a lot more complicated than the author expected, but that their solution they kindly wrote up will be pragmatic for someone.
(For example, imagine a big home GPU server that is needed only intermittently, and you want it to spin up automatically on network traffic from family's various devices that you can't modify.)
Of course, if you have simpler needs, and you're willing to send a WOL magic packet from the using devices, you can do in a few lines of shell script. It's a 1-line ssh-to-something-that-can-etherwake-on-that-vlan script, then wait in a loop for the service you need to appear, then 1-line ssh-to-server-to-shutdown when you're done.
In many European countries electricity is quite expensive. In the U.K. for example, running 20 watts nonstop for a year will cost you around $65 on a typical tariff. If you have more than one home server the savings can quickly add up.
Also 20W is fairly low for idle draw right? Like I think you can get proper machines down that low if you know what to look for but most stuff bigger than a mini PC is gonna be drawing 40+? I might be slightly miscalibrated though.
Anyway it's not about the money for me it's any the aesthetics. Burning power for nothing is yucky.
Edit: just been Googling around. OP is running one of these HP mini PCs. They are pretty efficient! Some go well below 10W. So yeah I would say for the specific use case it's unlikely to matter very much. But still it's a useful thing to be able to do in general.
My home server is a pig and draws about 100 watts idle.
Are you a programmer by chance? Some are, and they enjoy it!
I know a lot of sysadmins / platform engineer types. A lot of them really enjoy the mix of hardware and software integration challenges.
I don't know any sysadmins who would do this. Task scheduler for Windows or rtcwake for Linux. We try to reduce complexity with existing battle tested tools, not create whatever this is. This is definitely not the easy way.
Ah, you're not a tinkerer!
I definitely am. But this is a very solved problem. It just adds brittleness to the system. Maintenance for this is going to suck. It's going to break in less than a year because you forgot to set a static IP address, or a Python library changes, or the SD card in the PI gets corrupted, or the jack on it fries, or its cheap PSU died and fries the board, etc. Then you're going to have to try to remember how the damn thing works, then figure out what other tiny change somewhere broke something. You should never add more failure points to infra, ever.
I guess everyone has to go through it.
> I guess everyone has to go through it
Bingo, but some people never stop tinkering - their joy is in avoiding the well trod path.
> a few bucks per year
Crunched the numbers for mine - about 150 bucks a year in potential savings.
Not sure where you are but energy bills are sky rocketing in the US.
The old saying: Linux is only free if your time is worth nothing.
While not Linux I have my Windows 11 rackmount gaming server sleep after 30 minutes but wake every morning at 8am for backups using WakeupOnStandBy which works great. I tried using built-in Windows task scheduler but it never worked correctly.
Seems to me that if you want to waste time and money engineering your setup more net efficient, just buy a few solar panels and LiFePo4 batteries to buffer. You can run other stuff off of it, too.
I always choose “make more money” over “pinch pennies”.
If that were the case you wouldn’t waste valuable time posting snide responses to hn posts.