DVBSky S952 Installation on Ubuntu 16.04 LTS (Xenial Xerus) HOWTO

DVBSky-S952The DVBSky S952 is a very popular Twin-DVB-S2 card on a budget which is often used in HTPCs or in Linux boxes with Kodi and/or VDR. Even Technotrend seams to produce this card as a de facto OEM version (TT S2-4200) now, which will be supported in kernel 4.7. Since Linux kernel 3.19 (e.g. used by Ubuntu 15.04 (Vivid Vervet)) the DVBSky S952 is also supported by the mainline v4l tree, so it should work right away after installation. This sounds good, but it has not to be like that. I’m using kernel 4.4.0 (16.04 (LTS); Xenial Xerus) and this card didn’t work for me out of the box. So what are the options to make this card work for You?
Here are the first steps you have to check, to make sure the card is really working:

  • perform a $ sudo lspci | grep cx23885 and make sure you’ll get a result. Empty result is not good. The card may was not properly plugged into PCIe slot or even worse – is damaged.
  • Then you should check if the kernel modules were successfully loaded. Do this by: $ lsmod | egrep "(cx32885|m88ds3103)".
  • You’ve got an result but cannot see any picture if you start e.g. softhddevice or vdr-sxfe? Then try to restart VDR ($ sudo service vdr restart). Unfortunately the systemd introduction wasn’t that big success so far. It’s likely your VDR was loaded before the device modules. So your VDR thinks, there is no primary card and shows your the “no signal” finger.
  • Does your /dev/dvb/* has at least the permissions 0660  and is your user in the video group?
  • Did the demuxer (m88ds3102) load the firmware? Did you even supplied the firmware at all? The firmware location is in /lib/firmware. Do a $ dmesg | grep firmware and check if you see anything. If not, either install the firmware from the Ubuntu repo:
    • $ sudo apt-get install linux-firmware-nonfree
    • or get it from the manufacturers site:
      $ wget http://www.dvbsky.net/download/linux/dvbsky-firmware.tar.gz
  • Still no video although your card war working flawlessly in an older system and your VDR is configured the right way and your DVB multi-switch (Active DiSEqC) is powered on? Well, then you reached the point where you have to build your own media driver for this card. Warning: This gonna take you a while!

Build Your Drivers

The following methods describes how to build your drivers from source. This actually is always not the best solution, since you break them, if you upgrade your kernel version later on.

Here you have also a few possibilities:

  • Build the driver from the git sources from LinuxTV. These are driver which will later find their way into the maineline kernel tree. These drivers are a snapshot and are not 100% suppose to work for you. There might be bugs – be warned!
  • if the above way didn’t work for you, you may want to use the driver from the vendor. This has more chances for success actually, since the manufacturer really is interested in a working solution.

Building from the Git sources (LinuxTV)

This comes in handy if your kernel isn’t supported directly from the manufacturer or there are no patches available for your kernel version.
The building is basically done like this [see also here: 1]

Requirements

$ sudo apt-get install build-essential libdigest-sha-perl patchutils libproc-processtable-perl git-core
$ sudo apt-get install linux-headers-$(uname -r)

Now get the sources:

$ git clone git://linuxtv.org/media_build.git

and invoke

$ ./build

After a while, if you don’t run into errors you have to install the newly created drivers:

$ sudo make install

Reboot now and check the bullets from the very beginning of this blog post.

Building from manufacturer’s sources (DVBSky)

Building the drivers from the manufacturer is quite the same procedure like above. With one exception: You will likely have to patch the sources for your kernel, since DVBSky releases a new driver version roughly speaking once in a year. So the chance is high your kernel is not directly supported, if you are up-to-date. Link to the manufacturer: [3]


UPDATE 2016-05-01

DVBSky just published a new drivers for their DVB cards. You don’t need to path anymore. The patch-links aren’t working any more. User this driver now: download. The patch below for kernel 4.5 is still working though.


If the LinuxTV solution didn’t work for you either, you can download the drivers from the site of the manufacturer. In my case I’m refering to this driver version:

$ wget http://www.dvbsky.net/download/linux/media_build-bst-151028.tar.gz

Deflate and enter the directory.

To apply the patches perform now:

$ ln -sr v4l/sit2_op.o.x$(uname -m | grep -o "[0-9]\{2\}$") v4l/sit2_op.o

And depending on your kernel you have to apply one, two or all of these patches:

Kernel 4.3

$ wget -qO- "https://aur.archlinux.org/cgit/aur.git/plain/4.3-compat.patch?h=media-build-dvbsky" | patch -p1 -i-

Kernel 4.4

$ wget -qO- "https://aur.archlinux.org/cgit/aur.git/plain/4.4-compat.patch?h=media-build-dvbsky" | patch -p1 -i-

Kernel 4.5

$ wget -qO- "http://www.vdr-portal.de/index.php?page=Attachment&attachmentID=38990&h=91f5a45e69b0dc501e016e327691858a51cce76e" | patch -p1 -i-

Now you can build and install the drivers like described above.
See source here: [2]

A third way? YES!

Actually I’m joking. But you may want to build your own kernel with the media drivers from either Git or Manufacturer sources. This is no problem if you have time and resources.
Here are the steps:

  • Download and deflate either the LinuxTV (git) or the DVBSky-Sources. Do nothing here for now
  • Follow the intruction here: [4] on how to build your own kernel. And stop after $ yes "" | make oldconfig.
    Go into the kernel’s directory and perform a

    $ make Kconfig
  • Go back to your v4l driver’s directory and perform a
    $ make kernel-links KDIR=/home/acme/kernel/linux-source-$(uname -r) install

    This will link your v4l-dvb drivers source into your kernel

  • no procede with the kernel creating and installation like described in the link above.

Tips:

  • This will remove the drivers again from your kernel:
    $ make rminstall
  • This will leave your original drivers untouched, you can’t use them though.
    $ make KDIR26="/lib/modules/$(uname -r)/updates/kernel/drivers/media"

Enable Lirc-Serial Support

Unfortunately if you compile your driver from the manufacturers site, you’ll end up without lirc-serial. Hence your homebrew lirc-serial receiver won’t work. This is because the sources do not include the compilation of lirc-serial. On Ubuntu 12.04 I could just use my old lirc-serial.ko and lirc-dev.ko files, by securing them and copying them back after v4l-dvb driver installation. But this doesn’t work on 16.04 any longer. But you can make them easily work again.

  • Go into your media_build-bst directory from DVBSky.
  • invoke
    $ make Kconfig

    This creates the v4l/.config file

  • now edit this file and look for any occurrence of LIRC_SERIAL in it.
    Change the lines according from this:

    # CONFIG_LIRC_SERIAL is not set

    to this

    CONFIG_LIRC_SERIAL=m
  • Now safe and compile your drivers by make && make install

Tuning

The DVBSky was (is?) know for audio issues. Here are some tips to circumvent audio problems.

  • Start vdr-sxfe with --buffers=1000
  • turn on logging in the cx23885 driver:
    $ modprobe audio_debug=1

    and look in /var/log/syslog for occurrences

  • look at the other parameters of cx23885 module: $ sudo systool -vm cx23885 and try or adjust buffer parameters.

My motivation?

Why do I’m writing this? Basically for myself. I’ve done this two years ago and forgot almost all of it again. It took me a whole day to make this card work unter 16.04.
A big Thanks to the other, who’ve done the work finding solutions. I’ve tried to set a few links. If anybody claims to be the author of a peace of information here, please let me know. I’ll certainly will honor him with a link reference.

2 thoughts on “DVBSky S952 Installation on Ubuntu 16.04 LTS (Xenial Xerus) HOWTO

  1. Hello,

    thank you for your post (I have the same problems :-)).
    Do you have a setup with a current kernel 4.10.x?

    My main problem with my card is that it is a clone device (Satix S2) so there are only a few lines of code missing in the linuxtv sources.

Leave a Reply

Your email address will not be published. Required fields are marked *