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.
privatelypublic · 3h ago
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.
bjackman · 29m ago
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.
dipierro · 15m ago
This sounds very similar to Apple’s DNS-SD Sleep Proxy Services.
tgma · 7m ago
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.
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.
Havoc · 42s ago
> a few bucks per year
Crunched the numbers for mine - about 150 bucks a year in potential savings.
neilv · 1h ago
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.
daymanstep · 2h ago
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.
bjackman · 21m ago
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.
esseph · 2h ago
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.
bongodongobob · 1h ago
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.
sneak · 1h ago
The old saying: Linux is only free if your time is worth nothing.
antov825 · 4h ago
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.
Spooky23 · 3h ago
I use a Mac Mini. When nothing it up, it draws like 7W!
ryandrake · 5m ago
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?
Neil44 · 3h ago
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.
ape4 · 1h ago
Use `powerprofilesctl set power-saver` to set to a low use profile
sneak · 1h ago
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”.
nh43215rgb · 1h ago
How does it work on windows? I never fully got how to configure wol. It seems to wake up every time without no reason when its enabled, in the end i could only disable it completely as a recourse.
Western0 · 3h ago
for ideal I need port knocking for wake up
2OEH8eoCRo0 · 3h ago
Have you measured the power consumption of your "high power consumption" server?
ThatPlayer · 1h ago
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.
BizarroLand · 1h ago
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.
2OEH8eoCRo0 · 1h ago
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.
jeffbee · 3h ago
Seriously. You can get running states around 1W these days.
shellwizard · 1h ago
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
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.
jeffbee · 1h ago
I suggest not putting a ridiculous GPU in your backup server.
wiredpancake · 1h ago
Running states around 1W? How?
jeffbee · 46m ago
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.
wiredpancake · 12m ago
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.
jeffbee · 7m ago
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)
nodesocket · 1h ago
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.
blibble · 1h ago
any half decent router will allow you to create static arp entries for another host
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.
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)
Crunched the numbers for mine - about 150 bucks a year in potential savings.
(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.
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 know a lot of sysadmins / platform engineer types. A lot of them really enjoy the mix of hardware and software integration challenges.
I always choose “make more money” over “pinch pennies”.
The main issue for me is the heat. I've got it next to me and 130W of heat adds up in the summer.
I'd love it if I could turn off my systems for when I really need them.
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.
(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.
no need for a standin