My solution to deal with the "no input detected" / "graceperiod expired" issue
I just wanted to share with you how I made Tvheadend usable. The issue I was experiencing is that tvheadend would at random stop serving any streams and throw a "No input detected"-message. Restarting the tvheadend service was enough to fix this issue, but since the HTPC is used by my family there needed to be a hassle-free hands-off solution. Since the causes of these "graceperiod expired"-issues are widespread and probably driver related issues you shouldn't expect a official fix soon.

In my case tvheadend was running on a Ubuntu server, so this solution is based on this distro. The core of the solution is having Tvheadend log debug information to a file, and monitor this file for the "Graceperiod expired" message. If detected kick tvheadend in the nuts. It's not the best solution, but it works and it's pretty easy to set up!

1. Enable tvheadend debug logging. Edit /etc/default/tvheadend and add the -s switch to the arguments.
#   add any other arguments

2. Save the following script somewhere. Mine was stored under /home/hts/
tail -F /var/log/syslog | grep --line-buffered "Graceperiod expired" | while read line
  service tvheadend restart
Make it executable. Run:
chmod +x /home/hts/

3. Make the script run on boot. Add this line to /etc/rc.local at the bottom, but above "exit 0"
/home/hts/ &
Mind the ampersand. It's there for a reason.

The best thing about this script is that it is based on "tail" instead of polling the file. This means it's resource efficient and responds immediately.
eeh. sounds like a problem with one of the things we can't discuss on this forum rather than a problem with tvh Smile
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Yeah, I understood that lonelycoder is a better suit for issues regarding the backend. But the "READ BEFORE POSTING" thread made it sound like it wasn't mandatory, and I was to lazy to make yet another account to post over there.

I did believe it was relevant to XBMC, as it is the HTPC setup that makes it important to have a hands-off solution. Just trying to help.
I have this exact issue with free to air channels. Worked fine for about a year now, no.
I have a similar issue, but with the error "Transport Error Indicator". I think it's got something to do with an error in the dvb-c card driver (Terratic Cinergy HD). This error message pops up in syslog, so I have created the script


tail -F /var/log/syslog | grep --line-buffered "Transport error indicator" | while read line
  service tvheadend stop
  sudo modprobe -r mantis
  sudo modprobe -r tda10021
  sudo modprobe tda10021
  sudo modprobe mantis
  service tvheadend start
  mail -s "Mantis driver restarted" [email protected]

/etc/rc.local shows this:

/root/ &

exit 0

and ps aux | grep mantis shows this, so I think the script is running

root      3448  0.0  0.0   3356   524 ?        S    Apr19   0:00 /bin/bash /root/
root      3456  0.0  0.0   3356   460 ?        S    Apr19   0:00 /bin/bash /root/
root     32688  0.0  0.1   4400  1896 pts/0    S+   21:11   0:00 grep --color=auto mantis

However, as you may have guessed, nothing happens when the error appears in syslog. If I run the command manually by ~/ &, it works fine...
@jaapp: "Graceperiod expired" pretty much means something's wrong with your hardware or the drivers

@opdenkamp: I don't think this is related to what you're referring to

@DappereDodo: I've got quite a lot of experience with Terratec Cinergy cards. What I've discovered is that the white cards work perfectly while the green ones don't (I have one of the latter). The issues I have are exactly the same as yours, in the end I didn't like restarting tvheadend everytime the issue cropped up so I wrote, which you can use to disable/enable the adapter. That way you can perform the modprobe without restarting tvheadend. I do this in a cron job every morning at 6 AM.

Logout Mark Read Team Forum Stats Members Help
My solution to deal with the "no input detected" / "graceperiod expired" issue0
This forum uses Lukasz Tkacz MyBB addons.