Live data from Hacker News

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

dgross.ca

81–90 of 244 posts

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

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

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

#83
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?

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

#84
post #40
post #29

Earlier quoted context omitted.

I have no idea how it looks on the dev/setup side, but suspend and resume is definitely a solved problem, seeing that I've never had any problems with it on my Steam Deck

It's very likely designed for that use case so not very relevant. Most PC are delivered with Windows, and even though Linux works on them, it's unlikely the PC were designed with suspend stability as criteria.

If that's the case, who's to fault here? Linux or buggy ACPI states implemented in the motherboards?

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

#85
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?

You can but the issue is that if the caller _thinks_ it can reach it over IPv6 it'll never send the IPv4 unicast packet which means the server won't wake.

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

#86

The concept of "ARP Stand-in" brought to mind Proxy ARP: * https://en.wikipedia.org/wiki/Proxy_ARP

Proxy ARP would have the raspberry pi provide its own MAC address as the MAC for the server IP. All the traffic from the clients to the backup server would have to pass through the Pi's network interface for the duration of the session.

With this ARP stand-in, it provides the server's MAC to the client so subsequent traffic to the server doesn't need to pass through the Pi.

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

#87
post #33

This looks like one of those home server infrastructure setup rabbit holes I would've bailed out of within the first 10 minutes of Googling to research the problem. I commend the author for their perseverance and the writeup - rabbit hole writeups are their own form of entertainment. That alone was worth it. I could never run anything that looks like such a conceptual pain the butt. A pain to maintain and troubleshoo…

Meh, I struggled to get my pi to work as a time machine server. It would work for a few weeks and then just stop working and I would have to start the backup from scratch previous backups becoming unusable. In the end I just plugged an external hard disk into the mac. I have had similar issues in the past even with such simple things as SSH to a Mac. It would be easy to blame the pi or Linux, but as far as I can tell…

Time Machine over NAS has always been unstable for me. As you experienced, my backup would be regularly corrupted and would need to restart. Alternatively, a normal I eventually gave up on the NAS and now backup to external drives at home.

This site has excellent articles on Time Machine - scroll down to Time Machine Problems: https://eclecticlight.co/mac-troubleshooting-summary/

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

#88

For the second always-on machine, a router running OpenWRT would be ideal since it would always be up anyways.

And if it's doing the routing, it can also be smarter about detecting demand for the server, and even validate that it's legitimate demand.

Related discussion 14 days ago: https://news.ycombinator.com/item?id=35447094

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

#89
post #50

Earlier quoted context omitted.

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…

464XLAT should work fine with ipv4 literals, no? At least on macOS, this will get routed to a local 192.0.0.2 interface, which does the CLAT, translates it to an ipv6 64:ff9b:: address, and relays it to your nat64 server. The ipv4-only software doesn't know any different, and the only traffic going on your LAN is ipv6. I'm not sure if windows works the same way though... (Edit: Looks like windows can do this, but it…

Discord calls on Windows was the only exception I ran into, because as you found yourself, it functionally had to fallback on DNS64. In general, some peer-to-peer situations are the likely one of the few cases where it will end up falling back onto DNS64 for resolution. This isn’t something I entirely realized myself — I’m apparently far from the only person to discover this behavior (Discord embedding IPv4 literals for its relay servers). Discord has had tickets open about it for years so far.

I appreciate my son being patient on that one, but he appreciated how seriously I dug into everything. Again, we have IPv4 enabled again as fallback, but the family agreed for an IPv6-only weekend as a test, and that was the only thing (outside of one website) that failed.

Everything else worked perfectly, including tons of legacy devices and software, some of which had no concept of IPv6.

For 464XLAT on clients, phones are actually the leaders here. It’s worked perfectly on at least iOS (and I assume Android) for a LONG time because of its built-in automatic tunneling. Mac OS had some recent improvements in Ventura to make things easier. Windows absolutely has some quirks, the biggest being IPv6 literals in UNC paths ending up using a domain Microsoft doesn’t actually own - a potential huge future attack vector.

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

#90

Saying Windows has had it since Windows 98 and then, acknowledging that the issue is wake-on-demand is a bit confusing to say the least. Obviously Linux can sleep easily since decades ago. The issue is wake on demand (and I don't know if Windows has that even) Edit: I don't why everyone's having issues. I run Fedora on a cheap Gigabyte G5KD and never had any problems. Never did with either of my thinkpads or my Xiaom…

> Obviously Linux can sleep easily since decades ago. Yeah right. Suspend and resume is still buggy as hell. Power management in general in Linux is still awful after all these years.

Low-level power savings (s3 sleep) and magic packet (Wake-on-LAN) have been a standard since the late 90s. Getting a Linux OS that actually delivers these standardized power features is now a 20+ year old bug. I can only imagine the amount of energy that would have been saved if this bug was properly fixed 25 years ago. With solid-state tech becoming cheaper every day, I now expect nobody will make an "it just works" OS that has both sleep and wake working on-demand. Globally, the HDDs will simply continue to spin until there are none.
Post reply on HN