Live data from Hacker News

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

dgross.ca

91–100 of 115 posts

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

#91

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 mother…

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

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

#92
post #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.)

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

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

#93
post #28

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

Start a blog about making more money instead of exploring technology and see if anyone gives a shit

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

#94
post #90

Earlier quoted context omitted.

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

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

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

No, you don't. Put this in /etc/firewall.user or /etc/rc.local (you can do it from UI) and forward a UDP port to 192.168.0.254 or whaterver subnet you're using:

  ip neigh add 192.168.0.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br-lan extern_learn
The incoming packet will be broadcasted (ff:ff...) on the br-lan interface. 192.168.0.254 doesn't need to exist - the sleeping computer doesn't care.

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

#96
post #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 minut…

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.

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

#97
post #95

Most of the time you don't need data center sized home servers even if you do test data center sized software solutions on them. So instead of the Pi solution, how about using a server that idles at 10-20 W?

This. My Lenovo ThinkStation with a Core Ultra 7 265K idles out at ~10W headless (measured with a smart plug), while it can be very fast when needed.

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

#98
post #94

Earlier quoted context omitted.

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

>> 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. No, you don't. Put this in /etc/firewall.user or /etc/rc.local (you can do it from UI) and forward a UDP port to 192.168.0.254 or whaterver subnet you're using: ip neigh add 192.168.0.254 lladdr…

Thank you for the explanation!

The version in the OpenWrt didn't support the full command. Had to update to `ip-full`.

After the command was successful, I can see the entry in the `ip neigh` table.

Now digging around

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

#100
post #94

Earlier quoted context omitted.

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

>> 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. No, you don't. Put this in /etc/firewall.user or /etc/rc.local (you can do it from UI) and forward a UDP port to 192.168.0.254 or whaterver subnet you're using: ip neigh add 192.168.0.254 lladdr…

PS:

Correction! /etc/rc.local isn't OK. The ARP record needs to be reloaded if br-lan interface is restarted, such as when changing other network settings in WebUI. So only /etc/firewall.user will do.

Post reply on HN