[mythtv-users] mythbackend Start-up issue - possible race with dvb device firmware loading

David Watkins watkinshome at gmail.com
Wed Nov 18 09:34:06 UTC 2020

After power on, about 1 in 20 mythbackend startups are failing for me.

Symptoms are that the backend is running, as reported by *systemctl status,*
but is unresponsive. The mythbackend logfile starts normally but stops
after about 10 seconds with no error

Recordings and frontend connections fail and manual intervention is
required to recover.

*systemctl restart mythbackend* succeeds after a long delay (more than a
minute) and the backend then starts normally.

The best clue I have is this, from the system journal

Nov 16 21:09:57 localhost.localdomain kernel: si2168 4-0064: downloading
firmware from file 'dvb-demod-si2168-b40-01.fw'
Nov 16 21:09:58 localhost.localdomain kernel: si2168 4-0064: firmware
version: B 4.0.11
Nov 16 21:09:58 localhost.localdomain kernel: si2157 5-0060: firmware
version: 3.0.5

is happening at the same time as this, in the mythbackend log
2020-11-16 21:09:58.235627 I [2496/2496] CoreContext cardutil.cpp:1189
(SetDeliverySystem) - CardUtil[2]: Set delivery system: DVB-T2
2020-11-16 21:09:58.296591 D [2496/2496] CoreContext
recorders/dtvchannel.cpp:295 (SetChannelByString) -
DTVChan[2](/dev/dvb/adapter292e/frontend0): SetChannelByString(1):
Initialize multiplex options m_tunerType:34 mplexid:8
2020-11-16 21:09:58.321345 D [2496/2558] TVRecEvent portchecker.cpp:75
(checkPort) - PortChecker::checkPort(): host port 3306 timeLimit
30000 linkLocalOnly 1

...which is where the backend log stops.

On successful startups the firmware load appears to complete during the
second before the mythbacked access.

I have a udev rule on the usb DVB capture device to create a meaningful
name as below.

SUBSYSTEM=="dvb", ATTRS{idProduct}=="025f", PROGRAM="/bin/sh -c 'K=%k;
K=$${K#dvb}; printf dvb/adapter292e/%%s $${K#*.}'", SYMLINK+="%c",

and the following wait commands in /etc/systemd/system/mythbackend.service


As far as I can tell this is not a problem.  journalctl reports

Nov 16 21:09:12 localhost.localdomain systemd[1]: Found device

Which is 45s before mythbackend log starts and 55s before it stops (so the
udev wait is probably unnecessary and may not work if required?)

Assuming that this is the problem, how do I delay starting mythbackend
until the dvb device firmware has loaded?

I'm running Fedora FC32 with MythTV 32 on a Zotac Ion.

I have two usb dvb-t capture devices, a nanostick 290 and a nanostick
292e.  The 290 does not appear to require a firmware download.  It is the
292e which is apparently causing the trouble.

Thanks in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20201118/92c24005/attachment.htm>

More information about the mythtv-users mailing list