Difference between revisions of "TBS driver installation"

From LinuxTVWiki
Jump to navigation Jump to search
(Collect together the amassed knowledge on making TBS cards work)
 
(→‎IRQ issues: add link to blog post)
Line 116: Line 116:
 
options saa716x_tbs-dvb int_type=1
 
options saa716x_tbs-dvb int_type=1
   
See [http://www.tbsdtv.com/forum/viewtopic.php?f=52&t=7631#p24903 this TBS forum thread] for more details.
+
See [http://www.tbsdtv.com/forum/viewtopic.php?f=52&t=7631#p24903 this TBS forum thread] and [http://bit.ly/1R4QmbU this blog post] for more details.

Revision as of 13:15, 3 January 2016

A number of PCIe devices from TBS Technologies have a common setup process

Driver installation

Drivers are available from the TBS website.

1. Extract the ZIP file tbs-linux-drivers_v[VERSION NUMBER].zip. As of 5 April 2015, the latest version is 150313. You may want to do this in an empty directory as this archive does not extract into a single root directory of its own.

unp -u tbs-linux-drivers_v140113.zip

2. Extract linux-tbs-drivers.tar.bz2 archive

unp linux-tbs-drivers.tar.bz2

3. Change to driver package directory

cd linux-tbs-drivers

4. Select platform architecture

for x86 kernel 3.x (x86 32 bit installations of kernel 3.x)

./v4l/tbs-x86_r3.sh

or for x86 kernel 2.6.x (x86 32 bit installations of kernel 2.6.x)

./v4l/tbs-x86.sh

or for any x86_64 kernel (x86 64 bit installations of Linux)

./v4l/tbs-x86_64.sh

You should then receive a message along these lines:

TBS drivers configured for [NAME OF PLATFORM] platform.

5. Build the driver. Recompiles v4l for a wide range of cards, currently 485. This will take many minutes.

make 

If you get -bash: make: command not found, then sudo apt-get install build-essential

6. Install driver. Existing drivers for other v4l related hardware, such as lirc could also get updated.

sudo make install

7. Load newly installed driver

sudo modprobe -v tbs62x0fe

insmod /lib/modules/3.(your kernel version)-generic/kernel/drivers/media/dvb/frontends/tbs62x0fe.ko

8. Check it loaded correctly

tail /var/log/syslog

You should get a message about tainting the kernel. This is fine.

kernel: tbs62x0fe: module license 'TurboSight Proprietary' taints kernel.

Running dmesg | tail should end with something along these lines:

[ 7330.361868] tbs62x0fe: module license 'TurboSight Proprietary' taints kernel.
[ 7330.361875] Disabling lock debugging due to kernel taint

dvb adaptor nodes should now exist

ls -al /dev/dvb 
drwxr-xr-x  2 root root  120 Jul  9 21:12 adapter0
drwxr-xr-x  2 root root  120 Jul  9 21:12 adapter1
drwxr-xr-x  2 root root  120 Jul  9 21:12 adapter2
drwxr-xr-x  2 root root  120 Jul  9 21:12 adapter3

Errors and troubleshooting

Compilation problems

make[3]: *** No rule to make target `tbs8921ctrl.o', needed by `v4l/media.o'.  Stop.

Did you select the correct platform in step 4 above?

Fighting with another tuner card in load order at boot time - http://www.tbsdtv.com/forum/viewtopic.php?f=62&t=7747

During compilation:

make[1]: *** No rule to make target `.myconfig', needed by `config-compat.h'. Stop.

Make sure you have the right C header files installed for your Linux kernel version.

Problems after kernel update

Some weeks later your /dev/dvb directory has disappeared? Perhaps your kernel was updated, and your machine rebooted. The driver needs to be recompiled.

If you just run make, it will try to compile against the old kernel headers, so first run

make distclean

Then go back to step 4.

Deleting media drivers directory to resolve conflicts

Some users have found that deleting the whole kernel media drivers folder and then compiling can resolve conflicts.

This process will fix issues resulting in "disagrees about version of symbol dvb_frontend_detach" messages in the dmesg output.

Instructions for this can be found in the TBS forum. They are as follows:

  1. First remove the existing media modules:
    sudo rm -rf /lib/modules/$(uname -r)/kernel/drivers/media/
  2. Then reinstall the modules, following steps 3 and 6 above.

IRQ issues

After an extended period the combined TBS driver may crash with messages (check using dmesg) such as:

 irq 16: nobody cared (try booting with the "irqpoll" option)
 ...
 Disabling IRQ #16

This will render the device inoperable until rebooting (including IR receiver), meaning it won't be able to record anything.

This can be resolved by configuring the driver to use MSI instead of IRQ:

 sudo sh -c 'echo options saa716x_tbs_dvb int_type=1 > /etc/modprobe.d/tbs.conf'

If you have a newer TBS card such as a TBS6905, or a mix of older and newer ones, then you need TWO lines in /etc/modprobe.d/tbs.conf:

 options tbs_pcie-dvb tbs_int_type=1
 options saa716x_tbs-dvb int_type=1

See this TBS forum thread and this blog post for more details.