Live data from Hacker News

Making a Linux home server sleep on idle and wake on demand (2023)

dgross.ca

81–90 of 115 posts

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#82
Ha ha, I tried something similar when I had to go to Thailand for my wife's treatment. And failed spectacularly. Fortunately, my laptop had all the files. I didn't have Tailscale at that time.

My Desktop, WoL on, tested to be working Android Phone, always on

All have SyncThing installed. Mobile had Tasker installed.

So, the idea was to have Tasker monitor a folder inside SyncThing, When I need my computer, I put a file inside that folder, when Tasker finds that folder, it sends WoL to my desktop, and deletes the file, Computer wakes up. When I see the file deleted I know, the beast is now awakens ....

When I actually did try that from Thailand, the file did not got deleted, nor the beast woke up.

What happened? Turns out, my mobile restarts automatically after some time of inactivity. Which, locks Tasker out, and the whole process fails.

So, operation wake the beast was busted.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#84

Ha ha, I tried something similar when I had to go to Thailand for my wife's treatment. And failed spectacularly. Fortunately, my laptop had all the files. I didn't have Tailscale at that time. My Desktop, WoL on, tested to be working Android Phone, always on All have SyncThing installed. Mobile had Tasker installed. So, the idea was to have Tasker monitor a folder inside SyncThing, When I need my computer, I put a fi…

Since you're already using Tasker, you could use it to launch Tailscale on the phone at boot - I've got mine set to do this so my phone reconnects to tailscale after a reboot.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#85
I built similar functionality into a DNS server so the device can be woken from beyond the local network: https://github.com/RyanGibb/eon/tree/main/bin/hibernia

There's a bit of a writeup here: https://www.sicsa.ac.uk/wp-content/uploads/2024/11/LOCO2024_...

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#86
Not as sophisticated as your solution, but works with all hardware for the "backup use case": use a mechanical timer set to 10 minutes before backup starts (and power off 30 minutes after backup normally ends):

https://www.amazon.de/Mechanical-Analogue-Switching-Christma...

It's a more rigid solution that doesn't let you ssh in (unless during backup time ;-), but it saves electricity and it is implemented in 10 minutes (5 for an Amazon order and 5 to plug in and set the timer to your backup hours). It's also a more robust solution - little can go wrong (the only thing is you need to balance backup time against electricity/time savings as backup size grows).

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#87

Ha ha, I tried something similar when I had to go to Thailand for my wife's treatment. And failed spectacularly. Fortunately, my laptop had all the files. I didn't have Tailscale at that time. My Desktop, WoL on, tested to be working Android Phone, always on All have SyncThing installed. Mobile had Tasker installed. So, the idea was to have Tasker monitor a folder inside SyncThing, When I need my computer, I put a fi…

Since you're already using Tasker, you could use it to launch Tailscale on the phone at boot - I've got mine set to do this so my phone reconnects to tailscale after a reboot.

Now I have another mobile with more control, so restart is not a problem anymore, and as I can SSH in to it using Termux. This basically handles all of my needs.

Now I just need to get enough momentum to set up the process of waking up my desktop as needed and set up radical caldav server in the mobile.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#88
post #9

Earlier quoted context omitted.

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

Although Intel processors are efficient, modern AMD processors have much higher idle power usage, due to their chiplet design. They typically use at least 20W more power.

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#89
post #60

Earlier quoted context omitted.

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…

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

You should try running powertop on it. It will scrape sysfs and look for things that seem misconfigured, and suggest changes to fix them. On one of my machines it enabled some peripheral power saving mode that made a pretty dramatic saving!

(I also heard that it sometimes suggests power saving modes that are usually switched off for a good reason, like apparently you really don't want some USB controllers going into certain sleep modes as they take seconds to come back).

Re: Making a Linux home server sleep on idle and wake on demand (2023)

#90

Ha ha, I tried something similar when I had to go to Thailand for my wife's treatment. And failed spectacularly. Fortunately, my laptop had all the files. I didn't have Tailscale at that time. My Desktop, WoL on, tested to be working Android Phone, always on All have SyncThing installed. Mobile had Tasker installed. So, the idea was to have Tasker monitor a folder inside SyncThing, When I need my computer, I put a fi…

Why don't you send WOL directly over the internet? (You'll need to set up a permanent ARP record on the router.)

Or login into the router and send WoL from there?

Or have Raspberry always on with ssh?

Or set a power-on timer in BIOS/UEFI once a day and a shutdown/sleep in cron? (This is also a good failsafe if WoL doesn't work.)

Post reply on HN