Does TVH not support RTC for wake up?
Added by Sylvio Egal over 6 years ago
Hi, I am a bit frustrated right now. TVH is running fine and works as it should. But now I have set my pc to standby (s3) and was waiting for it to wake up for the record. But nothing happend.
I have googled and it seemed I have to work with complicated scripts to automatically wake up the pc to record?
I come from Windows7 with NextPVR and DVBviewer and there this works without problems
Replies (8)
RE: Does TVH not support RTC for wake up? - Added by Robert Cameron over 6 years ago
On Linux, waking from sleep at a specific time is handled by telling the BIOS what time it needs to wake. The reason there are a bunch of different scripts that seem complicated to achieve this is because it is.
Tvheadend does not have any mechanism in it to set a wake time. Therefore, you need a script to do a few things:- Go through the list of scheduled recordings, and find when the next recording is set to start
- Set the computer's wake clock to a little bit before that scheduled recording time to ensure that everything has time to fully start up and initialize before the recording is due to start, so that the computer is ready for it
- Check the status of Tvheadend to see if there are any streams active at the moment (which is usually a good indicator that someone is either watching a live stream, or that there is a recording currently in progress)
- If there is a stream active, inhibit sleep so you don't interrupt the current viewing/recording
- If Tvheadend is not active, and the wake time is far enough in the future, then put the computer to sleep
A script that performs those steps is usually set up to run as a cronjob, probably every 30 minutes or so.
Otherwise, your computer won't know when to wake up, because you never told it when it needs to do so. Since Tvheadend doesn't do this, you have to tell the computer yourself some other way, hence the myriad scripts floating around.
RE: Does TVH not support RTC for wake up? - Added by Sylvio Egal over 6 years ago
But in Windows its the same thing. The app has to say the bios when to wake up.
But in linux this seems to be not so easy ...
RE: Does TVH not support RTC for wake up? - Added by Robert Cameron over 6 years ago
The difference is that when you were using NextPVR the app did it for you. Tvheadend does not, so you have to do it yourself.
RE: Does TVH not support RTC for wake up? - Added by Sylvio Egal over 6 years ago
But isnt it an essential part of a tvserver to wake up the device for a recording? I think tvh is build for devices running 24/7.
RE: Does TVH not support RTC for wake up? - Added by Robert Cameron over 6 years ago
Sylvio Egal wrote:
No, the only essential parts for a TV server are:But isnt it an essential part of a tvserver to wake up the device for a recording? I think tvh is build for devices running 24/7.
- Receive TV from tuner/input
- Offer available TV inputs to clients for viewing
- Allow recording/scheduling of available TV inputs to be saved to disk
Anything else is a nice feature (such as matching guide/programming information/metadata to TV input). I'd much rather have a stable software package that does the essential functions well, rather than a poor implementation of all features because it is trying to do everything.
Also, suspending/waking a computer with Linux is not always an easy proposition. How does the kernel interface with the wake/RTC clock: EFI/efivars, /proc, /sys, etc. How is the suspend/wake handled: Tux on Ice, pm-tools, acpid, systemd, etc. How is startup/process management done: systemd, upstart, SysV/rc.d, runit, ignite, etc.
In general, on Unix systems (and by extension, Linux) the ethos is generally a program does one job and does it well. If you need to achieve something complicated, then the usual manner of doing this is to string/pipe together several tools, where the output of the first is the input of the second, and so on ...
RE: Does TVH not support RTC for wake up? - Added by A L over 6 years ago
Hello Sylvio.
I had the exact same frustrations as you.
I had only ever used Windows PVR programs (MCE, Argus, Mediaportal and most recently NPVR) and had always set my server to go to sleep whenever it was not being used (which was most of the day). Windows did a pretty good job of this.
Upon switching to Linux and TVHeadend, I too realised that there was no simple way of waking up the server for scheduled recordings.
I spent possibly a year trying to figure this out - I visited/posted on numerous sites and nothing I tried ever worked.
Someone eventually explained to me that I was wasting my time.
They said that Linux was primarily built for stability and the only way to have a super stable system is not to let it go into sleep mode (whilst my Windows systems worked fine with sleep mode for most of the time, I did get periods of the PC keep waking/sleeping over and over again for no apparent reason).
They also said that although it might cost you a bit more to run the Linux PC 24/7, there are some benefits in doing this:
1. Linux is much less bloated than Windows - if you do no have much on your system, Linux will sit at 0% CPU utilisation for most of the time doing nothing. A Windows PC is always messing with things in the background, which does use up more electricity.
2. If you have mutiple hard drives, these are constantly spinning up and down each time you wake from sleep - not only is this not brilliant for them if it happens multiple times a day but they are using electricity to spin up and for the period they remain spun up. With a Linux system that is always on, unused Harddrives will sit around for days/weeks/months doing nothing until you need them.
Ultimately, I concluded that it is best just to build a system that was quiet/economical enough to be left on all the time.
I switched over to TVH and Linux completely, about 9 months ago, and I have never had a problem (and I mean never) - no restarts, no missed programs, no freezing.
I might pay a little bit more in electricity for it, but I have gained masses of time in not messing with it or hunting down missed recordings.
Hope that helps.
RE: Does TVH not support RTC for wake up? - Added by Sylvio Egal over 6 years ago
Thanks for your answer. It seems I am not the only one frustrated by this.
Maybe best would be to buy a Synology for this?