Valid HTML 4.01 Transitional

MythTV on Dell Zino with SuSE 11.3

James F. Carter <jimc@math.ucla.edu>, 2010-12-10

Formerly we ran MythTV on a Dell Dimension E510 named Iris. It survived for four years despite various mishaps including a blown power supply, but finally a power surge got its motherboard. Therefore we migrated MythTV to a Dell Inspiron 400 HD Zino called Aurora. This is documentation for what it took to get MythTV running on the Zino. Also I planned to document procedures and settings on Iris, but in the struggle to get it working and to overcome various hardware failures, this goal got forgotten. Now I'm getting the basic setup into a web page.

Hardware

Processor
Vendor Dell
Model Inspiron 400 HD Zino
Processor AMD Athlon 6850e Neo, dual core 1.8GHz
Memory 2 x 1Gb, 2Gb total, Dual channel SODIMM DDR2, 800 MHz
Chipset AMD K8 IMC (no ECC)
Graphics ATI Radeon HD 3200 (onboard) (RS780 GPU)
Video RAM 256Mb stolen from main memory
Audio (analog) ATI SBx00 Azalia (Intel HDA)
Audio (HDMI) ATI RS780 Azalia S/PDIF
Hard disc 250Gb, Western Digital WD2500 AAJS-75M0A0
Optical disc DVD+/-RW 8x, TSSTcorp model TS-L633C
Wired 802.3 Ethernet Broadcom BCM57780 Gigabit NIC (tg3 driver)
About the Zino Review by Jimc
Television (Production)
Vendor Sony
Model KDF-E50A10 Grand WEGA
Vintage 2006
Dimensions 50 inch / 127 cm; 1280x768 pixels so it says
Technology LCD rear projection
Inputs HDMI, VGA, ATSC, NTSC, QAM-64, component etc.
Television (Testing)
Vendor Sony
Model KDL-40EX500 Bravia
Vintage 2010
Dimensions 40 inch / 102 cm; 1920x1080 pixels
Technology LCD flat panel, cold cathode lamp
Inputs HDMI, VGA, ATSC, NTSC, QAM-64, component etc.
Signal Source
Tuner Equipment HDHomeRun
Signal Source ATSC over the air
Locale USA, Los Angeles

The actual LCD pixel dimensions of the KDF-E50A10 are hard to determine, but it must be in the general range of 1280x768px, which is the largest mode reported by the EDID for VGA, and for HDMI the EDID reports 1280x720. A mode of 1920x540 (interlaced) is also reported on HDMI, but the Radeon RS780 does not support interlaced modes.

While the HDMI interconnect works fine (image and audio) on the KDL-40EX500, the KDF-E50A10 refuses to perform the HDMI audio no matter what settings I try. Therefore I'm using the VGA connection and the corresponding 3.5mm stereo jack.

TV Settings: On the KDF-E50A10 we're using input 7, PC/VGA. The only non-default setting (under Screen) is Wide Mode = Full #1. Full #2 looks identical with a video mode of 16:10 aspect ratio, but with 4:3 it would stretch X anamorphically (i.e. circles become wide ellipses). Both of these have a margin of about 1cm top and bottom, and 4cm at the sides. Zoom expands to fill the entire physical LCD panel, but the optical alignment makes it overscan, losing about 2cm on each edge.

If you have overscan it is possible to set up MythTV to scale the content to fit in the visible screen; however, this locks MythTV to that screen geometry, which makes trouble when you switch to a different display. The symptom is that on a bigger display the MythTV content occupies only the upper left corner of the screen (possibly with a narrow unoccupied border), while on a smaller display you can only see the upper left quadrant of the content. Change the screen offsets and size back to 0 when switching over to a different display.

Software

Versions:

Distro Infrastructure

The rest of my house machines have OpenSuSE 11.2, but the ATI Radeon HD 3200 (RS780 GPU) is rather new, and neither the radeonhd nor radeon X drivers were performing satisfactorily: no acceleration, or if it would use acceleration it would cause a kernel panic when suspending to RAM. Therefore I did a quick upgrade to version 11.3 with very positive results. Version 11.4 is promised on about 2011-03-12 and I plan to upgrade all hosts soon thereafter.

The upgrade went surprisingly smoothly, not trashing or invalidating my special packages and setup including MythTV and multimedia players.

Tidbit: In /var/lib/mysql/ I find a lot of files with names similar to mysql-bin.999999 . This blog by Vivek Gite dated 2008-12-16 tells what's happening: It's a journal of modifications to the database. You can use it for recovering transactions done after a dump was taken, or for sending transaction results to slave servers, If you don't need the journal, edit /etc/my.cnf like this: Comment out "log_bin", "expire_logs_days", "max_binlog_size". Otherwise, periodically execute the command

PURGE BINARY LOGS BEFORE 'ccyy-mm-dd hh:mm:ss'
mysql -u root -p passwd -e "PURGE BINARY..."

I added this to the backup section of /etc/init.d/mysql. MySQL documentation is here.

These unusual features had to be dealt with on Aurora:

These scripts are found in ~watchtv/bin; they must be checked for proper operation.

Choice of Graphics Driver

For the ATI Radeon 3200 HD graphics unit, the credible drivers are radeon from xorg-x11-driver-video 7.5 or radeonhd from xorg-x11-driver-video-radeonhd-1.3.0_20100325_f6c9991-1.13.i586 . Current policy is that radeon is the one which receives most development attention, while radeonhd will be maintained as long as it is useful. Much of the 3D acceleration from radeonhd has been merged into radeon.

With the radeonhd driver from xorg-x11-driver-video-radeonhd-1.3.0_20100216_79a0ab2 and xorg-x11 version 7.4, it is necessary to specify on the kernel command line hpet=disable. I'm pretty sure this is required for radeonhd version 1.3.0 and xorg-x11 7.5 also. It is not necessary for the regular radeon driver in xorg-x11 either 7.4 or 7.5. Unfortunately, without the HPET (High Precision Event Timer) the substitute (presumably the Time Stamp Counter) drifts ridiculously, about 2.5 secs per 900 secs, and NTP can't handle this big of an error.

Therefore we're using the radeon driver and not disabling the HPET. (See below about the HPET.) However, starting between kernel 2.6.31 and 2.6.34, kernel mode setting (KMS) came in, and there is some conflict between KMS and the radeon driver, so you need nomodeset on the kernel command line.

As for /etc/X11/xorg.conf, these are the special features:

Timer Wakeup and Network Time Protocol

See this MythTV wiki page about ACPI wakeup.

Setting the Wake Time

You will need a script that mythbackend can call to set the wake time. (See below for MythTV configuration to supply its name.) There are three standard ways to set the wake timer:

High Precision Event Timer (HPET)

However, gotcha! The High Precision Event Timer (HPET) is the best clocksource on an Intel-type (x86 or x86_64) chipset, but on some motherboards including the Zino there is a bad interaction between it and the realtime clock and the wakeup timer; if the HPET is enabled (by Linux) the machine will not wake. If you have this problem, you need to put hpet=disable on the kernel command line. First find your Grub boot menu file:

In menu.lst or grub.conf, find the stanza you normally boot from, usually the first one, and the kernel command within that. Append hpet=disable. Reboot; you're now minus the HPET. (Check if your Network Time Protocol (NTP) daemon is happy; if not, see the fix below.)

Putting It to Sleep

Mythbackend needs a separate script that shuts down the machine. I need to do these steps:

Network Time Protocol (NTP)

NTP is not good at handling a clocksource which runs a lot slower or faster than real time. It can handle a rate difference of no more than 500 PPM (5e-4). I have never seen a HPET anywhere near this inaccurate -- but on the Zino you need to disable the HPET, and the fallback clocksource, the ACPI Power Management Timer (acpi_pm), is rather bad: 2.83e-3 on one Zino and 2.4e-3 on another, way beyond what NTP can deal with. ntpd could show one of three behaviors:

Here is the procedure to deal with a slow clocksource. However, I wonder if acpi_pm is going to have a gross temperature dependence which when summer comes may go beyond NTP's sync range.

LIRC Infrared Controller

Basically I copied the working LIRC setup from Iris. But LIRC is complicated and I have not properly documented how I have it set up, so I will make up that deficiency now.

MythTV Setup

I am using MythTV 0.22. The current version is 0.24, but there is enough going on that I wanted to avoid upgrading Myth. This turned out to be feasible. I have these sub-packages: backend, base-themes, common, docs, frontend, setup, mythweb.

Basically I copied the working configuration from Iris backups. This did not result in a working configuration on Aurora.

Outstanding Issues