MythTV: When 'Scan for Channels' finds no channels

NOTE: This guide has been tested on Ubuntu Lucid Lynx 10.04, Karmic 9.10, Jaunty 9.04 and Ubuntu Intrepid 8.10

If no channels were found when you hit the "scan for channels" button in the MythTV Backend set-up then it's likely you've hit the same problem as me. For some reason some tuner cards simply struggle to find channels and I've never quite worked out why. All is not lost tho, we just have to do a little bit more work. We'll simply scan for channels outside of MythTV and then afterwards we'll pull that channel information back into MythTV.

So, from your gnome desktop choose the Synaptic Package Manager (System -> Administration), type dvb-apps into the Quick Search box and select it from the list of results returned. Mark it for installation and then click Apply.

NOTE: If you don't have the Synaptic Package Manager, it is not installed by default under Lucid or Karmic, then you can install it by issuing sudo apt-get install synaptic from a Terminal or Putty session

For this next part you'll need to know what TV transmitter you're on. If you're in the UK you can find out this information via the uk website.

IMPORTANT: The dvb-apps package seemed to be in transition whilst I was putting together this guide so you may need to replace /usr/share/dvb/ with /usr/share/doc/dvb-utils/examples/scan/ in the steps below.

Once you know what transmitter you're on you can now pull together some channel information. If you're using a DVB-T card then, using Places -> Computer and double-clicking on Filesystem, navigate to /usr/share/dvb/dvb-t and find the filename matching your transmitter. If you're using a cable card then go to /usr/share/dvb/dvb-c. For satellite cards go to /usr/share/dvb/dvb-s.

For example, I'm in the UK using a DVB-T card and covered by the Crystal Palace transmitter so I'd use the file named uk-CrystalPalace in the /usr/share/dvb/dvb-t folder.

Next, in a Putty/Terminal Session, type the following commands:

sudo -s -H

mkdir /root/.tzap

scan /usr/share/dvb/dvb-t/TransmitterFilename >/root/.tzap/channels.conf

where TransmitterFilename is the filename for your transmitter. As mentioned above I'm using uk-CrystalPalace. The scan command will scan through all the available channels for your transmitter and save the contents into a file called channels.conf in the /root/.tzap folder. Now we need to load this file into the mythtv-backend.

NOTE: If when you issue the scan command above you receive a fatal error indicating the tuner is busy then issue the following command to stop the MythTV backend and release the tuner before issuing the above scan command once more:

sudo service mythtv-backend stop

Pull the channel information into MythTV

Once the scan command has completed and you're back at the Command Prompt you can now go back into the MythTV Backend Setup (System -> Administration -> MythTV Backend Setup) and select Input connections from the menu. Then click on the Scan for Channels button. Next, select the Import Channels.conf option from the Scan Type: box and type /root/.tzap/channels.conf into the file location box and then click Next. All your channels should then be loaded into MythTV.

At the time of writing there is a "feature" in MythTV which means the channels are not properly configured if you go down the "Import Channels.conf" route. So, to solve this, after MythTV has pulled in all the channels using the Channels.conf file you need to go into the Channel Editor option (option 5) and select "Delete all channels" to delete all the channels you've just pulled in. Once you've done that go back into the Input Connections screen (option 4) once more, hit the "Scan for channels" button and select "Scan all existing transports" from the Scan Type: drop-down option and then click Next and let it run through and pull in all the channels once more.

NOTE: if you get a "failed to open the card" error when you select the Scan For Channels button you're probably hitting the same issue I had. For some reason the tuner card is installed with the wrong permissions. To solve this problem you need to run the MythTV backend setup as root from a Terminal Session within gnome (Applications -> Accessories) by typing:

sudo mythtv-setup

and then go back into the Input Connections screen once more and try again.

Still stuck? Not what you were looking for? Then head over to the Discussion Forum