[mythtv-users] udev and systemd requirements for MythTV on Ubuntu 20.04?

Stephen Worthington stephen_agent at jsw.gen.nz
Mon Jul 27 16:14:43 UTC 2020


On Mon, 27 Jul 2020 10:43:53 -0400, you wrote:

>I'm doing some planning for moving from MythTV v31 on Ubuntu 18.04 to
>MythTV v31 on Ubuntu 20.04.  There are a lot of considerations, like my
>current system using MariaDB and the current issue regarding that on Ubuntu
>20.04.
>
>However, my concerns today are related to udev rules and systemd overrides.
>
>On my 18.04 system, I have one udev rule related to mythtv;
>99-mythbackend.rules
>
>SUBSYSTEM=="video4linux", TAG+="systemd"
>SUBSYSTEM=="dvb", TAG+="systemd"
>SUBSYSTEM=="firewire", TAG+="systemd"
>
>When I installed mythtv v31 on a virtual machine of Ubuntu 20.04, this file
>was not there. I probably created it myself because of the Hauppauge WinTV
>HD Quad PCIe tuner card I was using.
>
>So is this still necessary for Ubuntu 20.04 and mythtv v31?
>
>Also,  on my current system I have an override file in
>/etc/systemd/system/mythtv-backend.service.d/ythtv-backend-override.conf:
>[Unit]
>Wants=dev-dvb-adapter0-frontend0.device
>After=dev-dvb-adapter0-frontend0.device
>Wants=dev-dvb-adapter1-frontend0.device
>After=dev-dvb-adapter1-frontend0.device
>Wants=dev-dvb-adapter2-frontend0.device
>After=dev-dvb-adapter2-frontend0.device
>Wants=dev-dvb-adapter3-frontend0.device
>After=dev-dvb-adapter3-frontend0.device
>
>After=NetworkManager-wait-online.service
>
>I figure this is also related to the Hauppauge card and also my HDHomerun
>tuner.
>
>Again I think I did this back with mythtv29 and it's stayed through the
>upgrades to v31.
>
>Do I need any of this in mythtv v31 on Ubuntu 20.04?
>
>On the Ubuntu 20.04 test virtual machine I have only the HDHR tuner and it
>works fine but I have no udev rules or systemd override file.
>
>Thoughts?
>
>Jim A

You will have created those udev rules and the override file manually.

Those udev rules create the .device targets.  The reason for having
those targets is that it is possible for mythbackend to start before
the tuners are created, and having it wait on the device targets
prevents that.  If mythbackend starts before a tuner is working, when
it tests the tuner at startup that tuner will not work and mythbackend
will mark it as failed and not test it again until the next startup of
mythbackend.

If you only have the one tuner in the 20.04 system, you need to
comment out all the Wants/After lines referring to non-existent
tuners.  Otherwise mythbackend will only start after a very long
timeout waiting for those tuners.

If you are using networked tuners such as HDHomeruns, you should have
one of the fixes (such as mine) that prevents mythbackend from
starting before the network us up enough for it to access the
networked tuners.  Waiting for NetworkManager-wait-online.service is
not sufficient to ensure that, and each version of Ubuntu tends to
start up faster than the previous version, so mythbackend is getting
started earlier and earlier.  So if it was working OK without such a
fix in 18.04, it may not in 20.04.  It is best to use something that
pings a networked tuner before it allows mythbackend to be started.
Search this list's archives for "wait-until-pingable.py" to find the
threads for my fix.

And the speed of the SSD you have the system on also affects the
startup speed.  A new system with a super fast M.2 NVMe SSD and lots
of RAM can cause interesting surprises with how fast things start up.


More information about the mythtv-users mailing list