[tvheadend] No input detected (Graceperiod expired)

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hasu0bs Offline
Senior Member
Posts: 165
Joined: Jan 2011
Reputation: 2
Post: #1
Hi
here is a problem i am experiencing with tvheadend on a minimal natty system with xbmc-pvr. It happened several times now.
Yesturday everything was fine and watching tv via xbmc worked perfectly. Today i turn on my machine and select a channel to play. After a 10 second period of time where it says "working... please wait" (normaly that is like 2 seconds and the tv picture shows) there is a notice "TVHEADEND HTSP CLIENT - no input detected"
I looked in backend but the adapter is still recognized by the system. In the debug log of tvheadend backend there is this line constantly coming up every 20 seconds:
Quote:Oct 23 14:18:32 Service: Afatech AF9013 DVB-T/ARD NRW: 706,000 kHz/Das Erste: Status changed to [Graceperiod expired]

Deleting all channels and muxes for the adapter and adding new "DVB Network by location" gives me this:
Quote:Oct 23 14:39:41 dvb: "/dev/dvb/adapter0" tuning to "522,000 kHz" (Initial autoscan)

Oct 23 14:39:46 dvb: "522,000 kHz" on adapter "Afatech AF9013 DVB-T", status changed to Faint signal
on all muxes...

Why is this happening??
(This post was last modified: 2011-10-23 14:43 by Hasu0bs.)
find quote
Jimmer Offline
Donor
Posts: 339
Joined: Jan 2010
Reputation: 3
Location: Sunny Devon, UK
Post: #2
Uh oh - the dreaded af9013! Long bane of my life....

Is it a pci or usb tuner? Is it a single or dual tuner? Run dmesg in a console, this will show if the card is reporting problems

Are you seeing i2c errors? If it is a dual tuner, there is a problem where something happens to lock up the second tuner and then you get i2c errors (this is if your card/stick has a td18271). I have found that only a complete power off of the box (leave it off 10 seconds at least) and then a cold boot will recover the tuner (I have a pci card). This is because if there has been continuous power supplied to the bus, then the tuner will not reinitialise and request the firmware properly. If you have a usb stick, you may accomplish the above by yanking the stick for 10 seconds. Please note that using modprobe to unload/reload the relevant kernel module does not seem to work (probably something to do with the way it loads a fresh firmware when it initialises.)

You also need to find the firmware that provides the best results for you. For instance for my kworld pci dual tuner card is crap with the latest 5.10 firmware, but stellar with 4.95. I tried many variations to discover this. I also discovered that in my myth rig, I had to disable the second tuner and up the tuning timeout slightly to ensure trouble free operation. Kinda defeats the object of having a dual tuner card, I know, but I'm waiting for the linuxtv.org people to suss it out....

Of course you may have a single tuner af9013 based usb stick with a chip different to a tda18271. But it's a popular combo and is sometimes a pig to get running properly!

Jimmer
find quote
Hasu0bs Offline
Senior Member
Posts: 165
Joined: Jan 2011
Reputation: 2
Post: #3
Thnaks for your fast answer!

it is usb, single tuner.

dmesg:
Quote:[ 1079.231191] af9015: recv bulk message failed:-71
[ 1079.231198] af9015: af9015_rc_query: failed:-1
[ 1079.231201] dvb-usb: error -1 while querying for an remote control event.

I once had a problem with the firmware: The stick used to work out of the box just by pluging it in it was recognized in tvheadend and worked. But then one day i suddenly had a problem and asking on the #hts channel i looked at dmesg and there was some message about the firmware so i too the one from
http://linuxtv.org/wiki/index.php/DVB-T_USB_Devices
(TerraTec Cinergy T USB RC (mk II)) firmware link here

And it worked again...

edit: i just unpluged the usb and the power of the whole system and now it is scanning the channels correctly and i can watch them. but i dont want to do this every month...!!
(This post was last modified: 2011-10-23 19:30 by Hasu0bs.)
find quote
Jimmer Offline
Donor
Posts: 339
Joined: Jan 2010
Reputation: 3
Location: Sunny Devon, UK
Post: #4
Well there has been some discussion that the af9015 is susceptible to power saving features for the usb bus in the linux kernel. It has been suggested that this causes the card to reset incorrectly. A fix for this can be found here:

http://linuxtv.org/wiki/index.php/Leadte...ng_1_tuner

this may help with your tuner problems too.

The error you're seeing in dmesg is a polling error for the remote control integrated with your usb stick. If you don't use it, you can blacklist it. I have blacklisted polling on mine by doing:

Code:
echo "options dvb-usb-af9015 remote=-1" > /etc/modprobe.d/no-af9015-remote


This should work for you too. Do the above and then unplug and re-plug the stick. It could even be that polling for the rc and erroring out is causing you problems. With just a single af9015 and rc polling disabled I seem to have (relatively) trouble free operation. At least you don't have to manually edit the v4l source and compile anymore - it's all in the kernel now....

Jimmer

PS you need to run that echo command as root, to disable the polling. or else you can just

Code:
sudo nano /etc/modprobe.d/no-af9015-remote

and put

Code:
options dvb-usb-af9015 remote=-1

in the file.
(This post was last modified: 2011-10-24 13:47 by Jimmer.)
find quote
Hasu0bs Offline
Senior Member
Posts: 165
Joined: Jan 2011
Reputation: 2
Post: #5
okay thank you. I have tried blacklisting the ir module. lets see if this works. If not i maybe try your fix on linuxtv.org but i don't know if it realy applies to me since i have a single tuner. I will wait :-)
Thank you!
find quote
Hasu0bs Offline
Senior Member
Posts: 165
Joined: Jan 2011
Reputation: 2
Post: #6
Hi Jimmer!

I just experienced another instance of this bug so i would like to try the patch you provided to turn of the usb powersaving mode.

I wonder where to put this line of code:
Code:
echo -n -1 > /sys/module/usbcore/parameters/autosuspend

in this file:
Code:
#! /bin/sh
### BEGIN INIT INFO
# Provides:          rc.local
# Required-Start:    $remote_fs $syslog $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO


PATH=/sbin:/usr/sbin:/bin:/usr/bin

. /lib/init/vars.sh
. /lib/lsb/init-functions

do_start() {
    if [ -x /etc/rc.local ]; then
            [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
        /etc/rc.local
        ES=$?
        [ "$VERBOSE" != no ] && log_end_msg $ES
        return $ES
    fi
}

case "$1" in
    start)
    do_start
        ;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
esac

simply at the end or in the do_start() function?
find quote
Jimmer Offline
Donor
Posts: 339
Joined: Jan 2010
Reputation: 3
Location: Sunny Devon, UK
Post: #7
put that line in your actual /etc/rc.local file at the bottom. It will then be run at every system boot.

Just a fyi: this did not solve my second tuner problems......

Jimmer
find quote
Hasu0bs Offline
Senior Member
Posts: 165
Joined: Jan 2011
Reputation: 2
Post: #8
Laugh thanks, you realy dashed my hope ;-)

I will try that anyway.
find quote