Live data from Hacker News

Making a Linux home server sleep on idle and wake on demand – the simple way

dgross.ca

91–100 of 244 posts

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#91
post #16

Diagrams are just visible enough that I can tell that they're present but I cannot otherwise see them. I suppose that's because I'm using a dark theme on Firefox. Not that it matters. There's enough text to figure out what's going on in the first place and it would not help me much in any case. I have a file server running of an ancient server motherboard from another age. (Supermicro X8SIL w/X3460 and 16GB ECC RAM)…

I'm not using any dark theme addons or similar, just the standard prefers-color-scheme, and I have the same problem. So they just didn't account for their website's dark mode when writing the article.

Author here, apologies for the dark mode issue and thanks for flagging it -- looks to be an open bug in theme-ui (https://github.com/system-ui/theme-ui/issues/1602).

I've just pushed a workaround that appears to have fixed it.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#92
post #81

> Disable IPv6: this approach relies on ARP, which IPv6 doesn't use This makes me kind of sad. Even if it’s just for a private/local usage. IPv6 has the features of ARP built in via “neighborhood discovery protocol” (NDP) with the addition of various security to prevent spoofing.

I thought you could run IPv4 and IPv6 at the same time, or am I missing something?

Yes, and you can do the same for IPv6 using any ND proxy server.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#93
> You'll need: An always-on Linux device on the same network as your server, e.g. a Raspberry Pi

> First, a bit about my hardware, as this solution is somewhat hardware-dependent: HP ProDesk 600 G3 SFF

I seriously doubt any of this can be gotten to work on a Pi in a way that actually reduces power usage in any notable way. Hell the Pi 4 uses almost full idle current when completely powered off unless you turn off just about everything that would make it possible to wake up again without a full power cycle. And even then the draw remains significant.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#94
> To prevent unwanted wake-ups, you'll need to ensure no device on the network is sending extraneous packets to the server

Assume the home network is using 10.0.x addresses.

I wonder if it would be useful to put the server on 10.1.x, add a virtual ethernet interface to the RPi that is also on 10.1.x, and configure the RPi to route between 10.0.x and 10.1.x. Configure the RPi to drop any extraneous packets directed to 10.1.x from 10.0.x.

On the Mac "route add -net 10.1.0.0/16 Rpi" and add a name and the server's IP to /etc/hosts.

With that approach you might also make it so the RPi runs a script whenever something tried to make a TCP connection to the server, and that script could deal with telling the server to wake. That way you can choose a wake method for the server without having to worry about whether or not other things on the network might accidentally trigger it.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#95

> You'll need: An always-on Linux device on the same network as your server, e.g. a Raspberry Pi > First, a bit about my hardware, as this solution is somewhat hardware-dependent: HP ProDesk 600 G3 SFF I seriously doubt any of this can be gotten to work on a Pi in a way that actually reduces power usage in any notable way. Hell the Pi 4 uses almost full idle current when completely powered off unless you turn off jus…

Many people who would do this sort of thing likely already have an always-on pi (pi-hole, dns, ssh jump box, etc). And even at full bore, pi 4 is about 6.5W, so 90% savings over the HP.

https://www.pidramble.com/wiki/benchmarks/power-consumption

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#96
post #50

> Disable IPv6: this approach relies on ARP, which IPv6 doesn't use I wish more people would care about IPv6.

Especially when the reality is… you can almost go IPv6 only nowadays if you wanted to. I went down the rabbit hole recently, switching my network to IPv6 primary with IPv4 as the fallback. The ultimate test was disabling IPv4 for a weekend to see what, if anything, broke. I had set up DNS64, NAT64 and 464XLAT. The only weirdness is how Windows clients handle IPv6 literals in UNC paths, which is super ugly, and how so…

> you can almost go IPv6 only nowadays if you wanted to.

I think that is the reason why many aren't enthusiastic about it.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#97
Somehow "the simple way" being a persistent Pi with a custom script seems like it's not exactly that simple. What you're trying to do is something so basic and yet I've been unable to get this setup on my NAS either.

Would a static mapping of the ARP work? I'd want the server to WOL and work with timemachine without external dependancies.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#98
post #35

Earlier quoted context omitted.

Roughly 40% (and rising) of Google users use IPv6. https://www.google.com/intl/en/ipv6/statistics.html

Is that mostly mobile phones while on cellular data, perhaps?

I am sure a large percent of it is. That being said in my area I only have 2 choices in ISP and both support 'dynamic' ipv6 and have for 3-4 years.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#99
post #54

Earlier quoted context omitted.

I wish ISPs would care. CGNAT sucks.

I’m behind CGNAT for the last 1.5 years without issue. What am I missing? I actually prefer my router not being bombarded by connection attempts all day.

Try connecting to an SSH server for more than a few hours without passing traffic and then have the server be the one to send a message. Oops! Your ISP tore down the NAT association and you have no idea the server isn't sending anything until you try to communicate with the server and get a timeout / RST.

NAT breaks TCP, but at least with consumer NAT you're in control of the timeouts on your router. With CGNAT you're at the mercy of an ISP that likely optimizes for HTTP and has low timeouts that you can't control.

Re: Making a Linux home server sleep on idle and wake on demand – the simple way

#100
post #63

This reminds me of back when Apple sold WiFi access points (they were high-quality, but a pain to administer since they required running a Windows-only or a MacOS-only executable). I tried running arpwatch for a while on a network which had one of these, and gave up, since the MAC address for any Apple machine on the network was constantly bouncing between the real machine and the access point. Apparently, whenever a…

For the record; you were observing the behavior of Apple's Bonjour Sleep Proxy: https://en.wikipedia.org/wiki/Bonjour_Sleep_Proxy
Post reply on HN