nextcloudpi icon indicating copy to clipboard operation
nextcloudpi copied to clipboard

Scheduled system standby and wakeup

Open adolci opened this issue 5 years ago • 5 comments

Description

Add the possibility to configure a scheduled standby for the system (for physical devices) with the auto wakeup. Benefits:

  • reduce noise
  • reduce energy consumption
  • increases disk and other hardware components life time

Example

A preinstalled system utility is available for this purpose: rtcwake - https://linux.die.net/man/8/rtcwake On crontab: 00 22 * * * /usr/sbin/rtcwake -m off -s 39600 This will shutdown the system (-m off) at 10:00 p.m. every day and boot again at 9 a.m. (-s 39600)

adolci avatar Jun 14 '20 13:06 adolci

Will this actually work on a sbc ? They don't have a bios or clock internally afaik. Nice idea though. Thank you!

ovpc avatar Jun 14 '20 14:06 ovpc

Will this actually work on a sbc ? They don't have a bios or clock internally afaik. Nice idea though.

I think it will not work because it need a Real Time Clock device. On man page there is a note that could help:

This is normally used like the old apmsleep utility, to wake from a suspend state like ACPI S1 (standby) or S3 (suspend-to-RAM). Most platforms can implement those without analogues of BIOS, APM, or ACPI.

Of course this functionality is limited to some hardware devices

At the moment I tested it on my Odroid HC2 and it work well.

adolci avatar Jun 14 '20 14:06 adolci

Pull request: https://github.com/nextcloud/nextcloudpi/pull/1146

adolci avatar Jun 14 '20 14:06 adolci

No way with the raspberry Pi (no internal clock). You can do that - as i do - with a Witty Pi Card : http://www.uugear.com/product/witty-pi-3-realtime-clock-and-power-management-for-raspberry-pi/

Plus, you'll be able to power external disk and Raspberry from a single 12V power block, if you want to.

Larsene avatar Jul 01 '20 15:07 Larsene

All you will need is to purchase an external real time clock for the Pi. There are many variations available for $5 - $10 USD that plug into the GPIO pins. Cheers!

sunjam avatar Sep 04 '20 17:09 sunjam