Readit News logoReadit News
t_mahmood · 5 months ago
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.

M95D · 5 months ago
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.)

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

Hm, so never tried something like that before actually, I think for OpenWrt I need to install arp packages. I do not have public IP any more though, was getting hammered by bot network and found Tailscale to do what I need.

> Or login into the router and send WoL from there?

Restricted outside access to the router management panel, only port forwarded to the desktop.

> Or have Raspberry always on with ssh? I do not have one, which is why used a mobile, thought to be next best thing. As, power outages happen regularly, I need something that would be able to keep on running.

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

That's easily workable for my setup, actually!

Thank you for giving me the ideas!

benplumley · 5 months ago
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.
t_mahmood · 5 months ago
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.

teekert · 5 months ago
You worked with what you had and understood, it was beautiful.

I for one just leave the beast on, I understand that spin-ups and downs are the main thing that wreck harddrives (and my beast has a lot.)

t_mahmood · 5 months ago
Thank you!

For me, power outages were/are a big issue, lost one of the HDD recently then, did not want to risk the new one.

leandrosa81 · 5 months 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.
bjt12345 · 5 months 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 (empty) 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.

M95D · 5 months ago
There's a "EuP 2013" setting in the BIOS/UEFI. Disable that.

If you use Windows, check in device manager for a setting to allow the device to wake up the computer. (I can't remember the exact name.)

threatripper · 5 months ago
This reminds me of the empty box in a corner of the workshop with the written note "Don't remove!".
privatelypublic · 5 months 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 · 5 months 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.

privatelypublic · 5 months ago
I'm absolutely excited for the nanoKVM-PCIe. They were out of stock last I looked, but they've released the firmware source as promised.
btschaegg · 5 months 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

fulafel · 5 months ago
privatelypublic · 5 months ago
Yea, technically an esp32 board with ethernet would work for this job. They're typically limited to 10mbit, but if you have 10mbit/s of broadcast traffic you can afford something better.
spaceywilly · 5 months 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.
jll29 · 5 months ago
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).

slug · 5 months ago
Or just suspend to RAM on backup finish/time and use wake on RTC alarm (and set to turn on after power return on power failure if needed), no need for extra HW.
antov825 · 5 months 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 · 5 months 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.

kqr · 5 months ago
In contrast to many common consumer subscriptions which start at double that it seems like decent value.
Spooky23 · 5 months ago
I use a Mac Mini. When nothing it up, it draws like 7W!
ryandrake · 5 months 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?
flobosg · 5 months ago
(2023), discussed at the time: https://news.ycombinator.com/item?id=35627107
dang · 5 months ago
Thanks! Macroexpanded:

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)

john61 · 5 months ago
Thank you for the post, very informative. I do this half manually. I have a cgi script on the always on very power efficient sbc server that wakes up the bigger server if someone needs it. The big server powers itself down when no backup is running at a time everybody using the server usually sleeps. I thought about improving this and measure server usage and solar power generation to decide the shutdown, maybe with an additional warning email. for example: "The server shuts down in 5 minutes due to no demand and no solar power, if you want to prevent this click this link: http://server.lan/cgi-bin/keepalive "