Mailing List Archive

HDHomeRun issues following OS upgrade to Ubuntu 18.04 from 16.04
Hi.

I have just upgraded the operating system on my backend machine to
Ubuntu 18.04 from 16.04. The MythTV version before and after the OS
upgrade is the same: 0.29 from the Mythbuntu PPA.

Once I fixed the LIRC problem (by running Stephen Worthington's script
and also changing the LIRC driver to default instead of devinput) I
could record and channel-change from my PVRUSB2 tuners.

My HDHR tuners are another matter: when I open Live TV and change input
to one of the HDHR tuners I get a picture, but when I try and change to
another channel I get a timeout after 20 seconds. I change channels from
an event script thusly, and this worked fine before the upgrade:

#!/bin/bash

# Call as event script with parameters %CARDID% and %CHANID%

# Parameters
OURSOURCEID=4
OURDVBCMOD=a8qam256-6875
OURHDHRDEVICE=1420577E

/usr/bin/logger $0: $*
if [ "$1" == "%CARDID%" ] ; then
exit 0
fi

SOURCEID=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT sourceid
FROM capturecard WHERE cardid=$1;" mythconverg`

if [ "$SOURCEID" != "$OURSOURCEID" ] ; then
exit 0
fi

MPLEXID=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT mplexid FROM
channel WHERE chanid=$2 AND sourceid=$SOURCEID;" mythconverg`

FREQ=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT frequency FROM
dtv_multiplex WHERE mplexid=$MPLEXID;" mythconverg`

TUNER=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT
RIGHT(videodevice,1) from capturecard where cardid=$1;" mythconverg`

/usr/bin/logger $0: Issuing command /usr/bin/hdhomerun_config
$OURHDHRDEVICE set /tuner$TUNER/channel $OURDVBCMOD:$FREQ
/usr/bin/hdhomerun_config $OURHDHRDEVICE set /tuner$TUNER/channel
$OURDVBCMOD:$FREQ

I see in the logs that this is indeed being called. Here are a few
sample entries:

Aug 28 09:46:15 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:290
Aug 28 09:46:16 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:290
Aug 28 09:46:23 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
Aug 28 11:02:40 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
Aug 28 11:02:41 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
Aug 28 11:02:49 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
Aug 28 11:02:51 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298

Another symptom is that when I enter the Cards menu in mythtv-setup it
hangs on the "Loading..." screen such that I have to kill it (with
signal -9).

I would appreciate any guidance anyone might have.

Thanks, Jan
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDHomeRun issues following OS upgrade to Ubuntu 18.04 from 16.04 [ In reply to ]
On Fri, 28 Aug 2020 11:33:06 +0200, you wrote:

>Hi.
>
>I have just upgraded the operating system on my backend machine to
>Ubuntu 18.04 from 16.04. The MythTV version before and after the OS
>upgrade is the same: 0.29 from the Mythbuntu PPA.
>
>Once I fixed the LIRC problem (by running Stephen Worthington's script
>and also changing the LIRC driver to default instead of devinput) I
>could record and channel-change from my PVRUSB2 tuners.
>
>My HDHR tuners are another matter: when I open Live TV and change input
>to one of the HDHR tuners I get a picture, but when I try and change to
>another channel I get a timeout after 20 seconds. I change channels from
>an event script thusly, and this worked fine before the upgrade:
>
>#!/bin/bash
>
># Call as event script with parameters %CARDID% and %CHANID%
>
># Parameters
>OURSOURCEID=4
>OURDVBCMOD=a8qam256-6875
>OURHDHRDEVICE=1420577E
>
>/usr/bin/logger $0: $*
>if [ "$1" == "%CARDID%" ] ; then
> exit 0
>fi
>
>SOURCEID=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT sourceid
>FROM capturecard WHERE cardid=$1;" mythconverg`
>
>if [ "$SOURCEID" != "$OURSOURCEID" ] ; then
> exit 0
>fi
>
>MPLEXID=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT mplexid FROM
>channel WHERE chanid=$2 AND sourceid=$SOURCEID;" mythconverg`
>
>FREQ=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT frequency FROM
>dtv_multiplex WHERE mplexid=$MPLEXID;" mythconverg`
>
>TUNER=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT
>RIGHT(videodevice,1) from capturecard where cardid=$1;" mythconverg`
>
>/usr/bin/logger $0: Issuing command /usr/bin/hdhomerun_config
>$OURHDHRDEVICE set /tuner$TUNER/channel $OURDVBCMOD:$FREQ
>/usr/bin/hdhomerun_config $OURHDHRDEVICE set /tuner$TUNER/channel
>$OURDVBCMOD:$FREQ
>
>I see in the logs that this is indeed being called. Here are a few
>sample entries:
>
>Aug 28 09:46:15 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:290
>Aug 28 09:46:16 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:290
>Aug 28 09:46:23 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
>Aug 28 11:02:40 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
>Aug 28 11:02:41 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
>Aug 28 11:02:49 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
>Aug 28 11:02:51 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>/usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
>
>Another symptom is that when I enter the Cards menu in mythtv-setup it
>hangs on the "Loading..." screen such that I have to kill it (with
>signal -9).
>
>I would appreciate any guidance anyone might have.
>
>Thanks, Jan

I thought that HDHRs were fully supported by MythTV - mythbackend
should handle channel scanning and channel changing. There should not
be any need for a channel changing script.

https://www.mythtv.org/wiki/Silicondust_HDHomeRun_Dual

I presume that you have installed one of the fixes that makes
mythbackend wait for the network to be actually available before it is
started. Ubuntu 18.04 starts up quite a bit faster than 16.04,
especially if it is running from an SSD, and if you do not have a fix
for this race condition, even if you did not need it in 16.04 you
almost certainly will need it in 18.04.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDHomeRun issues following OS upgrade to Ubuntu 18.04 from 16.04 [ In reply to ]
Curently, still working on a forced upgrade.
HD failed on primary control machine, necessitating a replacement with
an already staged replacement SSD. It was on its way out, finally went
out in the morning, not allowing me to logon at all.
Annoyingly, some software was lost, updates for specific hardware
that'll have to be redownloaded.
Ubuntu 20.04 LTS, still lagging, much to my annoyance, although,
premature release and infinite updates is even more annoying.
Still, there are times when getting out my ten pound reprogramming
hammer feels appropriate.  ;)

On 8/28/20 6:05 AM, Stephen Worthington wrote:
> On Fri, 28 Aug 2020 11:33:06 +0200, you wrote:
>
>> Hi.
>>
>> I have just upgraded the operating system on my backend machine to
>> Ubuntu 18.04 from 16.04. The MythTV version before and after the OS
>> upgrade is the same: 0.29 from the Mythbuntu PPA.
>>
>> Once I fixed the LIRC problem (by running Stephen Worthington's script
>> and also changing the LIRC driver to default instead of devinput) I
>> could record and channel-change from my PVRUSB2 tuners.
>>
>> My HDHR tuners are another matter: when I open Live TV and change input
>> to one of the HDHR tuners I get a picture, but when I try and change to
>> another channel I get a timeout after 20 seconds. I change channels from
>> an event script thusly, and this worked fine before the upgrade:
>>
>> #!/bin/bash
>>
>> # Call as event script with parameters %CARDID% and %CHANID%
>>
>> # Parameters
>> OURSOURCEID=4
>> OURDVBCMOD=a8qam256-6875
>> OURHDHRDEVICE=1420577E
>>
>> /usr/bin/logger $0: $*
>> if [ "$1" == "%CARDID%" ] ; then
>> exit 0
>> fi
>>
>> SOURCEID=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT sourceid
> >FROM capturecard WHERE cardid=$1;" mythconverg`
>> if [ "$SOURCEID" != "$OURSOURCEID" ] ; then
>> exit 0
>> fi
>>
>> MPLEXID=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT mplexid FROM
>> channel WHERE chanid=$2 AND sourceid=$SOURCEID;" mythconverg`
>>
>> FREQ=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT frequency FROM
>> dtv_multiplex WHERE mplexid=$MPLEXID;" mythconverg`
>>
>> TUNER=`/usr/bin/mysql -umythtv -pmythtv -s -N -e "SELECT
>> RIGHT(videodevice,1) from capturecard where cardid=$1;" mythconverg`
>>
>> /usr/bin/logger $0: Issuing command /usr/bin/hdhomerun_config
>> $OURHDHRDEVICE set /tuner$TUNER/channel $OURDVBCMOD:$FREQ
>> /usr/bin/hdhomerun_config $OURHDHRDEVICE set /tuner$TUNER/channel
>> $OURDVBCMOD:$FREQ
>>
>> I see in the logs that this is indeed being called. Here are a few
>> sample entries:
>>
>> Aug 28 09:46:15 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>> /usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:290
>> Aug 28 09:46:16 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>> /usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:290
>> Aug 28 09:46:23 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>> /usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
>> Aug 28 11:02:40 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>> /usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
>> Aug 28 11:02:41 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>> /usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
>> Aug 28 11:02:49 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>> /usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
>> Aug 28 11:02:51 dracor mythtv: /home/mythtv/chch_hdhr: Issuing command
>> /usr/bin/hdhomerun_config 1420577E set /tuner0/channel a8qam256-6875:298
>>
>> Another symptom is that when I enter the Cards menu in mythtv-setup it
>> hangs on the "Loading..." screen such that I have to kill it (with
>> signal -9).
>>
>> I would appreciate any guidance anyone might have.
>>
>> Thanks, Jan
> I thought that HDHRs were fully supported by MythTV - mythbackend
> should handle channel scanning and channel changing. There should not
> be any need for a channel changing script.
>
> https://www.mythtv.org/wiki/Silicondust_HDHomeRun_Dual
>
> I presume that you have installed one of the fixes that makes
> mythbackend wait for the network to be actually available before it is
> started. Ubuntu 18.04 starts up quite a bit faster than 16.04,
> especially if it is running from an SSD, and if you do not have a fix
> for this race condition, even if you did not need it in 16.04 you
> almost certainly will need it in 18.04.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users@mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDHomeRun issues following OS upgrade to Ubuntu 18.04 from 16.04 [ In reply to ]
On 8/28/20 6:05 AM, Stephen Worthington wrote:
> I thought that HDHRs were fully supported by MythTV

They are, no need for a channel changing script.

Doug
Re: HDHomeRun issues following OS upgrade to Ubuntu 18.04 from 16.04 [ In reply to ]
On 8/28/20 6:22 AM, Doug Lytle wrote:
> On 8/28/20 6:05 AM, Stephen Worthington wrote:
>> I thought that HDHRs were fully supported by MythTV
>
> They are, no need for a channel changing script.
>
> Doug
>
I find the HDHR installation very straight forward, particularly on
*buntu 18.04 or 20.04. I've documented what I did so I can repeat it if
stuff fails. Here's a link:

https://mythtvinstall.blogspot.com/2020/07/combined-mythtv-v31-media-system-and.html

Jim A
Re: HDHomeRun issues following OS upgrade to Ubuntu 18.04 from 16.04 [ In reply to ]
On 28/08/2020 12:05, Stephen Worthington wrote:
> I thought that HDHRs were fully supported by MythTV - mythbackend
> should handle channel scanning and channel changing. There should not
> be any need for a channel changing script.

Still does not work if I turn the script into a no-op.

> https://www.mythtv.org/wiki/Silicondust_HDHomeRun_Dual

I just tried re-entering mythtv-setup's Cards menu and I can. Nothing I
see there is out of the ordinary: the device is properly detected, its
serial number and IP address are correct, all 4 tuners are populated.

> I presume that you have installed one of the fixes that makes
> mythbackend wait for the network to be actually available before it is
> started. Ubuntu 18.04 starts up quite a bit faster than 16.04,
> especially if it is running from an SSD, and if you do not have a fix
> for this race condition, even if you did not need it in 16.04 you
> almost certainly will need it in 18.04.

My network interface is statically configured. Many of the "fixes" out
there on the interwebs assume that the network is configured by Network
Manager.

In any event, if my symptoms are due to the problem you describe it
would be resolved by restarting mythtv-backend once the network is
definitely up, and it isn't.

Anyway, I have now added systemd-networkd-wait-online.service to the
After and Wants statements of the mythtv-backend.service file.

So still looking for hints.

Thanks, Jan
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDHomeRun issues following OS upgrade to Ubuntu 18.04 from 16.04 [ In reply to ]
On 28/08/2020 13:41, Jan Ceuleers wrote:
> So still looking for hints.

I got it working, by deleting and recreating all tuners.

I however confirm that my channel changing script (which is plugged into
MythTV as an event handler since HDHR tuners don't support a channel
changing script directly) is indeed necessary. I'm not sure why as I
don't know what commands MythTV issues to the HDHR. Perhaps the commands
MythTV sends cause the HDHR to rely on defaults for some unspecified
parameters which work in many places around the world but not with my
particular cable provider (which is Telenet in Belgium).

I also had unrelated issues with my pvrusb2 tuners but I'll raise those
on the pvrusb2 mailing list.

Thanks, Jan
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDHomeRun issues following OS upgrade to Ubuntu 18.04 from 16.04 [ In reply to ]
>
>
> I however confirm that my channel changing script (which is plugged into
> MythTV as an event handler since HDHR tuners don't support a channel
> changing script directly) is indeed necessary. I'm not sure why as I
> don't know what commands MythTV issues to the HDHR. Perhaps the commands
> MythTV sends cause the HDHR to rely on defaults for some unspecified
> parameters which work in many places around the world but not with my
> particular cable provider (which is Telenet in Belgium).
>
>
> Older MythTV versions give an "auto:frequency" command and then the
HDHomeRun tries all modulation schemes configured in parameter
/sys/dvbc_modulation. If you modulation scheme is not in this list then
tuning will fail. Setting /sys/dvbc_modulation to what your provider uses
(256qam and 6875 ksym/sec if the Internet is right) with the
hdhomerun_config utility should fix it.
This is solved in MythTV version 31. For the HDHomeRun DVB-C there is now a
more explicit tuning command given that includes the symbol rate so it
should now always work.
For the full details see tickets https://code.mythtv.org/trac/ticket/12792
and https://code.mythtv.org/trac/ticket/13371#ticket.

Klaas.
Re: HDHomeRun issues following OS upgrade to Ubuntu 18.04 from 16.04 [ In reply to ]
On 29/08/2020 11:47, Klaas de Waal wrote:
>
> I however confirm that my channel changing script (which is plugged into
> MythTV as an event handler since HDHR tuners don't support a channel
> changing script directly) is indeed necessary. I'm not sure why as I
> don't know what commands MythTV issues to the HDHR. Perhaps the commands
> MythTV sends cause the HDHR to rely on defaults for some unspecified
> parameters which work in many places around the world but not with my
> particular cable provider (which is Telenet in Belgium).
>
>
> Older MythTV versions give an "auto:frequency" command and then the
> HDHomeRun tries all modulation schemes configured in parameter
> /sys/dvbc_modulation. If you modulation scheme is not in this list then
> tuning will fail. Setting /sys/dvbc_modulation to what your provider
> uses (256qam and 6875 ksym/sec if the Internet is right) with the
> hdhomerun_config utility should fix it.
> This is solved in MythTV version 31. For the HDHomeRun DVB-C there is
> now a more explicit tuning command given that includes the symbol rate
> so it should now always work.
> For the full details see
> tickets https://code.mythtv.org/trac/ticket/12792 
> and https://code.mythtv.org/trac/ticket/13371#ticket.

Thanks Klaas.

/sys/dvbc_modulation already contains a8qam256-6875 so this does not
seem to be sufficient to work around the issue here. Still, I now have a
working setup so won't worry about it.

Cheers, Jan
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: HDHomeRun issues following OS upgrade to Ubuntu 18.04 from 16.04 [ In reply to ]
On 29/08/2020 11:47, Klaas de Waal wrote:
>
> I however confirm that my channel changing script (which is plugged into
> MythTV as an event handler since HDHR tuners don't support a channel
> changing script directly) is indeed necessary. I'm not sure why as I
> don't know what commands MythTV issues to the HDHR. Perhaps the commands
> MythTV sends cause the HDHR to rely on defaults for some unspecified
> parameters which work in many places around the world but not with my
> particular cable provider (which is Telenet in Belgium).
>
>
> Older MythTV versions give an "auto:frequency" command and then the
> HDHomeRun tries all modulation schemes configured in parameter
> /sys/dvbc_modulation. If you modulation scheme is not in this list then
> tuning will fail. Setting /sys/dvbc_modulation to what your provider
> uses (256qam and 6875 ksym/sec if the Internet is right) with the
> hdhomerun_config utility should fix it.
> This is solved in MythTV version 31. For the HDHomeRun DVB-C there is
> now a more explicit tuning command given that includes the symbol rate
> so it should now always work.
> For the full details see
> tickets https://code.mythtv.org/trac/ticket/12792 
> and https://code.mythtv.org/trac/ticket/13371#ticket.

Revisiting this old-ish topic.

Some months after I pressed MythTV 31 into service on my Ubuntu 18.04
backend I was finally sufficiently motivated to try and resolve an issue
whereby tuning one specific channel would always fail on the HDHR. Since
I also have that channel available from another video source I had just
disabled the HDHR version of the channel and left it at that.

My investigation revealed that this was the only channel (that I'm
recording from) that is transmitted on the 290MHz multiplex; all other
channels (the ones that consistently tune OK) are on the 298MHz multiplex.

So I looked in the database for differences between how these
multiplexes are configured, and what I found is the following:

- Field dtv_multiplex.frequency contained 290 for the failing multiplex,
and 298000000 for the working-one. So I also added six zeroes.

- Fields dtv_multiplex.symbolrate, modulation, and constellation
contained auto, so I set them to the same values as for the working
multiplex (which is 6875000, qam_256 and qam_256, respectively)

- Field dtv_multiplex mod_sys contained something other than DVB-C/A
which is what that field contains for the working transport, so I
changed it to that value. Sorry, I don't remember what value it had
before I changed it.

I don't know which of the above changes made it work, but it does now work.

I hope that this helps someone.

Cheers, Jan
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org