[SOLVED]Channel Scan – Timed out, no channels

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Channel Scan – Timed out, no channels

Post by kmdewaal »

Hi guys,

Another approach... Just found that kaffeine has a "-d" option to give lots of debug output. Can you please capture this with kaffeine playing TV, e.g.

Code: Select all

kaffeine -d 2>&1 | tee result.log
and post the result.

Thanks,
Klaas.
timmy527
Newcomer
Posts: 14
Joined: Sun Oct 05, 2014 5:22 pm
United States of America

Re: Channel Scan – Timed out, no channels

Post by timmy527 »

Latest as well, thx !

tim
Attachments
dvbv5-scan-mythfolks.output.txt
(76.94 KiB) Downloaded 56 times
hutsmythtv
Junior
Posts: 18
Joined: Sat Oct 31, 2020 7:46 pm
United States of America

Re: Channel Scan – Timed out, no channels

Post by hutsmythtv »

Klaas,

Here is 3-4 minutes of my local FOX station on Kaffeine (results.log attached)

Thanks!

Mike
Attachments
result.log
(166.91 KiB) Downloaded 73 times
User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Channel Scan – Timed out, no channels

Post by kmdewaal »

Hi guys,

Thanks for all the testing. I think I have a clue and I have a new patch attached, named 20201117-wintv-atsc-debug.patch
If this actually works (wishful thinking....) then it is going into master.
Once I am certain of the cause then I can make a minimal patch for v31 as well.

The patch can be applied when the first patch is removed, so for instance like this:

Code: Select all

cd ~/mythtv-master/mythtv/mythtv
git checkout .
git apply 202011127-wintv-atsc-debug.patch
make
make install
It could be that you need to do a cleanup first, then the complete sequence can be this:

Code: Select all

cd ~/mythtv-master/mythtv/mythtv
git checkout .
make distclean
git pull
git apply 202011127-wintv-atsc-debug.patch
./configure --prefix=/home/<your_home_directory>/mythtv-master/usr
make
make install
As before, please make a log of a channel scan with the full logging, like this:

Code: Select all

mythtv-setup -v channel,chanscan,record,siparser,eit --loglevel=debug --logpath=.
This will create a file mythtv-setup.....log in the current directory and that is the file I am interested in.

@Mike, a while ago you got it compiled but you did not get it running because of mysql issues. What you could do is install e.g. mythtv v31 from a repository; this should also install and configure mysql and then you have both mysql and a configured database.
When you then start mythtv-setup as described previously then mysql and the database are present and it should work.

Thanks,
Klaas.
Attachments
20201117-wintv-atsc-debug.patch
(53.21 KiB) Downloaded 54 times
hutsmythtv
Junior
Posts: 18
Joined: Sat Oct 31, 2020 7:46 pm
United States of America

Re: Channel Scan – Timed out, no channels

Post by hutsmythtv »

Klaas,

Sorry, I forgot to say last week - I did apt install mysql on my install and it seems to be working. I wasn't sure if I should install mysql or mariahdb, but mysql seems to be working ok. Anyway, I completed the patch install on my system this evening and ran thru the scan. Alas, again "Failed to find any channels". Attached is the log from that attempt. Hope this helps.

Thanks!

Mike
Attachments
mythtv-setup.20201118023454.30404.7z
(69.3 KiB) Downloaded 78 times
User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Channel Scan – Timed out, no channels

Post by kmdewaal »

OK, do not despair, we are getting somewhere. I made the tuning command similar to what Kaffeine is doing but it was not correct.
Find attached a new patch, to be applied in the same way as the previous.
Looking forward to the result.

Thanks,
Klaas.
Attachments
20201118-wintv-atsc-debug.patch
(54.72 KiB) Downloaded 54 times
hutsmythtv
Junior
Posts: 18
Joined: Sat Oct 31, 2020 7:46 pm
United States of America

Re: Channel Scan – Timed out, no channels

Post by hutsmythtv »

Klaas,

I tried the new patch on my system - still no channels found. The log results for that scan is attached.
A question on the adding of the patch to a system. Are the steps to be run as "sudo ......."? I ran all of the steps as you displayed, but the make install I ran as "sudo make install"? When I run as "make install" it is very short and has errors?

Thanks much!

Mike
Attachments
mythtv-setup.20201119025525.1926.7z
(71.43 KiB) Downloaded 50 times
User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Channel Scan – Timed out, no channels

Post by kmdewaal »

OK, next modification, removed now the setting of parameter inversion because Kaffeine also does not do this; this is commented out in the Kaffeine source code. Also there are errors about inversion in the log of dvbv5-scan that suggest this could be an issue.
New patch attached with an additional log message when setting the inversion is skipped.

About your "make install". I recall you have first done a "sudo make install" and at that time everything has been copied as root. This means the file ownership of everything in /home/mike/mythtv-master/usr is set to root and you can only overwrite that when you are root again, so with another sudo command. Other than that it does not find channels yet your mythtv-setup does run OK so there is no need to change your procedure.

If you want you can do the following:

Code: Select all

cd ~/mythtv-master
sudo mv usr usr_to_be_deleted
mkdir usr
and after that a "make install" should work.

Thanks,
Klaas.
Attachments
20201119-wintv-atsc-debug.patch
(51.78 KiB) Downloaded 70 times
hutsmythtv
Junior
Posts: 18
Joined: Sat Oct 31, 2020 7:46 pm
United States of America

Re: Channel Scan – Timed out, no channels

Post by hutsmythtv »

Klaas,

I tried that patch on my system - sorry, still no channels found. Latest log file is attached.
But I did get my mythtv-master/usr straightened out (feel so stupid)! Many root files/folders in usr_to_be_deleted.

Thanks much for your continued work!

Mike
Attachments
mythtv-setup.20201120013511.1597.7z
(72.52 KiB) Downloaded 47 times
User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Channel Scan – Timed out, no channels

Post by kmdewaal »

There could be something wrong outside of MythTV that causes problems. The failure of dvbv5-scan points to this, but the success of Kaffeine suggests otherwise. Both dvbv5-scan and Kaffeine use the same libdvbv5.
I would like to investigate now if I can find a cause in your Linux environment.

Can you please do the following
  • Shutdown your system
  • Leave it powerless for 30 seconds with disconnected power cord
  • Boot it again
And capture the output of dmesg, e.g

Code: Select all

dmesg > result-dmesg.log
and post it here. What I hope to get from this is the chip identification and the firmware version and possibly interesting error messages.

Then a new attempt with dvbv5-scan, like before but now with more debug, e.g.:

Code: Select all

dvbv5-scan -vvv -o result-dvbv5scan.log dtv-scan-tables/atsc/us-ATSC-center-frequencies-8VSB-062009
and post the result.
Please also the output of dmesg again, e.g.

Code: Select all

dmesg > result-dmesg-after-scan.log
Then the list of kernel modules:

Code: Select all

lsmod > result-lsmod.log
Then the modinfo of all modules:

Code: Select all

lsmod | grep -v Module | awk '{print $1}' | xargs modinfo > result-modinfo.log
I've also made another minor fix to MythTV; this version does not set the delivery system anymore in the tuning request when the delivery system is already correctly configured. It is a long shot, but who knows. Patch is attached.

Thanks,
Klaas.
Attachments
20201120-wintv-atsc-debug.patch
(52.31 KiB) Downloaded 50 times
timmy527
Newcomer
Posts: 14
Joined: Sun Oct 05, 2014 5:22 pm
United States of America

Re: Channel Scan – Timed out, no channels

Post by timmy527 »

Thanks Klaas:
Been busy for a few days apologies for the inattention :-)
Attached is the dmesg/lsmod/dvbv5-scan info.

Also, of note when I try to apply the patch , gets some errors. Did a complete nuke of the mythtv and usr dirs and fresh git pull, same messages on git apply. Running configure/make and will see what happens.

Thx
Tim

timmcd@ubuntu-home02:/usr/local/mythtv-master/mythtv/mythtv$ git apply 20201120-wintv-atsc-debug.patch
error: patch failed: mythtv/libs/libmythtv/cardutil.cpp:765
error: mythtv/libs/libmythtv/cardutil.cpp: patch does not apply
error: patch failed: mythtv/libs/libmythtv/cardutil.h:412
error: mythtv/libs/libmythtv/cardutil.h: patch does not apply
error: patch failed: mythtv/libs/libmythtv/dtvconfparserhelpers.h:39
error: mythtv/libs/libmythtv/dtvconfparserhelpers.h: patch does not apply
Attachments
result-dvbv5scana.log.gz
(1.91 KiB) Downloaded 63 times
result_lsmod.log.gz
(1.17 KiB) Downloaded 48 times
result-modinfo.log.gz
(86.1 KiB) Downloaded 49 times
timmy527
Newcomer
Posts: 14
Joined: Sun Oct 05, 2014 5:22 pm
United States of America

Re: Channel Scan – Timed out, no channels

Post by timmy527 »

Looks to have only attached 3 files.. here's the other
Attachments
result_dmesg_after-scan.log.gz
(29.72 KiB) Downloaded 64 times
result-dmesg.log.gz
(21.63 KiB) Downloaded 62 times
User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Channel Scan – Timed out, no channels

Post by kmdewaal »

Have pushed some of the changes to master. Attached is the patch with the remaining changes that can be applied to the latest master.
Attachments
20201121-wintv-atsc-debug.patch
(40.43 KiB) Downloaded 65 times
User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Channel Scan – Timed out, no channels

Post by kmdewaal »

Hi Tim,

The file result_dmesg_after_scan is very interesting. It shows that the RISC cpu on the card (and that is the thing that does the demodulation) is failing. The system boot is OK, the firmware is correct but when you start the scan then this happens:

Code: Select all

   1340 [  333.049663] si2157 4-0060: found a 'Silicon Labs Si2157-A30'
   1341 [  333.098252] si2157 4-0060: firmware version: 3.0.5
   1342 [  530.368597] cx23885: cx23885[0]: mpeg risc op code error
   1343 [  530.368606] cx23885: cx23885[0]: TS1 B - dma channel status dump
   1344 [  530.368610] cx23885: cx23885[0]:   cmds: init risc lo   : 0xffddf000
   1345 [  530.368613] cx23885: cx23885[0]:   cmds: init risc hi   : 0x00000000
   1346 [  530.368617] cx23885: cx23885[0]:   cmds: cdt base       : 0x00010870
   1347 [  530.368620] cx23885: cx23885[0]:   cmds: cdt size       : 0x0000000a
   1348 [  530.368623] cx23885: cx23885[0]:   cmds: iq base        : 0x00010630
   1349 [  530.368627] cx23885: cx23885[0]:   cmds: iq size        : 0x00000010
   1350 [  530.368630] cx23885: cx23885[0]:   cmds: risc pc lo     : 0xffddf048
   1351 [  530.368633] cx23885: cx23885[0]:   cmds: risc pc hi     : 0x00000000
   1352 [  530.368637] cx23885: cx23885[0]:   cmds: iq wr ptr      : 0x00004194
   1353 [  530.368640] cx23885: cx23885[0]:   cmds: iq rd ptr      : 0x00004198
   1354 [  530.368643] cx23885: cx23885[0]:   cmds: cdt current    : 0x00010898
   1355 [  530.368647] cx23885: cx23885[0]:   cmds: pci target lo  : 0xffed8000
   1356 [  530.368650] cx23885: cx23885[0]:   cmds: pci target hi  : 0x00000000
   1357 [  530.368653] cx23885: cx23885[0]:   cmds: line / byte    : 0x00000000
   1358 [  530.368657] cx23885: cx23885[0]:   risc0:
   1359 [  530.368658] 0x1c0002f0 [ write sol eol count=752 ]
   1360 [  530.368663] cx23885: cx23885[0]:   risc1:
   1361 [  530.368663] 0xffed8000 [ INVALID sol eol irq2 irq1 23 22 21 19 18 cnt0 resync count=0 ]
   1362 [  530.368669] cx23885: cx23885[0]:   risc2:
   1363 [  530.368669] 0x00000000 [ INVALID count=0 ]
As the WinTV card is already available for many years and the firmware has not been updated for many years it is unlikely that this is a bug in the card or in the firmware. However, your processor and motherboard are latest&greatest (Ryzen 7) andI think that there is an incompatibility in the PCIe bus interface. The Ryzen does have PCIe version 4 and the WinTV card is probably version 2 (or maybe even 1 if that exists).
Can you please have a look at the BIOS of your PC and search for the PCIe configuration. With a bit of luck it is possible to configure a compatibility mode, or even the explicit PCIe version.
There is probably also a Linux kernel boot option to configure this.

@Mike, do you also have a latest&greatest PC? Please check also the dmesg output after running dvbv5-scan (or mythtv-setup...) and check the PCIe bus configuration options in the BIOS.

Thanks,
Klaas.
User avatar
kmdewaal
Developer
Posts: 644
Joined: Wed Dec 07, 2016 8:01 pm
Netherlands

Re: Channel Scan – Timed out, no channels

Post by kmdewaal »

Looks like this issue has been seen before, see this:
viewtopic.php?t=2249 and viewtopic.php?t=2779
Also, googling for: "TS1 B - dma channel status dump" gives relevant hits.
One of them is this:
https://github.com/b-rad-NDi/Ubuntu-med ... /issues/51
which suggests to use the following option:
I located the changes to the kernel module and noticed the addition of the cx23885 kernel module parameter dma_reset_workaround to force enable or disable the workaround. Nice!

Setting this parameter to forced on (options cx23885 dma_reset_workaround=2) solves the problem(?!) with kernel 4.20.3 and its kmods, so even though my AMD CPU is anything but current (late 2012) it needs the workaround as well. Interesting.
I do expect that all fixes that were developed in 2017-2018 in the 4.x linux kernel are now in the 5.x series, but it could be that with a latest&greatest system this problem surfaces again.
Post Reply