Page 1 of 1

Tuners currently busy - but works after restarting backend

Posted: Wed Apr 27, 2016 9:41 pm
by tvuk
I have a box with a fresh install of 0.28.0
When I boot the machine, if I navigate to Watch TV, I get the error message "All tuners are currently busy"
Looking at /var/log/mythtv/mythtvbackend.log it says
...
Opening DVB frontend device failed. #012#011#010#010eno. /dev/dvb/adapter0/frontend0 : No such file or directory
...


I've read several forum postings on this topic now but I can't find a solution that works for me.
I've tried putting a sleep into /etc/init/mythtv-backend.conf before launching the backend, to try to ensure the tuner cards are ready before the backend starts - it seemed to work for other people on the internet but it didnt seem to help me.

I have noticed that if I manually call
sudo service mythbackend restart
then once the backend is back up and running, the frontend can open the TV successfully.

I have also noticed that while myth is struggling with this issue, before I restart the backend, I can run tzap and mplayer and watch a tv stream successfully.

Restarting the service manually serves as a temporary workaround for watching live tv but I don't think scheduled recordings will work as it is. I generally have my myth box shut itself down when it's idle and turn itself back on with the rtc wakealarm, so having it work from a reboot is desirable.

Re: Tuners currently busy - but works after restarting backe

Posted: Wed Apr 27, 2016 9:50 pm
by bill6502
Hi,

This: https://www.mythtv.org/wiki/Upstart_myt ... figuration and
the 'Delay starting the backend until all tuners have initialised' solution may
help. I use it and it worked when I was using Upstart.

And you are using Upstart, not systemd on 15.10 or 16.04 right.

Re: Tuners currently busy - but works after restarting backe

Posted: Fri Apr 29, 2016 2:12 pm
by tvuk
No, my bad. I was trying mythbuntu 16.04 and didn't realise that that meant I'd be using systemd.
I've since tried mythbuntu 14.04 and everything worked, so I'm going to stick with that for now. Thanks.

Re: Tuners currently busy - but works after restarting backe

Posted: Fri Apr 29, 2016 3:00 pm
by bill6502
There's a good description of the systemd solution on the Wiki:
https://www.mythtv.org/wiki/Systemd_myt ... nitialized

Re: Tuners currently busy - but works after restarting backe

Posted: Thu Aug 18, 2016 11:31 am
by aapo
bill6502 wrote:There's a good description of the systemd solution on the Wiki:
https://www.mythtv.org/wiki/Systemd_myt ... nitialized
I'm having this same issue with a fresh install of Mythbuntu 16.04 and 3 identical USB DVB-T tuners.

In addition to "all tuners are currently busy" my mythweb has all the headers in place but the Listings page has no content and says:

"Warning at /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php, line 12:
!!NoTrans: Cannot modify header information - headers already sent by (output started at /usr/share/mythtv/mythweb/modules/_shared/tmpl/default/header.php:152)!!"

After a backend restart everything works.
The instructions are possibly incomplete since it says:
wiki.png
wiki.png (38.61 KiB) Viewed 5902 times
Has anyone got the above mentioned wiki fix to work and with what adjustment to the wiki?

Re: Tuners currently busy - but works after restarting backe

Posted: Sun Aug 21, 2016 3:38 am
by bill6502
Hi,

I assume you referring to the "Someone please fix the wiki!" comment.
That refers to Type=forking. FWIW, I don't use Type, thus the default
simple is used. Since I have more information in my udev rule, it looks
like this:

Code: Select all

SUBSYSTEM=="dvb", \
    KERNEL=="dvb?.frontend0", \
    ATTRS{subsystem_vendor}=="0x0070", \
    ATTRS{subsystem_device}=="0x8851", \
    SYMLINK+="dvb/hvr-2200-$minor", \
    TAG+="systemd"
You don't need that, it's just what I use to generate
more meaningful names.

And you added the Wants and After lines to the
service too.

You can always test delaying backend startup by adding:
ExecStartPre=/bin/sleep 5.

Re: Tuners currently busy - but works after restarting backe

Posted: Sun Aug 21, 2016 8:41 am
by aapo
Thanks!

What I did was added the "ExecStartPre=/bin/sleep 15" line into my /lib/systemd/system/mythtv-backend.service file:

Code: Select all

[Service]
User=mythtv
EnvironmentFile=-/etc/mythtv/additional.args
ExecStartPre=/bin/sleep 15
ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS
StartLimitBurst=10
StartLimitInterval=10m
Restart=on-failure
RestartSec=1
5 secs was too short.