63 comments

  • bjt12345 2 minutes ago ago

    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.

  • leandrosa81 5 hours ago ago

    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 8 hours ago 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.

    • btschaegg 15 minutes ago ago

      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

    • bjackman 5 hours ago 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.

    • spaceywilly 4 hours ago ago

      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.

  • flobosg 8 hours ago ago

    (2023), discussed at the time: https://news.ycombinator.com/item?id=35627107

  • antov825 9 hours ago 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.

    • marcosscriven a minute ago ago

      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.

    • Spooky23 8 hours ago ago

      I use a Mac Mini. When nothing it up, it draws like 7W!

      • ryandrake 5 hours ago 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?

        • drnick1 4 hours ago ago

          You can use "smart" plug such as the Sonoff S31 (flash ESPHome to make it cloud-free).

          • Arnavion 4 hours ago ago

            And for one-off testing there's the standard P3 Kill-a-watt.

        • 01HNNWZ0MV43FF 33 minutes ago ago

          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

        • Spooky23 3 hours ago ago

          I have it plugged into a IKEA smart plug.

  • ape4 7 hours ago ago

    Use `powerprofilesctl set power-saver` to set to a low use profile

  • Neil44 8 hours ago 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.

  • hs86 5 hours ago ago

    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.

  • its-kostya 4 hours ago ago

    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.

  • 2OEH8eoCRo0 8 hours ago ago

    Have you measured the power consumption of your "high power consumption" server?

    • ThatPlayer 6 hours ago 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 7 hours ago 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 7 hours ago 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 8 hours ago ago

      Seriously. You can get running states around 1W these days.

      • shellwizard 6 hours ago 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

        • jeffbee 4 hours ago ago

          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.

      • macawfish 7 hours ago ago
        • supertrope 4 hours ago ago

          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.

        • moandcompany 5 hours ago ago

          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 7 hours ago ago

          I suggest not putting a ridiculous GPU in your backup server.

          • overfeed 3 hours ago ago

            Not everyone's "home server" is a backup server - some are for AI experiments.

      • wiredpancake 6 hours ago ago

        Running states around 1W? How?

        • supertrope 4 hours ago ago

          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.

          • dragonwriter 4 hours ago ago

            > 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.

            • supertrope 4 hours ago ago

              To be more specific a 65W or 90W laptop power supply.

        • jeffbee 6 hours ago 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 5 hours ago 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.

            • supertrope 4 hours ago ago

              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.

            • jeffbee 5 hours ago 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)

  • dipierro 5 hours ago ago

    This sounds very similar to Apple’s DNS-SD Sleep Proxy Services.

    • tgma 5 hours ago 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.

  • Western0 8 hours ago ago

    for ideal I need port knocking for wake up

    • hsbauauvhabzb 4 hours ago ago

      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.

  • blibble 6 hours ago ago

    any half decent router will allow you to create static arp entries for another host

    no need for a standin

  • drnick1 8 hours ago ago

    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.

    • neilv 7 hours ago 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 7 hours ago 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 5 hours ago 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.

        • zbrozek 4 hours ago ago

          My home server is a pig and draws about 100 watts idle.

    • esseph 7 hours ago 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 6 hours ago 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.

        • esseph 3 hours ago ago

          Ah, you're not a tinkerer!

          • bongodongobob 3 hours ago ago

            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.

            • esseph 2 hours ago ago

              > I guess everyone has to go through it

              Bingo, but some people never stop tinkering - their joy is in avoiding the well trod path.

    • Havoc 5 hours ago ago

      > a few bucks per year

      Crunched the numbers for mine - about 150 bucks a year in potential savings.

    • righthand 5 hours ago ago

      Not sure where you are but energy bills are sky rocketing in the US.

    • sneak 6 hours ago ago

      The old saying: Linux is only free if your time is worth nothing.

  • nodesocket 6 hours ago 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.

  • sneak 6 hours ago 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”.

    • hsbauauvhabzb 4 hours ago ago

      If that were the case you wouldn’t waste valuable time posting snide responses to hn posts.