TBS tuner ? The wrong tuner card for Linux!

Since 6 months I bought a new satellite dish, which point to Astra so I can improve my Deutsch :). I used an old Pinnacle card as a receiver, but this old card doesn’t support dvb-s2. On the same machine I have two other cards:

  • TerraTec Cinergy T PCIe dual
  • Technisat Skystar2 PCI DVB-S

Recently some German channels (Das Erste HD, Arte HD,  ZDF HD,…) started to transmit in HD using the dvbs2 standard, so I decided to buy a new card. the requirements where very simple:

  • low profile, so if I decide to buy a new case I can choose a smaller one
  • support for dvb-s2
  • compatible with linux, without too much pain (based on my experience on linux there is always some pain)
  • remote not needed, in fact for me a new remote is simply a new trash
  • not too expensive, in fact i replace an already working card

After googling around for a while I found the card that looked good for my needs, and reading the instructions the driver seems really simple to install, my choice was the TBS6922. A few days later the card is delivered and in a few minutes the card gets installed. I follow strictly the build instructions and surprise surprise… the card works, but my TerraTec Cinergy T PCIe dual doesn’t work anymore. I lost a whole day trying to make everything work and at the end I also upgraded my HTPC station to the unstable release of Ubuntu 13.04 getting each hour more and more angry, and with kernel 3.8.?? the driver doesn’t build anymore.

What the people in TBS call driver is in fact a the whole kernel module for video, including the base video, video_buf, video_dvb and all other video/card drivers from an old version of linux! Yes! Your system gets downgraded, in fact if you install the TBS driver all your kernel modules in kernel/drivers/video get downgraded to an older version and you will never ever know which older version it is. So you will experiment things not working, bugs out-coming, compatibility issues and all you can thing about when you install old (obsolete) things on newer system with recent hardware.

What TBS developer should do is simply inform better on their site that they make their hardware working on linux by potentially braking the functionality of other hardware. Technically the approach approach should  be a dkms module like nvidia or others.

I’m still waiting from the TBS people a solution to my issue, perhaps I will receive an answer only after the  TerraTec Cinergy T PCIe dual has become obsolete…hope someone on the internet will help. If you have some hint please write me 🙂

Using new imon devinput with lirc

I don’t know exacly untile when but the imon lcd support has been merged  into the linux kernel using devinput.

This means that if you want to use the lirc_imon driver you need to blacklist the imon driver shipped with the kernel. You just need to add the following lines in the /etc/modprobe.d/blacklist.conf file:

blacklist rc_imon_pad

blacklist imon

After this you can proceed followingone of the lirc guides related to imon you find on the web.

But if you want to use the new devinput module, which in fact make thinks easier, you just leave the modules as they are and just edit the Hardware.conf file (/etc/lirc/hardware.conf):

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE=”Linux input layer (/dev/input/eventX)”
REMOTE_MODULES=””
REMOTE_DRIVER=”devinput”
REMOTE_DEVICE=”/dev/input/by-id/usb-15c2_0038-event-if00″
REMOTE_SOCKET=””
REMOTE_LIRCD_CONF=”devinput/lircd.conf.devinput”
REMOTE_LIRCD_ARGS=””

#Enable lircd
START_LIRCD=”true”

And in the lirc configuration file /etc/lirc/lircd.conf you should put this line:

#Configuration for the Linux input layer (/dev/input/eventX) remote:
include “/usr/share/lirc/remotes/devinput/lircd.conf.devinput”

This work good on my ubutu 11.10, perhaps you need to adjust some paths if your distro is different.

PLS NOTE Done this way the knob on my antec fusion doesn’t work neigther the blue key on the remote. The kno generates events on a different device: /dev/input/by-id/usb-15c2_0038-event-mouse

So you have to chain two distinct lirc servers togethere:

/usr/sbin/lircd –pidfile=/var/run/lirc/lircd1.pid –output=/var/run/lirc/lircd1 –driver=devinput –device=/dev/input/by-id/usb-15c2_0038-event-mouse –listen/usr/sbin/lircd –output=/var/run/lirc/lircd –driver=devinput –device=/dev/input/by-id/usb-15c2_0038-event-if00 –connect=localhost 8765

This way you find events of both devices on the socket /var/run/lirc/lircd.

Due to a driver bug, which i will investigate, the knob gets temporarly disabled if you press some particular key. For example if you press the yellow tv button the kno will not work anymore, until you press a number button of the remote.

To make the two instances of lirc to startup at boot time i added an upstart script /etc/init/htpc-lirc.conf:

description    “HTPC lirc daemon”

start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]

script
mkdir /var/run/lirc -p
/usr/sbin/lircd –pidfile=/var/run/lirc/lircd1.pid –output=/var/run/lirc/lircd1 –driver=devinput –device=/dev/input/by-id/usb-15c2_0038-event-mouse –listen
/usr/sbin/lircd –output=/var/run/lirc/lircd –driver=devinput –device=/dev/input/by-id/usb-15c2_0038-event-if00 –connect=localhost:8765
end script

Finally link it init.d

ln -s /lib/init/upstart-job /etc/init.d/htpc-lirc

 

 

 

Elinimare il Desktop grafico

Uno dei benefici nell’utilizzo di Linux è quello di poter intervenire in modo semplice su tutto il sistema e aggiungere molte interazioni e modifiche al sistema operativo per rendere l’impianto Home Theater adeguto ad un uso quotidiano.

Uno di questi interventi è la rimozione di tutto ilo Desktop Manager e l’uso della GU§i di mythtv come unico frontend, pur mantenendo la possibilità di passare a un altro dektop manager per attività di manutenzione.

Ecco i semplici passi per la consentire l’avvio di Mythtv come unico desktop.

1) Impostare il logon automatico sulla propria distribuzione.

2) Creare il file mythtv.desktop nella cartella: /usr/share/xsessions:

[Desktop Entry]
Encoding=UTF-8
Name=MYTHTV on openbox
Comment=This will start openbox and mythtv in fullscreen
Exec=/usr/bin/mythtv-openbox
Icon=
Type=Application

3) Creare il file /usr/bin/mythtv-openbox

#!/bin/bash
#/home/htpc/bin/imonserver &
/usr/bin/irexec &
/usr/bin/openbox &
mythwelcome

4)

chmod +x /usr/bin/mythtv-openbox

Eseguendo il logout dal desktop grafico è ora possibile selezionare il tipo di sessione “MYTHTV on openbox”. Agli avvi sucessivi verrà impostato come sessione principale e mythwelcome verrà avviato. Si può scegliere di far partire direttamente mythfrontend, ma mythwelcome offre alcuni vantaggi.

Sul mio PC l’installazione è leggermente diversa, tutti gli script li creo nella home/bin dell’utente di mythtv, così da non avere script custom sparsi sul sistema.

La cartella $HOME/bin è nei path di ricerca per l’utente. Usando quest’approccio l’unica operazione che richiede i permessi di root è la creazione di un link nella cartella xsession:

ln -s $HOME/bin/mythtv.desktop /usr/share/xsessions

Mythbuntu e la rete

Configurare la rete wireless in modo tale che si avvii in automatico all’accensione del PC è molto semplice su ubuntu. NetworkManager eseguito in modalità root consente di marcare una connessione come condivisa tra gli utenti e auto avviante.

Terminata questa semplice configurazione e riavviato il pc può capitare che molti servizi non si avviino più in automatico e il PC si trova in un runlevel non definto. Il desktop grafico per fortuna funziona correttamente (le shell tty non partono) e digitando da un terminale il comando runlevel si ottiene un undefined:

root@acer:~# runlevel
undefined

Si tratta di un baco e per correggere la situazione occorre editare due file della sequenza di init di upstart:

vi /etc/init/rc-sysinit.conf

La riga:

start on filesystem and net-device-up IFACE=lo

Deve diventare:

start on filesystem and net-device-added INTERFACE=lo

Stessa operazione deve  essere fatta sul file:

/etc/init/mythtv-backend.conf

Il baco che causa questo mal funzionamento è dovuto alla nuova gatione a eventi di upstart. Gli script sopracitati si attivano a seguito dell’evento di configurazione sull’interfaccia locale. Quando NetworkManager viene configurato per avviare le connessioni in automatico l’evento di configurazione sull’interfaccia  lo non si genera, viene gerato però l’evento di intefaccia aggiunta.
La nuova gestione a eventi di upstart sembra ancra un po instabile, devo però dire che i benefici in fase di avvio sono notevoli

Scelta del sistema operativo

Prima ancora di iniziare con il mio progetto di realizzare un HTPC avevo sperimentato sia Windows MCE che Linux Mythtv. Linux era troppo primitivo, i driver erano un macello da compilare e per configurare il sintonizzatore bisognava usare una sorta di formula magica digitata a riga di comando.

Prima grossa scelta: Windows. Però per WinMCE non è un programma è un sistema operativo. Da sprovveduto ho considerato scelta molto bislacca, con il senno di poi ho capito i motivi della scelta. L’idea di avere tutto un sistema operativo ad hoc per il mio Media Center non mi piaceva, così ho cercato delle alternative.

Ne ho visto diverse e provato diverse, che integrino la TV ne ho trovato solo una: MediaPortal. Un gran figata devo dire. Per 15 giorni ho installato, configurato, reinstallato, provato plugin sperimentato. Ottimo devo dire, solo che Windows ci ha messo il suo per rendere la piattaforma inusabile:

  • 2 min e 30 secondi per l’avvio
  • Popup/Alert di altri programmi che compaiono sopra tutto
  • Windows che ognitanto si guadagna il focus
  • Password da inserire al logon
  • Telecomando che risponde  a tratti perché windows ‘è impegnato’
  • jittering del video

Diciamo che  ho capito perché la Microsoft ha optato per una distribuzione ad hoc, elimina tutti i problemi ineliminabili su Windows standard usato come MC.

Soprattutto il tempo di avvio, i freeze di sistema e il jittering del video mi hanno convinto a provare linux. La distro che ho scelto è la mythbuntu perché include la versione più aggiornata di mythtv.

La prima impressione è stata positiva, ricordavo la vecchia versione e devo dire che i passi avanti sono stati notevoli. La configurazione che mi sembrava ostica mi è sembrata banale alla luc e anche delle prove fatte con Media portal.

Dopo 15 giorni di prove, esperimenti e configurazioni varie ho deciso di rimanere con linux i vantaggi di questa soluzione sono:

  • possibilità di eliminare il desktop grafico (diventa un media center completo)
  • possibilità di configurare e controllare tutti gli elementi anche del sistema operativo

Anche Windows/MediaPortal comunque ha i sui vantaggi:

  • Ampissima disponibilità di plugin (alcuni però inchiodano tutto e sono complessi da rimuovere a mano) e comunità molto attiva
  • Windows sempre attivo ( a chi piace)