Software

Configuration

Channel 9, Gem, GO will not tune. The dtv_multiplex.network_id is null - set to 4114 seems to fix things.

Shepherd grabber

Standard install except cron job is disabled and allow mythtv to run mythfilldatabase. This is to allow mythtv to also be in control of suspend.
Mythtv is configured to run mythfilldatabase daily at 5 minutes after the router wakes the server up for daily processing

Suspend to RAM on idle

Why Suspend to RAM and not just a full shutdown that would "just work"? Partly due to boot speed and partly just because.

xorg.conf

The FX5200 cards were the cause of my DVI problems on my projector. Apparently they freak out a PCB component causing the EDID data to become corrupt.
(a Gigabyte card lasted from Aug 2006 to Dec 2007. Fortunately the new nvidia driver allow you to use a CustomEDID to load the data from a file.

Option ExactModeTimingsDVI is also important for the projector.

Option "UseEDIDDpi" "false" or some equivalent control of DPI is important for the Samsung television otherwise you get really small fonts (fixed in 0.21)

There are two layouts, the default uses outputs via VGA to a Samsung LCD television, the second uses DVI to the PE8700 projector.

~mythtv/bin/suspend_mythtv.sh

#!/bin/sh
# We use dbus-send because it seems to block until resume which is what we want
echo "Suspending"
dbus-send --system --print-reply --dest=org.freedesktop.Hal /org/freedesktop/Hal/devices/computer \
org.freedesktop.Hal.Device.SystemPowerManagement.Suspend int32:2
echo "Resumed"

LIRC Remote Control

Sound

Settings for using the receiver. When connected to TV just use HDMI audio, requires "SPDIF1" to be unmuted

~/.asoundrc

Could probably do better 48/44kHz switching on the analog output between music and video but if that is important we just go digital passthrough and let the receiver do the work.

In myth config, you can see that default sound device is ALSA:myth-video, the passthrough device is ALSA:myth-passthru, and mythmusic uses ALSA:myth-music. the AC3PassThru and DTSPassThru
settings are managed by the ruby program

Containers

The SQL database contains the ip addresses and ports, both for connecting *and for listening*, if there are any remote frontends or backends then these ports must be exposed consistently. Hostnames are important for frontends to find their own settings - but these can be locally defined.

Each set of containers for master backend, slave backends + frontends gets it own container network via tunnels.

When the backend container starts it could rewrite the MasterServerIP(6) and BackendServerIP(6) as a straightforward sql update?
When the frontend containers start, (from a launch command on the master backend) they should rewrite config.xml with the IP address of the relevant master backend.

Master Backend

Acts as the master LXD daemon from which the containers are launched, and the network gateway for the container networks.

Multiple backends can run simultaneously, but dvb/usb tuners can only be accessed by one backend at a time, by choosing which tuners are exposed to each backend

Apps - Mysql, Mythbackend, Shepherd all in same lxd container

Filesystem - base LXD filesystem covers the main directory. Still use other LVM volumes for the recordings directory. Or perhaps just use ZFS for all of it. Need to ensure the test network doesn't consume the whole disk?

? Multicast support for upnp

Frontend

Since the frontend is attached to a physical display there can really only be one frontend running at any one time on a given host.

Video: Run X display on host, just run the app in the container forwarding X over a Unix socket. OpenGL & VDPAU/VAAPI should be fine in this arrangement.