Home / MythTV #5 MythBuntu 16.04 on Intel DZ68DB DVB - C

MythTV #5 MythBuntu 16.04 on Intel DZ68DB DVB - C



This page will be used to document the development of my 5th Mythtv system which will be based on the Intel DZ68DB moherboard, i3 2120T Processor and 3 Dual Terratec DVB-C tuners. It is not THE most perfect setup but just a documented setup of my system and preferences.

List of hardware

  • Motherboard: DZ68DB moherboard
  • CPU: Intel i3 2120T
  • Memory: Corsair Value Select 4 GB DDR3 (1333 MHz / PC3-10600) Ean's 0843591010061
  • Seagate 4TB ST4000DM005 Barracuda
  • PSU: Seasonic 80 PLUS Gold
  • Capture cards: 3 x Cinergy PCI HD Terratec (total of 6 recordings)
  • Case: Silverstone GD07B
  • IR receiver: Philips OVU412000 USB IR
  • LCD display: 20X4 LCD Smartie USB display Sure Electronics
  • USB-CEC adapter for HDMI (Pulse Eight)

BIOS Update

The Intel DZ68DB came with an older BIOS. To update the BIOS (not having a Windows PC) you have the option to place the .BIO file on a USB thumb driver (FAT32), remote the yellow BIOS jumper from the motherboard and boot the system with te thumbdrive plugged in. I'll take a few minutes for the firmware to flash. The process is very simple, but you have to open the case to access the motherboard

Download and install mythbuntu

Download mythbuntu 16.04 and use unetbootin to put it on a USB stick
Boot from USB stick and install myhtbuntu

/dev/sda is large 4TB data disk
/dev/sdc1 is smaller 2.5" hdd for the OS

/dev/sda data disk
/dev/sdc1 mythbunty 16G ext4
/dev/sdc2 swap 8G

Remote Hauppauge TV (nothing selected)

mythbackend draait onder de user mythtv en maakt dus bestanden aan onder deze gebruiker
zorg er dus voor dat de data directory waarin myhthtv mag schrijven van mythtv.mythtv is.
mkdir /mythtv_data (holds mythtv Data)
mkdir /data (holds all my other file as a NAS server)
chown mythtv.mythtv /mythtv_data

Update system

sudo apt-get update
sudo apt-get upgrade

create initial backup

reboot and create backup using  sysrecue
chreate backup of root partition

mkdir /data
mount /dev/sda3 /data
mkdir /data/backup
dd if=/dev/sda1 of=/data/backup/mythbuntu16.04_update.dd
backup MBR
dd if=/dev/sda1 of=/data/backup/mythbuntu16.04_updateMBR.dd bs=512 count=1 

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)

Disk labels vs UUID

Mythbuntu uses UUID instead of disk labels. This means you can't simply create an image of a system and restore it on a new harddisk. I prever to use disk labels. 
You can use e2label or gparted, a grafical tool to do the same in a user friendly way

LABEL=MythTVBoot /               ext4    errors=remount-ro 0       1
LABEL=mythtv_data /mythtv_data           ext4    defaults        0       2
LABEL=data /data           ext4    defaults        0       2
LABEL=Swap none            swap    sw              0       0

change /etc/default/grub
uncomment: #GRUB_DISABLE_LINUX_UUID=true

update /boot/grub/grub.cfg: 
#sudo update-grub


configure tuners
Start mythtv setup
- 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
herhaal voor:

Kies 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)
Channel frequency table: default
Network ID: 4444 (werkt voor alle FTA kanalen)

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

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)

Mythfrontend settings

setup audio:
Setup->audio-> test -> finish (without this no sound?!)

screenshot path /data/screenshots (user mythtv, perm. 777)

setup->video->playback groups->default:
Skip Ahead: 30 sec
Skip Back: 15 sec


Use the Session and Settings tool (in XFCE menu) to configure startup applications
- Update notifier
- screen saver
- XFCE Volume daemon
- Mythtv Frontend
(press i when the mythwelcome page is open, to enter the settings screen)

Disable update notification

settigns->software & updates -> updates -> automatically check for updates: Never


Display setup didn't need anything special. De monitor was recognized by X and all settings worked without change.
xscreensaver was a little annoying. I disabled the screensaver function but after a suspend, it asked for a login password. I ended up with simply removing xsreensaver completely (why do you want a screensaver on your HTPC anyway...)
apt-get remove xscreensaver

After that, the screen turned black after a few minutes idle.
/usr/bin/xset dpms 0 0 0; /usr/bin/xset -dpms
(one of the xset commands should do, but just to be sure, I did both)
solved this. Add this as start up application

After powering off my TV and switching it back on, MythTV gave a black screen. Only after restarting X

 sudo service lightdm stop

 sudo service lightdm start

The screen came back. After some googling and trying different options this is what worked for me:


In the directory /usr/share/X11/xorg.conf.d

create a file "20-intel.conf" with this content:
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option     "Hotplug" "false"


You can find your root db password here:
In the apache config file:

(look for db_password)

Remote Control

There seems to be a bug in the Lirc config. To fix it open:
REMOTE_MODULES="lirc_dev lirc_i2c"
(the kernel module lirc_i2c is not present, and with this configuration lirc will not work)
After this change reboot your system.

Most of the time I use the TV guide and the Recorded video's menu. So I created a few jumppoints to get there quickly with a single button:

configure jumppoints:
start mythweb en go to settings->mythtv->key bindings
Program Guide: Ctrl+g
TV Recording Playback: Ctrl+p
Main menu: Ctrl+m

edit /home/asrock/.lirc/mythtv and add:
remote = Hauppauge_350
prog = mythtv
button = Videos
config = Ctrl+p
repeat = 0
delay = 0

remote = Hauppauge_350
prog = mythtv
button = Guide
config = Ctrl+g
repeat = 0
delay = 0

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

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

# 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
remote = Hauppauge_350
prog = mythtv
button = yellow
config = Home
repeat = 0
delay = 0

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

# 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. 
    remote = Hauppauge_350
    prog = mythtv
    button = Prev.Ch
    config = I
    repeat = 0
    delay = 0

hdmi sound

To get sound over HDMI I've installed pulseaudio:
apt-get install pulseaudio pavucontrol

Start pavucontrol en select the desired output on the config page. (Digital Stereo (HDMI) output + Analog Stereo Input)
TODO: I want both analog out (to receiver) *and* hdmi out (to TV)
Configure mythtv (to use Pulseaudio) Setup->Audio.

Sound over HDMI and Analog

First, users need to understand the system's audio layout. This is accomplished using aplay which is part of the alsa-utils package.
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

The key to a configuration like this is to understand that whatever is selected in pavucontrol under Configuration>Internal AUdio is the default device. Load pavucontrol>Configuration and select Digital Stereo (HDMI 2) + Analog stereo input.
Add the following to /etc/pulse/default.pa to setup the analog as a secondary source:
### Load analog device
load-module module-alsa-sink device=hw:0,0
load-module module-combine-sink sink_name=combined
set-default-sink combined
Restart PulseAudio, run pavucontrol and select the "Output Devices" tab. You can now show the virtual Output devices.

Now start a program that will use pulseaudio such as mplayer, vlc, mpd, etc. and switch to the "Playback" tab. A pulldown should be available for the running program to select one of the three sources.
Make sure to set Alsa:pulse in the mythtv setup (setup->audio: "Audio output device"=ALSA:pulse)  

Until this point this used to be enough, but now this didn't work so I had to pass an extra option to the kernel:
Edit /etc/default/grub and add the i915.disable_power_well=0 option.
GRUB_CMDLINE_LINUX_DEFAULT="i915.disable_power_well=0 root=LABEL=MythTVBoot"
recreate grub.conf by update-grub and restart your system.

somethings audio stops working and Pavucontrol switches back to default on the Configuration page.
Not loading the module-suspend-on-idle seems to fix this:
edit /etc/pulse/default.pa
comment the line:
#load-module module-suspend-on-idle

Installing Philips OVU412000 USB IR receiver

No special tweaks neede. Just plug it in, reboot and you're done.

Frontend settings

In the MythtvFrontend:
on playback exit: save position and exit

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

disable jobs
disable commercial detection
disable metadata lookup

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


After the default installation MythWeb had some errors. For example hen I selected the program list it gave a fatal error. The solution was found here.

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. I believe the error was caused by an incompatibility between mysql 5.7 and databases from older versions of mysql.

There may be other and better solutions (I imagine the problem will be fixed by the devs), but this one works for now.

Backup mysql database

# backup mysql database
# m = minute (0-59)
# h = hour (0-23)
# dom = day of the month (1-31)
# mon = month (1-12)
# dow = day of the week (0-7)
# m h dom mon dow user command
15 3 * * * root /usr/local/bin/mysqlbackup

create directory to hold backups
#mkdir /data/mysqlbackup
mysqldump -u root -pmythtv --databases mysql mythconverg > /data/mysqlbackup/mythtv`date +%u`.sql
(this will create 7 backup files 1=Monday, 2=Tuesday.... and overwrite the files every week to save space)

HDMI CEC Pulse Eight


     RSS of this page