Project

General

Profile

Bug #2422

Mux Idle Scan is broken

Added by Crazy Fin about 10 years ago. Updated almost 10 years ago.

Status:
Fixed
Priority:
Normal
Category:
-
Target version:
-
Start date:
2014-10-26
Due date:
% Done:

100%

Estimated time:
Found in version:
3.9.1952
Affected Versions:

Description

Referring to bug #2260 which states that this bug has been fixed.

However, I am on 3.9.1952 now and as soon as I enable Network Discovery and Idle Scan I still get this extra MUX scan being performed on every channel switch?!

If I for example have 2 XBMC:s connected to TVH I see two streams in the status view of TVH webgui but as soon as I switch channel on any of the 2 XBMC:s that are running I suddenly see a third stream that disappears after a while (5-15 seconds). This causes the channel switching to be delayed and sometimes it even causes a channel freeze until I switch the channel again.

See attached screenshots of the settings as well as a very short cutout from my tvh.log.


Files

History

#1

Updated by Jaroslav Kysela about 10 years ago

  • Subject changed from Changing channel causes extra EIT scan causing channel switching to be delayed to Changing channel causes extra mux scan causing channel switching to be delayed
#2

Updated by Jaroslav Kysela about 10 years ago

  • Assignee set to Jaroslav Kysela
#3

Updated by Jaroslav Kysela about 10 years ago

I don't see the whole subscription sequence in the log. I need debug + traces for these subsystems: service,subscription,mpegts .

#4

Updated by Crazy Fin about 10 years ago

Ok I have run TVH with

./build.linux/tvheadend -l tvh.log --trace mpegts,service,subscription --debug all

and did a channel switch @ 22:47:08.290 in the log attached.

I switched from TV4 HD on mux 10934H to channel TV3 HD (S) on mux 11293H

Here is a cutout from the log (that is attached):

2014-10-27 22:47:08.290 subscription: 0064: "192.168.10.10 [ xbmc-lab | XBMC Media Center ]" unsubscribing from "TV4 HD", hostname="192.168.10.10", username="xbmc-lab", client="XBMC Media Center"
2014-10-27 22:47:08.291 mpegts: 10934H in THOR - tuning on TUNER 7
2014-10-27 22:47:08.816 subscription: 0065: "scan" subscribing to mux, weight: 1, adapter: "TUNER 7", network: "THOR", mux: "10934H", hostname: "", username: "", client: ""
2014-10-27 22:47:08.817 mpegts: 11293H in THOR - tuning on TUNER 4
2014-10-27 22:47:09.079 subscription: 0066: "192.168.10.10 [ xbmc-lab | XBMC Media Center ]" subscribing on "TV3 HD (S)", weight: 150, adapter: "TUNER 4", network: "THOR", mux: "11293H", provider: "Telenor", service: "TV3 HD (S)", hostname="192.168.10.10", username="xbmc-lab", client="XBMC Media Center"
2014-10-27 22:47:09.724 parser: The timediff for TELETEXT is big (909959412), using current dts
2014-10-27 22:47:14.926 mpegts: 10934H in THOR scan complete
2014-10-27 22:47:14.926 subscription: 0065: "scan" unsubscribing
2014-10-27 22:49:09.290 epggrab: EIT: DVB Grabber - data completion timeout for 11785H in THOR

#5

Updated by Crazy Fin about 10 years ago

Forgot to add that if I disable "Idle Scan Muxes" I do not get these extra mux scans when switching channels.

#6

Updated by Jaroslav Kysela about 10 years ago

The idle mux scan implementation is not good at the moment. Basically, the mux is added immediately to the scan queue when it's closed.

But you have 6 tuners, so other tuner should be selected for regular (xbmc) subscription, so the idle scan should not influence in any way the subscription (and I don't see it in the log):

2014-10-27 22:47:08.817 [  DEBUG]:service: TV3 HD (S) si 0x7ff5ac001240 weight 0 prio 0 error 0
2014-10-27 22:47:08.817 [  DEBUG]:service: TV3 HD (S) si 0x7ff5ac023a10 weight 0 prio 0 error 0
2014-10-27 22:47:08.817 [  DEBUG]:service: TV3 HD (S) si 0x7ff5ac0024f0 weight 0 prio 0 error 0
2014-10-27 22:47:08.817 [  DEBUG]:service: TV3 HD (S) si 0x7ff5ac002200 weight 0 prio 0 error 0
2014-10-27 22:47:08.817 [  DEBUG]:service: TV3 HD (S) si 0x7ff5ac001720 weight 1 prio 0 error 0
2014-10-27 22:47:08.817 [  DEBUG]:service: TV3 HD (S) si 0x7ff5ac023200 weight 150 prio 0 error 0
#7

Updated by Crazy Fin about 10 years ago

Correct, I actually have 8 tuners but for some reason my tuner 5 and tuner 6 (so 2 tuners out of 4 on one of my two Digital Devices Cine S2 cards) seems to be broken so I have disabled them for the moment while trying to test if it is the card that is broken or not. I have switched the antenna cables and the problem stays on tuner 5 and tuner 6.
The strange thing is that some of the channels tunes in on tuner 5 and 6 but most of the channels does not tune and then TVH retries a new tuner and then it works.

Only time I have problems when channel switching and Idle Scan is enabled is during startup sequence since TVH is then using all available tuners to scan the muxes. Channel switching then takes some seconds longer but after a while XBMC is able to grab a tuner since it has higher priority than the idle scan has.

You can close this ticket now since you agree on idle mux scan implementation is not perfect (and will hopefully be fixed later).

I will just disable the idle scan for now on until the functionality has been fixed. Works fine when it is disabled.

#8

Updated by Jaroslav Kysela about 10 years ago

  • Subject changed from Changing channel causes extra mux scan causing channel switching to be delayed to Mux Idle Scan is broken

I'll keep this issue open until resolved. Just changed the subject.

#9

Updated by Adam Sutton about 10 years ago

Strictly speaking, idle scan is not broken. It's doing exactly what it's intended to do, that is to make sure the tuners are permanently in use and scanning muxes when they're otherwise idle (where idle means not servicing a user subscription, inc recordings).

Unfortunately TVH (HTSP) has no concept of a channel switch. So as far as it's concerned the sequence of events is:

1. User hits channel up/down
2. XBMC sends stop
3. TVH stops mux, re-adds to IDLE queue
4. Top of the IDLE queue is tuned on idle tuner
5. XBMC sends start
6. TVH looks for available tuner and will pick one (possibly the same one as before)
7. Channel starts playing

If you have good hardware/drivers, the introduction of the extra tune is negligible, unfortunately there are some shit drivers / hardware out there (trust me, I've got one!)

That being said, from an outside perspective, clearly this is less than ideal. Since the tuner was never really idle at step 4, it's just that not enough info is provided to make this understood.

There are solutions to this, some of which I did add originally, but I think I was never fully convinced and so remove them. Plus I don't bother with IDLE scanning, I only kept it at the request of various users.

Adam

#10

Updated by Rob vh about 10 years ago

Adam,
you could say "idle is really idle if the adapter has not been allocated in (say) 10 seconds..."

Fin,
I also have interesting symptoms on my DuoFlex S2 cards. One of my cards has its 2nd adapter shot (HD channels won't come through with enough quality to support descrambling, but BBC HD and Channel 4 HD work). Adapter 0 works perfectly, adapter 1 is flaky. I still use adapter 1 for subsets of the muxes, by maintaining an extra "network" with only some muxes that work OK for adapter 1.

Last Sunday a card that was performing perfectly up till then, received tuning errors on H muxes and on higher frequencies, to the extent that MPEG4 became unusable. And this happened on the 1st adapter of the card.
The Status display simply showed no a <50% signal and SNR for H muxes. However, low frequency V muxes worked (and so do SD channels).
I "solved" this by loosening the screws that hold the adapter card in the frame. I guess I'm having some shorted/disconnected connection on the card now that stopped the diseqc tuning to go to my switch.

#11

Updated by Crazy Fin about 10 years ago

@"Rob vh":

I have also started to see similar very strange issues with my two Digital Devices Cine S2 cards (2 cards with 4 tuners on each). See my post number 7 above. Some channels on tuner 5 and 6 works fine but most of the channels just wont tune in and then after 5-10 seconds TVH switches to a new tuner and then it works. I measured the signal on the coax cables with a professional DVB-S/S2 meter and signal is as fine as it is on all other cables. I even tested with switching the cables from tuner 7 and tuner 8 to tuner 5 and 6 but no change, tuner 5 and 6 still causing these issues.

I have now disabled both tuner 5 and 6 and I´ll test during the weekend with switching the two cards to new PCIe 2.0 x1 slots on my cool motherboard (see discussion of the motherboard and CC errors at https://tvheadend.org/boards/5/topics/12963?r=13081#message-13081)

Maybe we shall open a new bug ticket (or forum thread) for this tuning problem?

#12

Updated by Rob vh about 10 years ago

I'm afraid I determined that the card did not pass the diseqc info to the switch, and when I loosened the screws on the mounting bracket, it worked (the issue I had on Sunday). So I can't blame Adam for this tuning issue ;-). You my want to check with your professional meter if the diseqc voltage and tone are passed to your switch.

#13

Updated by Jaroslav Kysela almost 10 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|ffbc62a0eef47fd0cf8d82afb8eec5f3959639db.

Also available in: Atom PDF