Home / Mythtv 16.04.1 / Digital Devices Cine C/C2/T/T2 / Ziggo

Mythtv 16.04.1 / Digital Devices Cine C/C2/T/T2 / Ziggo



Download mythbuntu

Mythbuntu 16.04.1 downloaded from:
http://www.mythbuntu.org/downloads

Used unetbootin to create a bootable USB stick wich mythbuntu. (This actually gave me a hard time as it seems that most of my Kinston Traveler DT101 G2 sticks were not able to boot. Eventually used a cheap commercial stick and I could continue).

installation
Boot from USB stick and install myhtbuntu

Create partition table

/ 16G ext4 (sda1)
swap 16G 
/data rest (sda6)

user: myth (mythtv is used for mythbuntu)

Create data directory for mythtv and make it writeable for the user mythtv:
mkdir /data/mythtv
chown mythtv.mythtv /data/mythtv

Update the system

disable automatic updates of the system. Very anoying when you have build and installed a custom kernel module and get a kernel update.
(open the Ubuntu software & updates dialog and set "automatically check for updates" to "Never"

sudo apt-get update
sudo apt-get upgrade
reboot

Network settings

Disable DHCP and set IP, NM, DG etc.
This can easily be done with the Gnome Nerwork manager (/usr/bin/nm-connection-editor)

Use Terratec Cinergy PCI HD tuners


I have 2 Terratec dual tuners that get recognized by Linux automatically.
Below is a list of modules that get loaded when the card(s) are installed.

module used by
dvb_core mantis_core
mantis
mantis_core mantis
rc_terratec_cinergy_c_pci
tda10021
tda10023

Build and install drivers for Digital Devices DVB-C tuner card

This Digital Devices DVB-C card hosts 4 tuners on a single card.

source: http://support.digital-devices.eu/knowledgebase.php?article=152

steps:
  1. sudo apt-get install mercurial build-essential libproc-processtable-perl linux-headers-`uname –r`
  2. cd /usr/src
  3. sudo wget https://github.com/DigitalDevices/dddvb/archive/0.9.28-v7a.tar.gz
  4. sudo tar -xf 0.9.28-v7a.tar.gz
  5. cd /usr/src/dddvb-0.9.28-v7a *)
  6. sudo make clean **)
  7. sudo make
  8. sudo make install
  9. sudo mkdir -p /etc/depmod.d
  10. echo 'search extra updates ubuntu built-in' > /etc/depmod.d/ubuntu.conf (original content of this file is 'search updates ubuntu built-in')
  11. sudo depmod -a
  12. reboot
*) mythbuntu already comes with a ddbridge.ko module which seems not to work for DVB-C. This can cause you headaches.
Therefor I slightly changed the driver name in ddbridge.c
change
"Digital Devices DVBCT V6.1 DVB adapter" 
in 
"Digital Devices DVBCT V6.1 DVB adapter mybuild" 
Once the kernelmodule is loaded you can easily find out which one is loaded by checking the system log:
dmesg | grep -i DVB

**) Please note that if you update your kernel (for example after apt-get update, apt-get upgrade) you need to recompile this kernel module, first clean all object files by: make clean!!
also install the new kernel source sudo apt-get install linux-headers-`uname –r` AND?OR apt-get source linux

Once the drivers are compiled an correctly loaded you will see the list of extra modules loaded:

module used by
cxd2099 ddbridge
ddbridge
dvb_core ddbridge
stv0367dd
tda18212dd

Terratec and Digital Devices.

So far I'm able to use either de Terratec cards (2 x 2 is 4 tuners) or the Digital Devices card (1 x 4 tuners) but not both at the same time (for eight tuners).
Looks like there is a driver conflict. The only module that is loaded both for the Terratec and DD card is de dvb_core module. The compiled version for the DD card does not work for the Terratec card, de defaut distribution one does not work for the Digital Devices card.
If anyone does know how to fix this, please drop me a line.

Mythtv-setup

Start mythtv setup

General:
- TV Format = PAL
- Channel freq. teable = europe west
- allow commercial detection jobs: off

add video capture cards 
card type: dvb-T/S/C, ATSC or ISDB-T Tuner card
Frontend ID STV0367 DVB-C DVB-T syptype DVB-C
/dev/dvb/adapter0/frontend0
repeat for second card:
/dev/dvb/adapter1/frontend0

choose recording options:
Max recordings: 2
v wait for SEQ start header
0 open DVB card on demand
v Use DVB card for active EIT scan 

video source name: tvguide
listings grabber: Transmitted quide only (EID)
Network ID: 4444 (I use this for Ziggo Free to Cable signals)
Channel frequency table: default

input connections
input name: dvbinput
video source: tvguide

Scan for channels=>
Desired Services: TV

v unencrypted only

Scan Type: Full Scan (Tuned)

Frequency: 474000000

Symbol Rate 6875000

Modulation QAM 64

Storage location
First create a folder
# mkdir /data/mythtv
# chown mythtv.mythtv /data/mythtv 
set de default storrage location to: /data/mythtv

Audio

There was no audio on my system. Just opening and finishing the audio setup solved this?!
Setup->audio-> test -> finish

Display

Applications->settings->screensaver: set to disable screen saver...

The mouse pointer is shown. This can be hidden by the unclutter command:
# sudo apt-get install unclutter

# ./unclutter -root -idle 1 -reset -display :0 

Mythwelcome

Use the "Session and Startup"  tool (in XFCE menu) to configure startup applications
Uncheck:
- Update notifier
- XFCE Volume daemon
- Mythtv Frontend
Add:
/usr/bin/mythtwelcome

Mythfrontend settings


In the MythtvFrontend:
setup->video>playback->next:
on playback exit: save position and exit

setup->video->Program Guide
1/1 Guide starts at channel: 6

disable jobs
setup->video->general->next->next
disable commercial detection
disable metadata lookup

Default always record some extra time
s etup->video->general
start recording -120sec
end recording +600secd

Remote Control

My Haupauge 350 remote control did not work with this version of mythbuntu. It did before!
After some troubleshooting and inspecting the log files I spotted:
...
* Unable to load LIRC kernel modules. Verify your
* selected kernel modules in /etc/lirc/hardware.conf

The hardware.conf showed two drivers:
"lirc_dev lirc_i2c"
Although the have been in there for a decade, the second one (lirc_i2c) had to be removed and after a reboot the remote worked.

configure jumppoints

start mythweb en go to settings->key bindings
Program Guide: Alt+g
TV Recording Playback: Alt+t
Main menu: Ctrl+m

edit /home/asrock/.lirc/mythtv and add:
begin
remote = Hauppauge_350
prog = mythtv
button = Videos
config = Alt+t
repeat = 0
delay = 0
end

begin
remote = Hauppauge_350
prog = mythtv
button = Guide
config = Alt+g
repeat = 0
delay = 0
end

begin
remote = Hauppauge_350
prog = mythtv
button = Go
config = Ctrl+m
repeat = 0
delay = 0
end
begin

# add delete button to the remote
remote = Hauppauge_350
prog = mythtv
button = red
config = d
repeat = 0
delay = 0
end

# add two buttons to solve the "Allow Channel Jumping in Guide" bug in 0.22
# key 1 and 7 don't go one day back/forward so we use two extra buttons for that
begin
remote = Hauppauge_350
prog = mythtv
button = yellow
config = Home
repeat = 0
delay = 0
end

begin
remote = Hauppauge_350
prog = mythtv
button = blue
config = End
repeat = 0
delay = 0
end

# add button to get the menu back in the Watch Recording page that displays several options
# Before 0.22 you would get this menu by hitting the right key on a recording. 
begin
    remote = Hauppauge_350
    prog = mythtv
    button = Prev.Ch
    config = I
    repeat = 0
    delay = 0
end

Fix mythweb

Mythweb has an error producing an error:  !!NoTrans: SQL Error: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column...
A solution to the SQL Fatal Error mentioned above is a tweak to the /etc/mysql/conf.d/mythtv.cnf file. Add "sql_mode=NO_ENGINE_SUBSTITUTION" (without the quotation marks) to the end of the /etc/mysql/conf.d/mythtv.cnf file.

backup your installation


Create a backup from the first (root) partition. I do this even in between settings and updates so it is really easy to roll back.
boot from ubuntu 16.04 live cd/USB
# sudo su -
# mkdir /data
# mount /dev/sda6 /data
# mkdir /data/backup
# dd if=/dev/sda1 of=/data/backup/mythbuntu16.04_update.dd status=progress

Instead of using dd to backup a complete partition I found it usefull to use tar to backup files and folders so you can easily copy one in case you made a mistake:
# mkdir /mythroot
# mount /dev/sda1 /mythroot
# mount /dev/sda6 /data
# mkdir /data/backup/filesAndFolders
# cd /mythroot
# tar cf - . | (cd /data/backup/filesAndFolders && tar xBf -)

restore you backup

in case you ever need to restore you backup:
boot from ubuntu 16.04 live cd/USB
# sudo su -
# mkdir /data
# mount /dev/sda6 /data
# cd /data/backup
# dd if=mythbuntu16.04_update.dd of=/dev/sda1 status=progress

Troubleshooting and details
Digital devices card info on slot 0000:00:1c.4

udevadm info -a -p /sys/devices/pci0000:00/0000:00:1c.4/0000:34:00.0

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pci0000:00/0000:00:1c.4/0000:34:00.0':
    KERNEL=="0000:34:00.0"
    SUBSYSTEM=="pci"
    DRIVER=="ddbridge"
    ATTR{broken_parity_status}=="0"
    ATTR{class}=="0x048000"
    ATTR{consistent_dma_mask_bits}=="32"
    ATTR{d3cold_allowed}=="1"
    ATTR{device}=="0x0003"
    ATTR{dma_mask_bits}=="64"
    ATTR{driver_override}=="(null)"
    ATTR{enable}=="1"
    ATTR{irq}=="29"
    ATTR{local_cpulist}=="0-1"
    ATTR{local_cpus}=="3"
    ATTR{msi_bus}=="1"
    ATTR{numa_node}=="-1"
    ATTR{subsystem_device}=="0x0030"
    ATTR{subsystem_vendor}=="0xdd01"
    ATTR{vendor}=="0xdd01"

  looking at parent device '/devices/pci0000:00/0000:00:1c.4':
    KERNELS=="0000:00:1c.4"
    SUBSYSTEMS=="pci"
    DRIVERS=="pcieport"
    ATTRS{broken_parity_status}=="0"
    ATTRS{class}=="0x060400"
    ATTRS{consistent_dma_mask_bits}=="32"
    ATTRS{d3cold_allowed}=="0"
    ATTRS{device}=="0x2948"
    ATTRS{dma_mask_bits}=="32"
    ATTRS{driver_override}=="(null)"
    ATTRS{enable}=="1"
    ATTRS{irq}=="26"
    ATTRS{local_cpulist}=="0-1"
    ATTRS{local_cpus}=="3"
    ATTRS{msi_bus}=="1"
    ATTRS{numa_node}=="-1"
    ATTRS{subsystem_device}=="0x1308"
    ATTRS{subsystem_vendor}=="0x103c"
    ATTRS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    KERNELS=="pci0000:00"
    SUBSYSTEMS==""
    DRIVERS==""






     RSS of this page