[mythtv-users] my documentation on mythtv installation

James Abernathy jfabernathy at gmail.com
Thu Jan 18 17:31:13 UTC 2018


> On Jan 18, 2018, at 11:07 AM, R. G. Newbury <newbury at mandamus.org> wrote:
> 
> On 2018-01-17 04:44 PM, Jim Abernathy wrote:
>>>> For completeness I updated my blog on what I did to install the latest v29 on Ubuntu 16.04.  I added a section on the database maintenance and using ssmtp to send out maintenance message to my email.http://mythtvinstall.blogspot.com/2018/01/creating-combined-mythtv-headless.html  
>>> 
> 
> I run mythtv on Fedora not Ubuntu so some bits are different. Nonetheless, this is a really good step by step instruction sheet. I suggest that you post it into the mythtv wiki so it cannot die from bit-rot.
> 
> I have 2 comments:
> 
> 1) In your first para you note that logs etc. can fill your '/' drive. You can avoid this by putting /var on a separate partition. If /when a separate /var partition fills up, *nothing bad happens*.  If /when an included var folder fills '/', a very *very* messy crash results. Recovery then requires a live image boot, as the kernel cannot write to its logs and generally panics.
> 
> 
> 2) You note that the HVR2250 is slow to load its firmware. It is actually worse than that. The three drivers have to load *in the correct order* for the card to work. (Due to systemd trying to do everything "in parallel" the actual order on any boot is not deterministic). And the modules have to be *unloaded* in 'top-down' order before you can re-load them. Been there, cursed at that..! Symptoms: the card appears flaky as it sometimes works, and sometimes does not. You can check the load order by parsing output of dmesg.)
> 
> I ended up adding the following to /etc/rc.d/rc.local
> 
> *******************
> # backend must be stopped for modprobes to work
> /usr/bin/systemctl stop mythbackend.service
> killall mythlogserver
> killall mythbackend     # just in case
> # UTF encoding needed by myth if not otherwise set (locale.conf)
> export LC_ALL=en_US.UTF-8
> 
> echo "options saa7164 adapter_nr=6,7" > /etc/modprobe.d/hvr2250.conf
> # the nr=integers may need adjustment on your system!
> 
> # Required to install the modules in the correct order
> # Cannot yank modules out of order, must yank 'top' module first
> # So need to work around failed attempts: use combinations
> modprobe -r tda18271
> modprobe -r s5h1411
> modprobe -r saa7164
> modprobe -r s5h1411
> modprobe -r tda18271
> modprobe -r s5h1411
> #echo "  Ignore FATAL error messages if next lines are empty"
> lsmod | grep tda18271 # these lines just check the removal
> lsmod | grep s5h1411
> lsmod | grep saa7164
> #echo "  No output means all of the modules were properly unloaded"
> #   load in the correct order
> modprobe  tda18271
> modprobe  s5h1411
> modprobe  saa7164
> #echo "  Modules re-loaded in proper order"
> systemctl start mythbackend.service
> 
> *****************
> 
> Ubuntu's systemd may or may not create a rc-local.service file. Probably it does, but if it does not then create a /etc/systemd/system/rc-local.service file containing:
> 
> *********************************
> #  This file is part of systemd.
> #
> #  systemd is free software; you can redistribute it and/or modify it
> #  under the terms of the GNU Lesser General Public License as published by
> #  the Free Software Foundation; either version 2.1 of the License, or
> #  (at your option) any later version.
> 
> # This unit gets pulled automatically into multi-user.target by
> # systemd-rc-local-generator if /etc/rc.d/rc.local is executable.
> [Unit]
> Description=/etc/rc.d/rc.local Compatibility
> ConditionFileIsExecutable=/etc/rc.d/rc.local
> After=network.target
> 
> [Service]
> Type=forking
> ExecStart=/etc/rc.d/rc.local start
> TimeoutSec=0
> RemainAfterExit=yes
> GuessMainPID=no
> *************************
> 
> and chmod 755 /etc/rc.d/rc.local as noted in the service file.
> 
> Together these steps will un-load and re-load the drivers in the correct order and re-start the backend properly and automagically!
> 
> Geoff
> 
> -- 
>             R. Geoffrey Newbury			
>             954 Owenwood Drive
>         Mississauga, Ontario, L5H 3J2
> 
>      t905-271-9600 newbury at mandamus.org <mailto:newbury at mandamus.org>

This looks complicated to me.  As far as I know, I don’t have any problems with the firmware loading.  Below is the output of dmesg related to my recent boot, but it’s seems to be typical of all my boots.

[   16.152434] CORE saa7164[0]: subsystem: 0070:8851, board: Hauppauge WinTV-HVR2250 [card=7,autodetected]
[   16.152438] saa7164[0]/0: found at 0000:03:00.0, rev: 129, irq: 18, latency: 0, mmio: 0xfe000000
[   16.310079] saa7164_downloadfirmware() no first image
[   16.310747] saa7164_downloadfirmware() Waiting for firmware upload (NXP7164-2010-03-10.1.fw)
[   16.499955] saa7164_downloadfirmware() firmware read 4019072 bytes.
[   16.499960] saa7164_downloadfirmware() firmware loaded.
[   16.499961] Firmware file header part 1:
[   16.499963]  .FirmwareSize = 0x0
[   16.499964]  .BSLSize = 0x0
[   16.499966]  .Reserved = 0x3d538
[   16.499967]  .Version = 0x3
[   16.499969] saa7164_downloadfirmware() SecBootLoader.FileSize = 4019072
[   16.499977] saa7164_downloadfirmware() FirmwareSize = 0x1fd6
[   16.499978] saa7164_downloadfirmware() BSLSize = 0x0
[   16.499980] saa7164_downloadfirmware() Reserved = 0x0
[   16.499981] saa7164_downloadfirmware() Version = 0x1661c00
[   23.366105] saa7164_downloadimage() Image downloaded, booting...
[   23.470122] saa7164_downloadimage() Image booted successfully.
[   23.470139] starting firmware download(2)
[   26.094126] saa7164_downloadimage() Image downloaded, booting...
[   27.966133] saa7164_downloadimage() Image booted successfully.
[   27.966150] firmware download complete.

I can record on all my tuners without problems, so I don’t want to go look for one. Besides, I’m going to replace the HVR-2250 soon for a HDHR Quatro. 

As to your comment about putting my doc on the wiki.  I have no idea how to create or edit a wiki and I’m too old to learn.  It’s pretty easy to document using my Macbook and Microsoft Word, then export that to my blogger blog.  It should live there as long as Google is in business. 

Jim A

> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20180118/e8476103/attachment.html>


More information about the mythtv-users mailing list