Re: Integartion with systemd and rtcwake

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Why don't you make life easy and just add a $5-10 rtc module and be
done with it?

On Mon, Apr 10, 2023 at 6:08 AM Marko Mäkelä <marko.makela@xxxxxx> wrote:
>
> Some time ago, I created the wiki page
> https://www.linuxtv.org/vdrwiki/index.php/Systemd that describes much of
> my VDR installation.
>
> On my Raspberry Pi, there is no real-time-clock. My low-tech solution
> for waking up VDR for recordings is that I set an alarm on my phone, to
> remind me to turn on VDR when needed. Today, I refined that a little by
> implementing an idle timeout shutdown when no further recording timers
> exist, or when they are in the distant enough future.
>
> I learned that there is a portable Linux tool "rtcwake" that should
> support whatever is needed by VDR. It is much simpler than the
> "nvram-wakeup" that I used almost 20 years ago. On my Raspberry Pi,
> basically any "rtcwake" commands will fail. That provided a good way of
> testing the fallback mechanisms of my shutdown script.
>
> I think that it could be useful to include some Systemd integration
> scripts in the VDR distribution. My systemd integration consists of 4
> parts that are documented in the
> https://www.linuxtv.org/vdrwiki/index.php/Systemd wiki page:
>
> * /etc/systemd/system/vdr-keep-alive.sh to control system shutdown
> * /var/lib/vdr/vdr-shutdown.sh to handle VDR shutdown (vdr -s)
> * some configuration to have a VDR service in Systemd
> * optional: additional configuration to have the video directory on USB
> storage, to have VDR auto-start when the storage is plugged in.
>
> Because rtcwake does not work on my VDR system, it would be nice to get
> some feedback from users of wake-on-timer capable systems. It is
> possible that the "rtcwake -m disk -s $2" and "rtcwake -m mem -s $2"
> require that "vdr-keep-alive.sh stop" be invoked first and
> "vdr-keep-alive.sh start" be invoked once rtcwake successfully returns
> (at the wake-up time). It is also possible that the VDR process would
> need to be restarted.
>
> Best regards,
>
>         Marko
>
> _______________________________________________
> vdr mailing list
> vdr@xxxxxxxxxxx
> https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
https://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr




[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux