Forums » Descrambling »
resume from standby: it takes aprox 1 minute before CWC is connected
Added by Marcel Peeters over 13 years ago
Hi
Running XBMC frontend and tvheadend on my HTPC. seems to be working pretty good.
CWC running newcs on my dreambox500 with ziggo card.
however 2 problems:
1) Need help with this delay of 1 minute before CWC connection is re-established after resume from standby.
Waiting for 1 minute after resume is a very long time! Meanwhile XBMC repeately pops message "TVHEADEND: no input detected" I gues this happens:
tvheadend tries to connect to cwc immediately. But network connections not up and running yet. After 1 minute retry... success
log:
standby:
Jul 05 23:57:15 htsp: 127.0.0.1 [ minime | XBMC Media Center ]: Disconnected
Jul 05 23:57:15 subscription: "127.0.0.1 [ minime | XBMC Media Center ]" unsubscribing from "Nat Geo Wild"
Jul 05 23:57:15 capmt: Removing CAPMT Server from service
resume:
Jul 05 23:57:47 htsp: Got connection from 127.0.0.1
Jul 05 23:57:47 htsp: 127.0.0.1: Welcomed client software: XBMC Media Center
Jul 05 23:57:47 htsp: 127.0.0.1 [ XBMC Media Center ]: Identified as user minime
Jul 05 23:57:47 htsp: 127.0.0.1 [ minime | XBMC Media Center ]: Privileges raised
Jul 05 23:57:47 AVAHI: Service 'Tvheadend' successfully established.
Jul 05 23:58:22 htsp: Got connection from 127.0.0.1
Jul 05 23:58:22 htsp: 127.0.0.1: Welcomed client software: XBMC Media Center
Jul 05 23:58:22 htsp: 127.0.0.1 [ XBMC Media Center ]: Identified as user minime
Jul 05 23:58:22 htsp: 127.0.0.1 [ minime | XBMC Media Center ]: Privileges raised
Jul 05 23:58:22 capmt: Starting capmt server for service "Nat Geo Wild" on tuner 0
Jul 05 23:58:22 subscription: "127.0.0.1 [ minime | XBMC Media Center ]" subscribing on "Nat Geo Wild", weight: 150, adapter: "Philips TDA10023 DVB-C", network: "Ziggo Brabant Limburg", mux: "Ziggo Brabant Limburg: 380,000 kHz", provider: "Ziggo", service: "Nat Geo Wild", quality: 100
Jul 05 23:58:34 capmt: Removing CAPMT Server from service
Jul 05 23:58:36 capmt: Starting capmt server for service "Nat Geo Wild" on tuner 0
finally connection to CWC
Jul 05 23:58:46 cwc: Attemping to connect to 192.168.1.5:10001
Jul 05 23:58:46 cwc: Connected to 192.168.1.5:10001
2) sometimes screen freezes, zapp to other channel:
- log shows repeately: "capmt: Removing CAPMT Server from service" followed by "capmt: Starting capmt server for service "Nat Geo Wild" on tuner 0"
- XBMC repeately pops message "TVHEADEND: no input detected"
- have to restart tvheadend to get it running again
any help on either of the problems is welcome...
minime
Replies (20)
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by Hein Rigolo over 13 years ago
do you only have CWC configured? or also capmt?
if you only connect to the newcs server on your dreambox then yo do not need to configure capmt.
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by Marcel Peeters over 13 years ago
Hi
I know... had another setup before (both dreambox and htpc running CCcam, takes ages to switch between channels)
I disabled the capmt settings (didnt remove them).
Tried another thing today, looking at tvheadend webinterface on HTPC, manually restart tvheadend via terminal, monitoring the debug log in webinterface: connection to CWC is made immediately....
this kinda proves my point: after resume initially tvheadend tries to connect but fails (not visible when: HTPC resumes and monitoring tvheadend webinterface via laptop) after a minute connection is made again and now succeeds.
hope this info helps...
WORKAROUND: resume from standby: it takes aprox 1 minute before CWC is connected - Added by Marcel Peeters over 13 years ago
Hi,
found a workaround for the first problem:
already had a script stoppping / starting during standby and resume (in /etc/pm/sleep.d)
instead of starting tvheadend directly in this script (service tvheadend start) i created a script for this command and start it in background
script:
!#bash
sleep 8
service tvheadend start
result after resume: XBMC screen appears-> network connection OK pops up-> popup: XBMC, "reconnected to tvheadend".
No I can Immediately zap to a channel that needs CWC
the other problem no success (yet) (very annoying...)
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
Marcel,
I am having the resume issue as well. How can I create this script and run it as you have done? Where do I put the scipt? I know how to create. Your help would be greatly appreciated. I have a very frustrated wife.
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
Marcel,
Can you post your entire script that you are using?
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by Marcel Peeters about 13 years ago
Hi,
@ work right now... wont be able to reply with details until monday.
I created a startup script for XBMC
while true do
{
startxbmc
sleep 9 seconds
}
after resume from standby add to resume script to restart tvheadend somewhere in /var/etc/pm/sleep.d
last line killall -9 xbmc.bin
effect: after resume xbmc shows up but it is killed after a few seconds, then the starup script makes sure that xbmc
is restarted but first it waits for 9 seconds, during this time network is up and running and also EPG info is refreshed!!
the above story is not entirely correct (also tvheadend needs to restart after network is reconnected)
more on monday...
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
Marcel,
Its great to hear from you. I will wait until monday. Thank you,
Brad
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by Marcel Peeters about 13 years ago
hi
first the startup script:
copy and paste text below into file and make it executable. select it in System->Preferences->Startup Applications
#!/bin/sh
sleep 8
while [ 1 ];
do
xbmc
sleep 1
done
effect: starts XBMC upon startup and when xbmc is killed or exitted it is also restarted.
to stop it you need to kill the script...
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by Marcel Peeters about 13 years ago
hi,
second part is a script located in /var/etc/pm/sleep.d
i named it 99xbmchtc
make it executable and it will be executed during a suspend and after a resume from suspend
'99' at the beginning of the filename makes sure it is executed before all other scripts in this directory during suspend
and after all other scripts during resume
#!/bin/sh
case "$1" in
suspend|hibernate)
/etc/init.d/tvheadend stop
/etc/init.d/lirc stop
rmmod mantis
;;
resume|thaw)
modprobe mantis
/etc/init.d/lirc start
sleep 1
/home/minime/starttvheadend.sh &
;;
esac
effect:
during suspend/hybernate following is executed:
- tvheadend is stopped
- lirc is stopped
- mantis driver is removed (this is the driver for my DVB-card, you probably have another card)
during wakeup/thaw following is executed:
- mantis driver is loaded
- lirc is started
- script: starttvheadend.sh is executed (more in part 3 about this script)
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by Marcel Peeters about 13 years ago
hi,
part 3:
create a script and make it executable (i named it starttvheadend.sh)
This script is started in background during resume
#!/bin/sh
sleep 5
echo "yourpassword" | sudo -S killall -9 xbmc.bin
service tvheadend start
effect:
- sleep awhile to make sure everything is back up and running (remember this script is executed after resume)
- kill xbmc (fill in correct password)
- start tvheadend
combined with the other scripts the effect after resume is:
- drivers loaded, lirc started
- sleep awhile so everything is up and running again : NETWORK!!
- xbmc is killed but automatically restarted after a while because of the startup script: effect update of EPG info!
I had the problem that after long time standby EPG was not correct anymore, restart of xbmc forces an EPG info update
- tvheadend starts AFTER network is up and running hence connection to CWC succeeds immediately. (and not 1 minute later when retrying to connect to CWC)
It is not the most elegant way to fix these problems but it does the trick!
Greetz Marcel
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
Marcel,
These are great instructions! Thank you for putting it together.
In Step #1, "copy and paste text below into file and make it executable. select it in System->Preferences->Startup Applications", do I put this script in /etc/rc.local? I am doing all of this through the terminal using SSH.
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
Sorry, check that, does it go in /etc/init.d?
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
One more, how do I determine which driver TVheadend is using?
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
And... Step #3 - Does it matter where I put this script?
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
Okay, after reading through your instructions I see you put them in your home directory and it seems that I have everything setup. When I resume XBMC the TV stations are working great. So it seems that the scripts are working, except for the EPG. There is no info in the EPG. To get the EPG back I have to into XBMC settings for Live TV and reset the EPG, then it will fill everything in. Any ideas?
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by Marcel Peeters about 13 years ago
Hi,
I think i checked "do not store epg info in database" (in xbmc, live tv settings)
That will for sure force an update of epginfo since the data is not stored in XBMC but retrieved during startup and updated every X minutes (setting)
Did you figure out which driver was used?
command: "lsmod" will list all loaded modules, also "dmesg" will show you more details on the drivers that are loaded...
Greetz
Marcel
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
I did find the correct driver. Just had to use my brain and I found it. Thanks again for the help. Its really great that the XBMC community is willing to help people. Great help. Thanks
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
Marcel,
I tried checking "do not store epg info in database" (in xbmc, live tv settings) and I am still getting a "disapperaring" EPG. Sometimes when resuming it is there and the next time it won't be. Also, when I do a complete shutdown/restart it also disappears and the only way to fix that, so far, is to "reset EPG" in the XBMC Live Tv settings. It will then re populate it. I wish I could narrow down when exactly the EPG doesn't resume properly, it has been random to me so far. Any ideas?
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by Marcel Peeters about 13 years ago
Hi,
Do you have the same situation as i do? (I mean xbmc is killed and restarted after resume from standby hence epg info is updated)
if so you could try to give tvheadend a little more time to retrieve the EPG info. Dunno how it works but i think tvheadend also needs to
somehow collect the data from your dvb card (for which the driver just has been loaded).
Lets say your card is a bit slower in collecting epginfo and hence tvheadend is also slower collecting all the data.
The epg update for XBMC happens upon restart. If at that point in time the epginfo simply is not complete yet you might experience missing EPG info.
thus increase the "sleep 1" in the runxbmc.sh to for instance "sleep 10". This will give tvheadend lots of time to update.
If this works, decrease to an acceptable sleep period were it still works.
(note: I assume that your are not using xmltv to collect epg ingo but epginfo is retrieved via your dvb card)
Also you could try is NOT to unload and load the driver for your dvb card (rmmod/modprobe) That did not work for me but it might do the trick for you.
Greetz
RE: resume from standby: it takes aprox 1 minute before CWC is connected - Added by brad Schmidt about 13 years ago
Marcel,
After updating xbmc I now have an error when I try to resume my system. When I resume the system, it goes to the command prompt and shows this.
(WW) fglrx: No matching Device section for instance (BusID PCI:0@1:5:1) found
(EE) SONIX USB Device: failed to initialize for relative axes.
waiting for X server to shutdown ddxSigGiveUp: Closing log
XBMCLive:!$
I tried swapping to a different USB keyboard than the above "SONIX" but I still get the same error.
Any ideas?