Project

General

Profile

Need to kill tvheadend service on resuming from suspend

Added by Patrick Swayze over 10 years ago

Hello

OpenSUSE 13.1 x64 + tvheadend 3.4-1.21

My TV card is very old (LifeView FlyDVB Trio), however I can even see HD TV without problems (you are making a good job, I'm surprised).

Info from TVHeadend
:dvb: Found adapter /dev/dvb/adapter0 (Philips TDA10046H DVB-T) via PCI
:dvb: Adapter /dev/dvb/adapter0 will run in full mux mode
:v4l: /dev/video0: saa7134 LifeView FlyDVB Trio PCI:0000:03:06.0 capabilities: 0x85050015

Don't know why, but each time I wake up my HTPC from suspend/hibernate, despite I can access to TVH web interface and see all is fine (config is there, EPG is showed...), if I try to play any channel, a black screen is showed instead the TV signal. Then, I need to make a "kill" on any thread called "/usr/bin/tvheadend" service (the rest kill themself) and when systemd launch again the service, all is working fine. I can see TV again!!!

Any idea what's happening?

Thank you again


Replies (6)

RE: Need to kill tvheadend service on resuming from suspend - Added by Prof Yaffle over 10 years ago

Is there any kind of log file as you come out of suspend?

Or what does syslog (or equivalent) say when you try to use tvheadend after resume?

I wonder if tvheadend is restarting before the card has woken up, something like that. You may be able to delay the restart of tvheadend or otherwise force a re-initialisation of the tuner before the tvheadend process starts.

And if you can't do that, you could probably hack the resume scripts to kill and restart tvheadend for you, maybe after a few seconds' wait...

RE: Need to kill tvheadend service on resuming from suspend - Added by Patrick Swayze over 10 years ago

I'll try to get a log, but not sure what log file you would need to study what's happening. If you could be more precise, I'll be very grateful to you.

;)

RE: Need to kill tvheadend service on resuming from suspend - Added by Prof Yaffle over 10 years ago

Try dmesg - see what that generates.

Failing that, look to see if you have anything in /var/log or /etc/messages... they're the most likely places.

RE: Need to kill tvheadend service on resuming from suspend - Added by Prof Yaffle over 10 years ago

The other thing to look at is /etc/default/tvheadend - assuming OpenSUSE puts things in the same place!

Look for this:

# TVH_DEBUG
#   if set to 1 will output debug to syslog
TVH_DEBUG=0

and change it to:

TVH_DEBUG=1

That might give some more information from tvheadend, if not the OS.

RE: Need to kill tvheadend service on resuming from suspend - Added by Patrick Swayze over 10 years ago

Hi again

About location of tvheadend ... there is nothing beginning with "tv" in "/etc/default". I try to locate where is, but not lucky about it (I attached "locate tvheadend" output).

However, no problem in generate my dmesg output (attached too).

I must now do a telnet to my HTPC to stop an start my tvheadend service .... :(

Thxs

dmesg.txt (63.9 KB) dmesg.txt Output of "dmesg" after suspend and resume
locate_tvheadend.txt (115 KB) locate_tvheadend.txt Output of "locate tvheadend"

RE: Need to kill tvheadend service on resuming from suspend - Added by Prof Yaffle over 10 years ago

Hmmm, can't see anything definitive in there.

All I can suggest is searching around to understand how the system comes out of sleep and what scripts it calls. You can maybe add something either to the system restart script or maybe a tvheadend-specific one that either waits five seconds (or whatever) or kills and restarts the tvheadend process.

That doesn't explain the cause, but sometimes curing the symptom is all that's needed...

Otherwise...

Have a look at /var/log/messages - that should give you tvheadend messages as well as system messages - that might give some insight into what's happening when tvheadend tries to play somethign after resume.

Have a look for the tvheadend startup script - you can add -d to the tvheadend command line and it will significantly increase the debug output to syslog (so, presumably, to messages).

Not sure other than that, OpenSUSE is an alien creature to me.

    (1-6/6)