TVHeadend + OSMC TV tuner issues

Hello there,
I recently bought new Vero 4K+ console, usb TV tuner and usb hub - the Vero bundle. I managed to install TV Headend server + TVheadend HTSP client, ran initial setup, tuned and saved channels within DVB-T2 and here all the problems started.

  1. All worked on the very first boot, but with significant lagging. The higher bitrate, the larger lagging. HD channels over 5Mb/s were not worth watching as picture got frozen every single second for about half - 1second. Voice went ok. After such 0.5-1s picture resynced but this was happening all the time. SD channels and HD around 1Mb/s or lower was lagging like once per 5s or so.
    This experience pushed me to check settings within Kodi/TVHeadend client and finally server settings as well.

  2. I tried to figure out what can be adjusted (increasing buffer size somewhere, disabling/reenabling HW acceleration etc.), however after reboot, only DVB-T Realtek adapter was discovered. (for DVB-T2 I need to use Sony adapter that was gone)

  3. I unplugged USB dongle expecting Vero to rediscover missing adapters, but this led to freezing the console where only unplugging power cord helped to turn it on again.

Spending time with TVHeadend server settings and options I failed to reinitiate adapter functionality, so I decided to reinstall the whole TVHeadend server. To my surprise, all the setting hasn’t been rewritten and I finished with the same setup. Only Realtek adapter discovered.
Ok, I uninstalled it again, then ssh’ed to Vero and deleted the whole /home/osmc/.hts directory
Then installed server again and it went fine with all 3 adapters back. I finished initial configuration of brand new & fresh TVHeadend server instance with default setup, however this brings me to the point 1 again - lagging.

It still lags (I might have a feeling it was bit better with dongle being in usb hub rather in the console itself, but difference isn’t great) and to my surprise, after Kodi reboot, I again finished with Realtek adapter (without doing any config changes this time - just regular reboot). Also point no.3 happens too. When I unplug USB TV tuner, Vero freezes.

When I checked debug logs on the server side at the time Sony adapter was present, I could see adapter is still scanning multiplexes, probably searching for EPG. I was just thinking if that operation doesn’t spend too much resources and maybe switching this off may reduce/stop lagging? (but didn’t have chance to try this as I am now with Realtek only).
I also tried to turn off HW acceleration, but this was even worst. SD channels start to lag as well and HD was not watchable at all. Just to note, TV antenna is ok as I have no issues watching via different DVB-T2 tuner outside of Vero.

Just to add some more information. I am convinced this is software configuration as I have already applied warranty on Vero 4K+ with my local reseller and was provided with brand new console, which is behaving completely same. I am testing this on fresh new OS from the box, without plugins, just made slight adjustments of OSMC UI like turning off GUI sounds and very basic OSMC skin adjustments.

Other than that, Vero is ok, I can also attach external USB disk, play music or movies, just combination of Vero and TV tuner breaks things. Does anybody have similar experience or are you guys working fine with DVB-T2 adapter in Vero?

Your help is much appreciated.

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Depending on the used skin you have to set the settings-level to standard or higher, in summary:

  • enable debug logging at settings->system->logging

  • reboot the OSMC device twice(!)

  • reproduce the issue

  • upload the log set (all configs and logs!) either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A

  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

OSMC skin screenshot:

Ok, I’ve tried to reproduce all issues. As I was already without DVB-T2 adapter at time of writing my original post, I’ve uninstalled TVHeadend Server and removed it’s directory on CLI to have “fresh environment” to start with. Here I enabled debug logging and did following steps.

  1. Rebooted twice as suggested
  2. Inserted USB dongle with TV tuner into usb hub, Installed TVHeadend server, confirmed all 3 adapters are present (green dot next each of them), launched initial setup of headend server on port 9981 and scanned for channels
  3. this time, despite mapping Sony DVB-T2 adapter to DVB-T, it didn’t find any channel (this happened to me previously too, but when retried day later, it found all cca. 100 channels)
  4. I started TVHeadend HTSP client and forced rescanning on the same adapter with same results - no channels found (correct multiplex was selected for my country: CZ) - so in fact as I couldn’t scan any channel, I of course couldn’t reproduce lagging of TV stream
  5. anyway, I rebooted Vero and as expected, after reboot and check of TVHeadend server forntend, both Sony adapters were gone, only Realtek adapter present (red dot next to it)
  6. I removed USB tuner from hub and shortly after Vero got frozen (that was indeed strange as normally it got frozen right after I removed it from usb, now it took minute or so)
  7. unplugged power cord for Vero too boot, stopped debug logging, uploaded it here:

https://paste.osmc.tv/refohunini

You must enable only the Sony DVB-T tuner (it seems CZ TV is only DVB-T2 which the Realtek doesn’t support.). You may have to force remove the Realtek as described here. If you haven’t read that thread then please do.

If the DVB stick stayed powered (soft reboot or leaving the hub powered) it would not be re-initialized fully. Try powering off completely, including the hub, then turn everything on again.

Unfortunately, that’s what happens. Only a cold re-boot will start everything up in the right order.

Right, ok. thank you grahamh to help me understand OSMC better and I apologize if I haven’t expressed myself correctly.
Regarding DVB-T2 - yes, that is correct. This is what I’ve already set up. As you noted, terrestrial broadcasting in CZ is DVB-T2 only, so I associated DVB-T option with Sony DVB-T2 adapter only. I just wanted to stress that at the very beginning (even before launching wizard), all 3 adapters were present (because that wasn’t the case after I rebooted Vero yesterday).
And yes, I can now confirm if I power off USB (or remove dongle completely off usb hub) and then do restart, these 2 “lost” Sony adapters appear again.

Which brings my two questions. Is this know issue that when you trigger Restart from Kodi GUI, DVB-T2/C adapters are lost until USB is powered off? And also, if you power hub off (or remove dongle from USB), the whole Vero freezes. Has this ever been reported to development? Is there any plan to fix such behavior?

The above basically covers 2 from 3 points in my original post. Regarding picture lagging, it’s very interesting that once I unplugged usb (Vero got frozen) + unplug power cord of Vero to do cold restart, once console booted up I was able to scan DVB-T2 (+ discovered channels fine) and during first 5min of watching, freezing was gone and all seemed working ok, except epg, which I can see on the TVheadend url GUI, but it’s not loading onto OSMC/Kodi epg. Not sure whether this might help with performance (I doubt) or unplugging usb + hard reset helped, but I will keep watching this and update in this thread. I guess it’s too early to say that problems with headend server + dongle are gone.

If the DVB dongle is working OK you can do a warm boot or restart Kodi (Power->Exit) and it will be fine. But if it gets into the wrong state, it can only be restored by a power cycle. As for the lock-up, it’s something I’ve encountered but I do a lot of messing about. I can’t recall anyone else reporting it in here. Most users leave their TVH servers running 24/7 so they can catch recordings and it’s not a problem. As for fixing it, I think it’s a TVH issue. IIRC it was the same on RPi when I was using that as a TVH server.

Let us know how it goes. FWIW I watch all my TV through TVH and very rarely have any problems.

I thought I fixed this.

I can think of a potential hack to fix it (just reset USB PHY in bootloader).
I’ll do some digging.

There’s definitely something wrong as when I turned Vero hour later yesterday (from standby as this is the way I normally turn it off rather then completely shut down when you have to unplug power cord to boot up) I faced some lagging again.
So as I did earlier, I wanted to power off both usb and Vero to refresh stuff and it really restarted with Sony adapter up, however I faced “No Signal” error when turn on PVR. This is I would say same state as day ago when I tried to scan for channels many times and can scan nothing. So I repeated this cold reboot of Vero and usb hub couple times with no success. Always booted up with Sony adapter up, however No Signal message. I tried to plug coax cable into another DVB-T2 tuner I was using before bought Vero and all worked fine, so there is no issue with either intermittent signal or bad antenna.
I quit that evening, powered off USB + Vero and retried 9hours later. To my surprise, it is working ok after start. DVB-T2 is decoding and there is no lagging, so seems like very fresh boot up after “some rest out of power socket” helped. I now put Vero into standby (leaving USB dongle in powered usb hub) to try in hour or so, as this was situation I faced yesterday (all ok first thing morning freshly plugged in → 1hr standby → lagging → cold restart → no signal).
As I unboxed Vero 2 days ago, this is really fresh OSMC with no plugin installed, so there shouldn’t be anything on the background that is eating resources. The only thing I have installed was Weather plugin from Services menu (I think it’s Gismeteo).

So I tried again after OSMC wake up and result is far from perfect. At higher bitrates (5Mb/s+) picture is lagging quite often (sound is ok), lower bitrates are watchable but it lags too. SD quality is lagging voice (picture ok). When I check CPU usage, it doesn’t go over 75%, better say at least 2 CPUs usage is pretty low (around 10% or lower). Memory usage is below 20%. I didn’t try to reboot yet, but it is apparent that fresh bootup helped every morning.

I was having these issues from the very first TVH server install also on my previous Vero 4K+. I had it week or two only - I tried to solve these issues with my local reseller and that led to replacing Vero + USB tuner + USB hub in 4 different warranty cases.
first: the remote controller was wrong, second: usb hub didn’t power 1 slot, third after replacing all these and still experienced issues with DVB-T2, they replaced TV tuner and tested it prior sending toi me confirming it is working - this is the usb TV dongle I am now using. finally when nothing has changed, they sent brand new console I got 3 days ago.
Now I have “new everything” and symptoms are still the same so I am quite sure this needs to be somewhere within configuration as I can’t believe it can behave same on the second new set.

I didn’t want to cause the reseller panic or some cardiovascular issues with further claims, So now I found this forum and read how to solve issues with missing DVB-T2 adapter (as this was always among first symptoms after picture lagging and consequent warm reboot. Here I found workaround to remove the whole TVH directory after TVH uninstall and after reinstallation and initial setup the adapter was recognized. Now I know it can only be hard reset, but there is still bunch of other problems including above lagging, sometimes no signal and freezing of Vero when unplugging or turning off usb slot with tuner.

I’d see if you can produce this lagging with a recording first.

yes, it lags during recording too and when I play it, then it’s on the recording as well.

A sample would be good so we can see if we can reproduce it here

Right, I tried to upload recording to the google drive (110MB) so hope you would be able to download it. It should have correct permissions.
I have also captured log from TVHeadend server. Not sure whether these errors during (lagging) playback are normal.

I powered off/on both Vero and usb hub with tv tuner to try things on fresh bootup and it again finished with either “no signal” or “no free adapter”. That took maybe 10 reboots after I was finally able to tune in (and without lagging). I checked TVH server logs and there were no errors at all when picture was not lagging, so the errors I posted yesterday definitely matter. I checked status of the server and was curious about SNR value because of previous “no signal” errors. It shows something between 20-30 dBm.
At 20dBm it was decoding fine without lagging/errors. After hour of watching I tried switching channels, not sure whether this could change anything, but lagging started again and then I could see errors in the logs too (Continuity counter error). When I checked SNR it was 29 dBm.
When I googled about correct SNR values for TV signal, it says anything over 25. So could I be just on that border level that is causing issues? It’s very interesting when I plug coaxial cable from Sony (Vero) tuner into my standard DVB-T2 tuner, all works fine.
Can anybody post his SNR value just to know whether I am really on the opposite side of good signal reception?

Those SNR values are not very reliable and vary from adapter to adapter. So if anyone responds they will need to confirm they are using the same Sony adapter.

What is certain is the tuners in TVs work better than any USB tuner stick. No idea why that should be. I have a mast-head amplifier and another amplifier-splitter to route the signal to the TV and two USB sticks. My aerial is in the roof and I have no line of sight to the transmitter though.

ok, understood. as this might be an issue with my antenna/signal route which I might look into later, there are still remaining two issues, that might be worth looking or fixing because I as new user wasn’t aware about workarounds in place. when I tried to set up TVH server and things didn’t work as expected for the first run, I logically tried both rebooting console and unplugging usb stick. These two actions led to either loosing DVB-T2/C adapter and/or freezing console itself. As local reseller wasn’t also aware about such behavior, it took us almost 2 months to sort all warranty procedures and finally I was given new console. No complaints for that, but would save a lot of time and effort (+ shipping costs) if these two issues (no.2 & no.3 from my original post) were fixed.

Anyway, I really appreciate your help here as what took 2 months when I was in contact with reseller we really figured out within 3 days on this forum. Thank you again.

I again played a little bit with tuner (as I’d love to use what I paid for) and I really have a feeling, this is not signal strength related only (if so). First of all, in all 3 or 4 cases when I completely turned off both Vero and usb hub out of power for 8hours or so (during night) and turned back on morning, all was working fine. Also the very first initialization/configuration of TVH server + channels scanning, all was ok, channels were found and I could watch them. This took me couple minutes only so when I found out all is ok, I put Vero into standby (leaving usb hub with tv tuner on). When I came back in couple hours and started watching TV, then the lagging appeared. Very first thing that came to my mind was to do the restart. After all discussion above, I was advised that warm restart is not good as you finish with “no free adapter” error (only DVB-T Realtek was discovered, both DVB-T2/C Sony adapters gone). So I did cold restart both of Vero and usb dongle and then Sony adapters went up, but the error was “No signal”. EPG is loaded fine, however I can not watch anything due to no signal. I can do cold restarts and approx. 1 of 10 or maybe even of 20 restarts fixes things, but I rather give up, turn off Vero + usb hub completely out of power socket and give it half a day off. Then the scenario I am describing repeats. After “hours of rest”, the very first boot brings things back into live, which is kind of strange. Anybody has any idea, what to check or so?

Grahamh mentioned above that if tuner gets into the wrong state it can only be restored by a power cycle. This is my case, but if all we discussed above is true and the issue here is really “weak signal”, then this should not bring tuner into a “bad state” and simple warm boot should be ok. But not in my case, if I do a warm boot, then I loose Sony adapter and I have to do a power cycle, which always brings me from “no free adapter found” into “no signal”.

I will check the warm boot situation shortly and feed back

Sam

1 Like

Issue #1 described in the very first post seems to be fixed by checking “force old status” in TVH server under TV adapter settings.
Then all “continuity counter errors” are gone - at least for now, will be testing this further.

For issue #2 (missing adapters after warm reboot) Sam noted he will look into that.
I guess we will have to live with issue #3 (freezing console once TV dongle is removed from usb).

That’s probably related to #2 as well.