Project

General

Profile

Bug #1499

Wrong loading of tuners

Added by Dirk Leiss almost 10 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2013-01-04
Due date:
% Done:

0%

Estimated time:
Found in version:
3.18/3.34
Affected Versions:

Description

I have a mini-itx machine running TVHeadend as backend server.
Three tuners are connected (2 x DVB-T, 1 x DVB-S). After reboot the webui everything is
messed up an it shows five tuners (2 of the attached tuners doubled)
On my lubuntu machine another reboot fixes the problem.
On openelec it persists and can only be fixed by deleting the hole configuration manually,turning off tvheadend,
than reboot, copy the correct config into the addon folder and than restart tvheadend. I am now afraid in updating because of this bug!


Files

log-2013-01-05-09.27.05.zip (59.9 KB) log-2013-01-05-09.27.05.zip logfiles Dirk Leiss, 2013-01-05 10:28

History

#1

Updated by Adam Sutton almost 10 years ago

  • Status changed from New to Need feedback

Please provide full debug log and correct version info, ideally including git commit.

Ta
Adam

#2

Updated by Michal Leinweber almost 10 years ago

I have the same problem often.
My system is QNAP with Debian 6.0 and Linux kernel 3.6.9-orion5x armv5tel.
HTS Tvheadend 3.2.18~g40a8920.
Tuners are: Evolve Mars (Siano Mobile Silicon Nice) and Evolve Venus (ITE 9135).

I will try to add logs when it happens again.

#3

Updated by Dirk Leiss almost 10 years ago

I solved the problem by disconnecting the power from my powered usb hub.
I don't know why, but with power cord connected it led the system to identify the devices twice.

#4

Updated by Nathan McAullay almost 10 years ago

Michal Leinweber wrote:

I have the same problem often.
My system is QNAP with Debian 6.0 and Linux kernel 3.6.9-orion5x armv5tel.
HTS Tvheadend 3.2.18~g40a8920.
Tuners are: Evolve Mars (Siano Mobile Silicon Nice) and Evolve Venus (ITE 9135).

I will try to add logs when it happens again.

i too have a qnap, and found that restarting tvh (qnap reboot or tvh service) sometimes the configuration was doubled up with duplicate adapters. in my case it was that the qnap (or more accurately the libhdhomerun libraries) would not assign the same adapter to the same /dev/dvb structure. tvh would start and recreate the structure again, basically duplicating the number of adapters (as it doesnt remove the ones it had before restart). i asked the libhdhomerun author to see if he could "force" the same order everytime in his code, and it seems to work. your options with qnap and usb devices are limited as afaikt there is no udev which could do the samething for you? probably doesnt help, but i thoughti would share. nathan

#5

Updated by Dirk Leiss almost 10 years ago

It happened again! The USB Hub is not the problem, because it also happens when tuners are directly connected to the motherboard.

Which kind of debug log do you need? xbmc?

I did the following: turn off tvheadend service (openelec), delete the "service.multimedia.tvheadend" folder, than restarted tvheadend service, opened web ui and looked into tv adapters tab, it showed three tuners correctly, than turned off the service, deleted the "service.multimedia.tvheadend" folder again and copied my backup into the addon_data folder. After restarting the service, everthing is fine again.

After reboot tvheadend produces a new (wrong) entry in the satconf folder.

#6

Updated by Dirk Leiss almost 10 years ago

I rebooted several times now and can confirm that it happens the same like Michal Leinweber said. The system doesn't assign the same adapter to the same device name.
Is it possible to change tvheadends behaviour?

#7

Updated by Dirk Leiss almost 10 years ago

To simplify the whole progress I tried the following:

deactivate tvh service, shutdown, disconnect tuners, restart, connect tuners in the right order one after another, restart tvh service.

This worked for me without deleting/copying...

Is there any way to tell the system to assign the devices always in the same order?

#8

Updated by Adam Sutton almost 10 years ago

Just a quick note. The duplicate tuner issue is almost certainly because you've removed and reinserted tuners without properly allowing resources to be cleaned. Andsince tvh keeps old config, the problem may persist.

Check contents of /dev/dvb when this happens and syslog.

Can also happen I'd driver locks and reloads things .

Adam

#9

Updated by Michal Leinweber almost 10 years ago

Finally I found the answer in this forum in post: https://www.lonelycoder.com/redmine/boards/5/topics/1961

I have created file /etc/modprobe.d/options-dvb.conf first with adapters 0,1,2 (Evolve Venus has two tuners):

options dvb_usb_it913x adapter_nr=0,1
options smsdvb adapter_nr=2

but the Venus card has some problems on reboot saying that it finds adapter in warm state and then creating not functioning adapters 0 and 1. And then moreover creating functional adapters 2 and 3. Then because there was not space for Mars card it got adapter 4. So everything messed up again.

Than I followed the recommendation from the post to shift adapters numbers higher, so that if new uncofingured adapter is inserted it will not confuse current configuration. So finally my config file /etc/modprobe.d/options-dvb.conf is:

options dvb_usb_it913x adapter_nr=5,6
options smsdvb adapter_nr=7

And still sometimes after reboot there are NOT functioning adapters 0,1 that can be ignored, because functioning adapters are fixed at configured numbers 5,6,7 and everything is working.

#10

Updated by Dirk Leiss almost 10 years ago

But the problem is that I have two identical adapters. So I have to use MAC Adress or something like that.
Isn't it possible to tell TVH not to look for new adapters, instead only to use the ones already in config?
I spent hours now to setup a minimal ubuntu server on my PC and I am really fxxxed up now.
Everything is running now, but I am fearing next reboot.
Openelec makes the things easy because I can just turn TVH on/off an everything works in a minute.
On Ubuntu I was not able to copy my config because of write restrictions etc... (Linux noob) There maybe a way but I am still too new to Linux so it takes hours of googling for me.
Why is tvheadend folder read/write protected by default?

I hope there will be an easier solution..... because my Windows DVBViewer times are over and TVH is such a nice thing....

#12

Updated by Michal Leinweber almost 10 years ago

Dirk Leiss wrote:

But the problem is that I have two identical adapters. So I have to use MAC Adress or something like that.

Hello Dirk,

try my solution. It is not problem, if you have 2 identical adapters. They uses the same driver and you can specify "adapter_nr=5,6" so first gets adapter5 and second gets adapter6. And for third dvb-s adapter use adapter_nr=7.

And yes you can tune udev as Nathan posted, but this solution is simpler.

#13

Updated by Adam Sutton almost 10 years ago

  • Status changed from Need feedback to Rejected

Guys,

I don't believe this is a bug in TVH so I'm going to close.

It is known there are limitations with the way TVH manages adapter configuration and there are already some FR's in to cover this. Hopefully we'll try and look at this in the near future.

But the main cause of the problems from what I can tell are dodgy drivers/firmware that result in multiple device entries being created.

Adam

#14

Updated by Michal Leinweber over 9 years ago

Yes Adam I agree that it is problem in drivers and not in TVHeadend.

Also available in: Atom PDF