mythtv not finding tuners when autostarting
mythtv not finding tuners when autostarting
Hi,
Running latest mythtv 0.28 with ubuntu 16.04.1 hdhomerun tuners
When the backend starts (after a reboot etc) we get:
Jan 28 16:41:10 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/hdhrstreamhandler.cpp:339 (Connect) HDHRSH(11109E76-0): Unable to connect to device
Jan 28 16:41:10 MaxxM mythbackend: mythbackend[1253]: E CoreContext dtvmultiplex.cpp:379 (ParseTuningParams) DTVMux: ParseTuningParams -- Unknown tuner type = 0xffffffff80000000
Jan 28 16:41:10 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/dtvchannel.cpp:299 (SetChannelByString) DTVChan[1](11109E76-0): SetChannelByString(1): Failed to initialize multiplex options
Jan 28 16:41:11 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/hdhrstreamhandler.cpp:382 (TunerGet) HDHRSH(11109E76-0): Get request failed#012#011#011#011eno: Resource temporarily unavailable (11)
Jan 28 16:41:11 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/hdhrstreamhandler.cpp:421 (TunerSet) HDHRSH(11109E76-0): Set request failed#012#011#011#011eno: Resource temporarily unavailable (11)
Jan 28 16:41:11 MaxxM mythbackend: mythbackend[1253]: E CoreContext dtvmultiplex.cpp:379 (ParseTuningParams) DTVMux: ParseTuningParams -- Unknown tuner type = 0xffffffff80000000
Jan 28 16:41:11 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/dtvchannel.cpp:299 (SetChannelByString) DTVChan[2](11109E76-0): SetChannelByString(1): Failed to initialize multiplex options
Jan 28 16:41:11 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/hdhrstreamhandler.cpp:382 (TunerGet) HDHRSH(11109E76-0): Get request failed#012#011#011#011eno: Resource temporarily unavailable (11)
This results in livetv showing channel unavailable
If we start it from a terminal (not logged on as mythtv, but as the main user, it works fine.
Can anyone help by letting us know what the difference in the startup is and what can be changed to fix this issue?
Thanks
Running latest mythtv 0.28 with ubuntu 16.04.1 hdhomerun tuners
When the backend starts (after a reboot etc) we get:
Jan 28 16:41:10 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/hdhrstreamhandler.cpp:339 (Connect) HDHRSH(11109E76-0): Unable to connect to device
Jan 28 16:41:10 MaxxM mythbackend: mythbackend[1253]: E CoreContext dtvmultiplex.cpp:379 (ParseTuningParams) DTVMux: ParseTuningParams -- Unknown tuner type = 0xffffffff80000000
Jan 28 16:41:10 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/dtvchannel.cpp:299 (SetChannelByString) DTVChan[1](11109E76-0): SetChannelByString(1): Failed to initialize multiplex options
Jan 28 16:41:11 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/hdhrstreamhandler.cpp:382 (TunerGet) HDHRSH(11109E76-0): Get request failed#012#011#011#011eno: Resource temporarily unavailable (11)
Jan 28 16:41:11 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/hdhrstreamhandler.cpp:421 (TunerSet) HDHRSH(11109E76-0): Set request failed#012#011#011#011eno: Resource temporarily unavailable (11)
Jan 28 16:41:11 MaxxM mythbackend: mythbackend[1253]: E CoreContext dtvmultiplex.cpp:379 (ParseTuningParams) DTVMux: ParseTuningParams -- Unknown tuner type = 0xffffffff80000000
Jan 28 16:41:11 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/dtvchannel.cpp:299 (SetChannelByString) DTVChan[2](11109E76-0): SetChannelByString(1): Failed to initialize multiplex options
Jan 28 16:41:11 MaxxM mythbackend: mythbackend[1253]: E CoreContext recorders/hdhrstreamhandler.cpp:382 (TunerGet) HDHRSH(11109E76-0): Get request failed#012#011#011#011eno: Resource temporarily unavailable (11)
This results in livetv showing channel unavailable
If we start it from a terminal (not logged on as mythtv, but as the main user, it works fine.
Can anyone help by letting us know what the difference in the startup is and what can be changed to fix this issue?
Thanks
Re: mythtv not finding tuners when autostarting
Does Live TV work if you restart mythtv-backend service from a terminal ?
(sudo systemctl restart mythtv-backend.service )
If it does work then there is a race condition at boot see
viewtopic.php?f=29&t=1916#p9340
Mike
(sudo systemctl restart mythtv-backend.service )
If it does work then there is a race condition at boot see
viewtopic.php?f=29&t=1916#p9340
Mike
Re: mythtv not finding tuners when autostarting
Thanks Mike.
That was it exactly.
Live tv is now working as expected.
That was it exactly.
Live tv is now working as expected.
Re: mythtv not finding tuners when autostarting
It seems to be a common problem with all distros using Systemd with the backend starting before all the services it requires have started like the network being up.
It's really annoying the f#%* out of me There's a lot of, outdated?, advice out there that simply doesn't work reliably at least for me.
If anyone does find a solution that works for them then please share it
It's really annoying the f#%* out of me There's a lot of, outdated?, advice out there that simply doesn't work reliably at least for me.
If anyone does find a solution that works for them then please share it
Re: mythtv not finding tuners when autostarting
@paulh
Here is the solution I used (it is similar to that in the mythtv thread but is slightly easier to setup, no creation of directory and file, it uses systemd built-in functionality). This change should continue to work when mythtv is updated. I have a number of systems running mythbuntu 16.04, some with fixed IP address (using static IP in /etc/network/interfaces), others using IP address from my Router. Some using network tuners, other using PCI-e tuner cards, after the changes below I have had no problems.
In a terminal on the machine running mythtv backend:
sudo systemctl enable NetworkManager-wait-online.service
sudo systemctl edit mythtv-backend.service
Then paste the following 2 lines
[Unit]
After=NetworkManager-wait-online.service
Then exit from the edit screen (it uses nano by default, so Ctrl+x, then y, then Return key)
Now reboot the system (sudo reboot)
Mike
Here is the solution I used (it is similar to that in the mythtv thread but is slightly easier to setup, no creation of directory and file, it uses systemd built-in functionality). This change should continue to work when mythtv is updated. I have a number of systems running mythbuntu 16.04, some with fixed IP address (using static IP in /etc/network/interfaces), others using IP address from my Router. Some using network tuners, other using PCI-e tuner cards, after the changes below I have had no problems.
In a terminal on the machine running mythtv backend:
sudo systemctl enable NetworkManager-wait-online.service
sudo systemctl edit mythtv-backend.service
Then paste the following 2 lines
[Unit]
After=NetworkManager-wait-online.service
Then exit from the edit screen (it uses nano by default, so Ctrl+x, then y, then Return key)
Now reboot the system (sudo reboot)
Mike
Re: mythtv not finding tuners when autostarting
Mike. Thanks for this elegant fix. I banged my head for the better part of a day until I came across this. This kind of stuff should be prominently posted on the Official MythTV Wiki install how-to. I guess that's the price you pay for "free". If the docs were better, I have no doubt that Mythtv would be huge in the cordcutting world. As it is, it's just a pain between the back pockets.
Thanks again to all above.
cliffgi
Thanks again to all above.
cliffgi
Re: mythtv not finding tuners when autostarting
Mike,
Many thanks for the fix. Will it be included in the next version so that others do not have to search for it?
Jerry
Many thanks for the fix. Will it be included in the next version so that others do not have to search for it?
Jerry
Re: mythtv not finding tuners when autostarting
Mike,
I spoke too soon. The fix seems to have taken down my machine. Have you tried it on Ubuntu 16.04?
I will reload Ubuntu and then add your fix to see if I messed up something.
Jerry
I spoke too soon. The fix seems to have taken down my machine. Have you tried it on Ubuntu 16.04?
I will reload Ubuntu and then add your fix to see if I messed up something.
Jerry
Re: mythtv not finding tuners when autostarting
At the time of the original fix, it was tested on Mythbuntu 16.04 LTS, subsequently (following discontinuation of Mythbuntu 16.04) I have used it on Xubuntu 16.04 (suggested replacement for Mythbuntu 16.04) and Lubuntu 16.04.
There is no way that fix will take down your machine, at worst it will not solve the problem and mythbackend will still start too early.
To backout the fix :
There is a more pragmatic fix which simply delays mythbackend start up for say 20 seconds
sudo systemctl edit mythtv-backend.service
Then paste the following 2 lines
[Service]
ExecStartPre=/bin/sleep 20
Followed by a reboot.
There is no way that fix will take down your machine, at worst it will not solve the problem and mythbackend will still start too early.
To backout the fix :
Code: Select all
sudo systemctl disable NetworkManager-wait-online.service
sudo rm -r /etc/systemd/system/mythtv-backend.service.d/
sudo reboot
sudo systemctl edit mythtv-backend.service
Then paste the following 2 lines
[Service]
ExecStartPre=/bin/sleep 20
Followed by a reboot.
Re: mythtv not finding tuners when autostarting
MikeB,
Your suggestion does not fix the tuner startup problem. I still receive the channel unavailable on both mythfrontend and kodi.
Jerry
Your suggestion does not fix the tuner startup problem. I still receive the channel unavailable on both mythfrontend and kodi.
Jerry
Re: mythtv not finding tuners when autostarting
MikeB,
I am running Ubuntu 16.04 LTS with Myth 29 and Kodi Krypton on a Zotac 1327 with a SSD. Your fix does not bring down the machine but does not
help the channel unavailable issue.
Jerry
Jerry
I am running Ubuntu 16.04 LTS with Myth 29 and Kodi Krypton on a Zotac 1327 with a SSD. Your fix does not bring down the machine but does not
help the channel unavailable issue.
Jerry
Jerry
Re: mythtv not finding tuners when autostarting
There are other reasons for channel unavailable, besides mythbackend starting too early. The most common one I have encountered is the mythtv Tuning and Signal Timeouts for the Capture Card are too low.
Channel Unavailable in Kodi pvr mythtv is often due to the timeout in Advanced tab being too low (defaults to 5 seconds), but changing this if mythfrontend is having problems is not likely to resolve the issue.
Without mythbackend, mythfrontend logs and dmesg output, I would just be guessing.
Re: mythtv not finding tuners when autostarting
Mike,
When I kill mythbackend and restart it the problem always goes away. What is the best other fix you suggest to delay the startup of mythbackend until the tuners are recognized?
Jerry
When I kill mythbackend and restart it the problem always goes away. What is the best other fix you suggest to delay the startup of mythbackend until the tuners are recognized?
Jerry
- Steve Goodey
- Moderator
- Posts: 220
- Joined: Fri Feb 07, 2014 6:30 pm
- Location: Colchester, England
Re: mythtv not finding tuners when autostarting
This is what sorted my problem with tuners not being ready.
https://www.mythtv.org/wiki/Systemd_myt ... figuration
https://www.mythtv.org/wiki/Systemd_myt ... figuration
Don't forget the Wiki.
Re: mythtv not finding tuners when autostarting
Steve,
I can't believe that the average user is going to be able to implement the suggestions in your link? I am very familiar with UNIX and the suggestions in the link make make me nervous. I spoke with the creator of NextPVR (he coded the entire program by himself). It is trivial to setup and very robust.
No problems with tuners or channel unavailable error messages and Kodi works flawlessly with NextPVR. Unfortunately NextPVR only works on Windows. Someone needs to fix the problems with Mythtv to make it as robust and as easy to set up as NextPVR? I hope this suggestion is seen as encouraging the Mythtv developers to restructure their code towards this desirable goal. I think it has come a long way towards this goal from when I first started to try it
and with just a bit more work it would reach the goal.
Jerry
I can't believe that the average user is going to be able to implement the suggestions in your link? I am very familiar with UNIX and the suggestions in the link make make me nervous. I spoke with the creator of NextPVR (he coded the entire program by himself). It is trivial to setup and very robust.
No problems with tuners or channel unavailable error messages and Kodi works flawlessly with NextPVR. Unfortunately NextPVR only works on Windows. Someone needs to fix the problems with Mythtv to make it as robust and as easy to set up as NextPVR? I hope this suggestion is seen as encouraging the Mythtv developers to restructure their code towards this desirable goal. I think it has come a long way towards this goal from when I first started to try it
and with just a bit more work it would reach the goal.
Jerry