fter upgrading my (0.28) backend to Ubuntu 16.04 it would not reliably use all tuners. The backend service was starting before udev had detected all USB devices and created symlinks for them.
Creating this systemd configuration file will delay the start of the backend service until udev has settled:
# file /etc/systemd/system/mythtv-backend.service.d/mythtv-backend.conf
# Delay mythtv backend start until all tuners have been detected
[Unit]
After=systemd-udev-settle
EDIT: Add errors from mythbackend.log
Jan 4 10:15:19 tv mythbackend: mythbackend[1385]: W CoreContext recorders/dvbchannel.cpp:245 (Open) DVBChan[1](/dev/dvb/adapter_pctv/frontend0): Opening DVB frontend device failed.#012#011#011#011eno: No such file or directory (2)
Jan 4 10:15:19 tv mythbackend: mythbackend[1385]: E CoreContext recorders/dvbchannel.cpp:250 (Open) DVBChan[1](/dev/dvb/adapter_pctv/frontend0): Failed to open DVB frontend device due to fatal error or too many attempts.
Jan 4 10:15:19 tv mythbackend: mythbackend[1385]: E CoreContext recorders/channelbase.cpp:871 (CreateChannel) ChannelBase: CreateChannel() Error: Failed to open device /dev/dvb/adapter_pctv/frontend0
Jan 4 10:15:19 tv mythbackend: mythbackend[1385]: E CoreContext main_helpers.cpp:202 (setupTVs) Problem with capture cards. Card 1 failed init
Delay backend startup for device detection with systemd
Moderator: Forum Moderators
-
- Newcomer
- Posts: 6
- Joined: Sat Nov 17, 2018 10:28 pm
Delay backend startup for device detection with systemd
Last edited by Steve Goodey on Thu Nov 22, 2018 9:04 pm, edited 2 times in total.
Reason: Download links removed.
Reason: Download links removed.
Re: Delay backend startup for device detection with systemd
systemctl cat systemd-udev-settle has some interesting comments in it. I've
never used it with the backend service. Here's my unit section:
And from /etc/udev/rules.d/mythtv.conf
See: https://www.mythtv.org/wiki/Systemd_myt ... nitialized
I've also never tried it with USB devices.
never used it with the backend service. Here's my unit section:
Code: Select all
[Unit]
...
Wants=dev-dvb-adapter0-frontend0.device dev-dvb-adapter1-frontend0.device
After=dev-dvb-adapter0-frontend0.device dev-dvb-adapter1-frontend0.device
Code: Select all
SUBSYSTEM=="dvb", \
KERNEL=="dvb?.frontend0", \
ATTRS{subsystem_vendor}=="0x0070", \
ATTRS{subsystem_device}=="0x8851", \
SYMLINK+="dvb/hvr-2200-$minor", \
TAG+="systemd"
I've also never tried it with USB devices.