I have 2 Hauppauge tuners: a WinTV-HVR-1955 and a WinTV-HVR-1950. The 1955 works flawlessly, but the 1950 and MythTV combine for odd behavior on reboot. The inputs for the 1950 it show as "Errored" under system status. If I restart the backend, it goes back to working normally. My hypothesis is that the backend is starting too early, before the 1950 is ready.
I'm running MythTV 32.0 from the PPA under Ubuntu 20.04 with the Hauppauge Mediatree kernel. This behavior has persisted under many, many versions of Myth & Linux, so I don't think those version #s are relevant.
Anyone have any advice on how to fix this? I previously tried adding a delay to the backend startup script, but this not only failed to fix the issue, but also made restarting the backend take longer!
Hauppauge WinTV-HVR-1950 Unavailable on Reboot -- Backend Starting Too Soon?
Re: Hauppauge WinTV-HVR-1950 Unavailable on Reboot -- Backend Starting Too Soon?
I've tried something like this before. Still no joy, but maybe you can help me! Here's what I've done so far:
The service that runs my backend is called mythtv-backend and the problem tuner's devices are /dev/dvb/adapter1/{demux0,dvr0,frontend0,net0}.
I made the file /etc/udev/rules/99-mythtv-backend.rules. (Possibly relevant: there was such file in /etc/udev/rules before.)
I put this in /etc/udev/rules/99-mythtv-backend.rules:
After rebooting, the same behavior happens. The first 2 inputs (corresponding to the 1955) are nominal. The second 2 (1950) are errored, but clear up if I manually restart the backend.
The service that runs my backend is called mythtv-backend and the problem tuner's devices are /dev/dvb/adapter1/{demux0,dvr0,frontend0,net0}.
I made the file /etc/udev/rules/99-mythtv-backend.rules. (Possibly relevant: there was such file in /etc/udev/rules before.)
I put this in /etc/udev/rules/99-mythtv-backend.rules:
Code: Select all
#
# Create systemd device units for capture devices
#
SUBSYSTEM=="video4linux", TAG+="systemd"
SUBSYSTEM=="dvb", TAG+="systemd"
Wants=dev-dvb-adapter1-frontend0.device
After=dev-dvb-adapter1-frontend0.device
Type=simple
Re: Hauppauge WinTV-HVR-1950 Unavailable on Reboot -- Backend Starting Too Soon?
You can review mine. Not the same card, but close.
Code: Select all
/etc/udev/rules.d/hauppauge.rules
SUBSYSTEM=="dvb", \
KERNEL=="dvb?.frontend0", \
ATTRS{subsystem_vendor}=="0x0070", \
ATTRS{subsystem_device}=="0x8851", \
SYMLINK+="dvb/hvr-2200-$minor", \
TAG+="systemd"
/etc/systemd/system/mythtv-backend.service
[Unit]
Description=MythTV Backend
Documentation=https://www.mythtv.org/wiki/Mythbackend
Wants=mysql.service network-online.target time-sync.target
After=mysql.service network-online.target time-sync.target
Wants=dev-dvb-adapter0-frontend0.device dev-dvb-adapter1-frontend0.device
After=dev-dvb-adapter0-frontend0.device dev-dvb-adapter1-frontend0.device
Re: Hauppauge WinTV-HVR-1950 Unavailable on Reboot -- Backend Starting Too Soon?
Thanks, that was most helpful. I had an analogous file already in /lib/systemd/system/mythtv-backend.service. I edited the 'Wants' statements for both tuners' frontend0 devices in and that seems to have done the trick. Is it good to move that file to /etc/systemd/system/?
Assuming that leaving it in /lib is okay, I have just one more problem. The backend now takes long enough to start that the frontend gives up on finding it and winds up at the timeout screen. If I can just get it to wait, the system will finally boot to full functionality without any manual input.
Assuming that leaving it in /lib is okay, I have just one more problem. The backend now takes long enough to start that the frontend gives up on finding it and winds up at the timeout screen. If I can just get it to wait, the system will finally boot to full functionality without any manual input.
Re: Hauppauge WinTV-HVR-1950 Unavailable on Reboot -- Backend Starting Too Soon?
The issue with changing the .service in /lib is that if/when a packager releases a
new version, your changes will vanish. /etc is a better choice IMNSHO.
new version, your changes will vanish. /etc is a better choice IMNSHO.
Re: Hauppauge WinTV-HVR-1950 Unavailable on Reboot -- Backend Starting Too Soon?
Okay, perfect. Copying the edited file to /etc and resetting the /lib one to the original produces the same effect. I surmise systemd must load relevant service definitions from /etc first. Live and learn!
Now I just need to figure out this frontend timing out thing. Frontend is being started right after auto-login as 'mythfrontend --service' via the Ubuntu "Startup Applications" facility. I didn't see any configuration settings or command line settings to mythfrontend to alter the delay before it gives "Unable to connect to master backend." Any ideas there?
Now I just need to figure out this frontend timing out thing. Frontend is being started right after auto-login as 'mythfrontend --service' via the Ubuntu "Startup Applications" facility. I didn't see any configuration settings or command line settings to mythfrontend to alter the delay before it gives "Unable to connect to master backend." Any ideas there?