Could not get card info for card ../adapter0/frontend0

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Could not get card info for card ../adapter0/frontend0

Postby matrix432 » Thu Feb 16, 2017 4:00 pm

Hi,

Lately mythtv cannot recognize my capture card at startup and Live TV doesn't work. Restarting the backend doesn't help.
The capture card can only be recognized when the backend starts and then plugging it in. But if I do that the frontend will
show a message indicating that all the tuners are busy. Even these few articles didn't solve this issue.

1. https://www.mythtv.org/wiki/Systemd_myt ... figuration

2. https://www.mythtv.org/wiki/Troubleshoo ... ailed_init

Also removing the capture cards and video sources doesn't help.

Here's a part of my mythbackend.log

Feb 12 13:52:46 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: I CoreContext schemawizard.cpp:120 (Compare) Current MythTV Schema Version (DBSchemaVer): 1344
Feb 12 13:52:46 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: I CoreContext mythtranslation.cpp:73 (load) Loading en_us translation for module mythfrontend
Feb 12 13:52:46 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: N CoreContext main_helpers.cpp:597 (run_backend) MythBackend: Starting up as the master server.
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: W CoreContext recorders/dvbchannel.cpp:245 (Open) DVBChan[1](/dev/dvb/adapter0/frontend0): Opening DVB frontend device failed.#012#011#011#011eno: No such file or directory (2)
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: E CoreContext recorders/dvbchannel.cpp:250 (Open) DVBChan[1](/dev/dvb/adapter0/frontend0): Failed to open DVB frontend device due to fatal error or too many attempts.
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: E CoreContext recorders/channelbase.cpp:870 (CreateChannel) ChannelBase: CreateChannel() Error: Failed to open device /dev/dvb/adapter0/frontend0
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: E CoreContext main_helpers.cpp:202 (setupTVs) Problem with capture cards. Card 1 failed init
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: W CoreContext recorders/dvbchannel.cpp:245 (Open) DVBChan[2](/dev/dvb/adapter0/frontend0): Opening DVB frontend device failed.#012#011#011#011eno: No such file or directory (2)
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: E CoreContext recorders/dvbchannel.cpp:250 (Open) DVBChan[2](/dev/dvb/adapter0/frontend0): Failed to open DVB frontend device due to fatal error or too many attempts.
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: E CoreContext recorders/channelbase.cpp:870 (CreateChannel) ChannelBase: CreateChannel() Error: Failed to open device /dev/dvb/adapter0/frontend0
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: E CoreContext main_helpers.cpp:202 (setupTVs) Problem with capture cards. Card 2 failed init
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: W CoreContext main_helpers.cpp:217 (setupTVs) MythBackend: No valid capture cards are defined in the database.
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: I CoreContext programinfo.cpp:2368 (CheckProgramIDAuthorities) Found 2 distinct programid authorities
Australiamatrix432
Newcomer
 
Posts: 10
Joined: Wed Feb 08, 2017 10:54 am

Re: Could not get card info for card ../adapter0/frontend0

Postby paulh » Thu Feb 16, 2017 11:00 pm

Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: W CoreContext recorders/dvbchannel.cpp:245 (Open) DVBChan[1](/dev/dvb/adapter0/frontend0): Opening DVB frontend device failed.#012#011#011#011eno: No such file or directory (2)


Does /dev/dvb/adapter0/frontend0 exist? It should be created by the driver your card uses.
User avatar
Great Britainpaulh
Developer
 
Posts: 282
Joined: Thu Feb 06, 2014 6:09 pm

Re: Could not get card info for card ../adapter0/frontend0

Postby matrix432 » Fri Feb 17, 2017 12:27 am

frontend0, demux0, net0 and dvr0 exists. I even added myself to the video group. If the capture card has been plugged in
before the start of backend and if I replug it when the backend is still running, only frontend0 exist in the directory.
Then if i stop the backend service, all the files appear.

crw-rw----+ 1 root video 212, 0 Feb 17 08:06 demux0
crw-rw----+ 1 root video 212, 1 Feb 17 08:06 dvr0
crw-rw----+ 1 root video 212, 3 Feb 17 08:06 frontend0
crw-rw----+ 1 root video 212, 2 Feb 17 08:06 net0

Even if the card isn't recognized. It's still used by the backend and it gets warm.

lsof frontend0

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
Output information may be incomplete.
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mythbacke 1255 mythtv 11u CHR 212,3 0t0 591 frontend0
Australiamatrix432
Newcomer
 
Posts: 10
Joined: Wed Feb 08, 2017 10:54 am

Re: Could not get card info for card ../adapter0/frontend0

Postby paulh » Fri Feb 17, 2017 7:29 am

This is a strange one.

Just to be clear when you talk about a capture card are you actually using a USB tuner dongle that you are plugging and un-plugging from the USB sockets?

If I understand you correctly it sounds like the backend is starting before the tuner has fully initialized properly when your computer reboots. To test this set the backend to not start on boot and let the system boot normally, check dmesg or the kernel logs for any errors and make sure the /dev/dvb/adapterX are created properly. If all looks well then start the backend.

If that works then you will have to look at changing your startup method to delay the backend starting before your tuner(s) are initialized.
User avatar
Great Britainpaulh
Developer
 
Posts: 282
Joined: Thu Feb 06, 2014 6:09 pm

Re: Could not get card info for card ../adapter0/frontend0

Postby matrix432 » Fri Feb 17, 2017 1:28 pm

Yes I'm using a usb capture card.

I've disabled the service so that it doesn't startup but it still cant recognize the capture card. There's some
error with the acpi but I don't think it has anything to do with the card.

dmesg | grep -i error
[ 0.561128] acpi PNP0A08:00: _OSC failed (AE_ERROR); disabling ASPM
[ 22.707036] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro

Here's information of the capture card:

dmesg | grep -i dvb

[ 28.128245] usb 2-1: dvb_usb_af9035: prechip_version=83 chip_version=02 chip_type=9135
[ 28.128580] usb 2-1: dvb_usb_v2: found a 'ITE 9135 Generic' in cold state
[ 28.208611] usb 2-1: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw'
[ 28.304154] usb 2-1: dvb_usb_af9035: firmware version=3.40.1.0
[ 28.304169] usb 2-1: dvb_usb_v2: found a 'ITE 9135 Generic' in warm state
[ 28.305509] usb 2-1: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[ 28.305551] DVB: registering new adapter (ITE 9135 Generic)
[ 28.318945] usb 2-1: DVB: registering adapter 0 frontend 0 (Afatech AF9033 (DVB-T))...
[ 28.462358] usb 2-1: dvb_usb_v2: schedule remote query interval to 500 msecs
[ 28.462364] usb 2-1: dvb_usb_v2: 'ITE 9135 Generic' successfully initialized and connected
[ 28.462420] usbcore: registered new interface driver dvb_usb_af9035
Australiamatrix432
Newcomer
 
Posts: 10
Joined: Wed Feb 08, 2017 10:54 am

Re: Could not get card info for card ../adapter0/frontend0

Postby dizygotheca » Fri Feb 17, 2017 9:30 pm

Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: E CoreContext recorders/channelbase.cpp:870 (CreateChannel) ChannelBase: CreateChannel() Error: Failed to open device /dev/dvb/adapter0/frontend0
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: E CoreContext main_helpers.cpp:202 (setupTVs) Problem with capture cards. Card 1 failed init

Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: E CoreContext recorders/channelbase.cpp:870 (CreateChannel) ChannelBase: CreateChannel() Error: Failed to open device /dev/dvb/adapter0/frontend0
Feb 12 13:52:47 matrix386-Aspire-ES1-411 mythbackend: mythbackend[1275]: E CoreContext main_helpers.cpp:202 (setupTVs) Problem with capture cards. Card 2 failed init


Is it a dual tuner ? Any other tuners installed ?
It looks like you've got 2 tuners trying to use /dev/dvb/adapter0/frontend0
A dual tuner should be using /dev/dvb/adapter0/frontend0 & /dev/dvb/adapter0/frontend1

This can happen from trying to edit the cards in mythtv-setup. It's flaky.
Ensure you use "Delete All Cards on All Hosts" then set card 0 to use frontend0; card 1 to use frontend1
If you get it wrong, start again.

Edit:
As corrected below, I meant adapter0/frontend0 & adapter1/frontend0
User avatar
Great Britaindizygotheca
Developer
 
Posts: 211
Joined: Wed Sep 03, 2014 9:02 am

Re: Could not get card info for card ../adapter0/frontend0

Postby bill6502 » Fri Feb 17, 2017 10:40 pm

Good catch Roger.

I don't have any USB tuners, but my dual tuner PCIe card is a bit different.
The adapter # increments, but the frontends are both 0.
Code: Select all
$ ls -ld /dev/dvb/adapter*/frontend*
crw-rw----+ 1 root video 212, 0 Feb 17 08:26 /dev/dvb/adapter0/frontend0
crw-rw----+ 1 root video 212, 4 Feb 17 08:26 /dev/dvb/adapter1/frontend0
User avatar
United States of Americabill6502
Developer
 
Posts: 681
Joined: Fri Feb 07, 2014 5:28 pm

Re: Could not get card info for card ../adapter0/frontend0

Postby paulh » Fri Feb 17, 2017 11:28 pm

Yeah my dual tuner cards do what Bill says as well.

You'd think at least one recorder would be initialised OK and the other would fail with a device busy error but as Roger suggests best to use "Delete All Cards on All Hosts" and start from a clean state.

I also recall some users having problems with permissions because some distros run the backend using a 'mythtv' user not the regular user so it's that user that needs to be added to the video group.
User avatar
Great Britainpaulh
Developer
 
Posts: 282
Joined: Thu Feb 06, 2014 6:09 pm


Return to Troubleshooting



Who is online

Users browsing this forum: No registered users and 3 guests