CamelTail.com

MythTV
These are some of my notes from setting up a MythTV system using Slackware 10.2. It's still not all that polished, but for now, it will let me record TV and watch TV with those neat PVR features like pausing and rewinding. I followed the directions in the documentation at http://www.mythtv.org to build and install the software. This page just has notes about things that are more specific to the hardware that I used or anything that deviates from the installation instructions.
Specs
  • CPU: AMD Sempron 2800+
  • Motherboard: ECS 755-A2
  • RAM: 256MB PC3200
  • Chipset: SiS 755
  • Graphics: Nvidia GeForce2 Pro
  • Hard Disk: Maxtor 160GB
  • Optical: Cheap DVD-ROM drive
  • Tuner: Sabrent SBT-TVFM
  • Ethernet, sound, USB: Onboard
  • Kernel: 2.6.14
  • MythTV version: 0.18.1
Disk Partitions
The drive is partitioned into 4 partitions:
    /dev/hda1 - 2GB root partition
    /dev/hda2 - 512MB swap
    /dev/hda3 - another 512MB
    /dev/hda4 - Rest for storage
The machine really doesn't need that much swap space. I put the second swap partition in there just for future expansion. It's not being used right now. I don't think the root partition needs to be 2GB. I'm sure all the software can fit in 1GB but everything is taking up 1.5GB (including kernel sources and MythTV sources). The storage partition uses jfs for its large file handling capabilities.
Video Card
I'm using an old GeForce2 Pro card which has S-Video out as my display adapter. In order to use the S-Video card, I need to install the nvidia binary drivers. The GeForce2 Pro chip is no longer supported by the latest driver version so I had to use the 7174 version. These options need to go into the "Device" section for the card in xorg.conf:
    Option "RenderAccel" "1"
    Option "HWCursor" "1"
    Option "NoLogo" "1"
    Option "NvAGP" "1"
    Option "ConnectedMonitor" "TV"
    Option "TVStandard" "NTSC-M"
    Option "TVOutFormat" "SVIDEO"
The card can do 800x600 out of its S-Video port but the screen area becomes really small. So I'm running at 640x480. This will be a problem when playing DVDs, but I havne't tried that yet. I want to get a newer card anyway. I think most of the newer cards will do 1024x768 on the S-Video port so I'm looking forward to that.

I have some notes saying that AGP GART needs to be disabled for TV-out to work, but I think that might have been for an even older TNT2 card. The AGP GART module is loaded in my current configuration.
TV Tuner Card
The chip on the Sabrent SBT-TVFM card is a Phillips saa7134. It's fairly well supported under Linux. The saa7134 module is in the Video for Linux section of the kernel config. To tell the module which tuner to use when it's loaded, I added this line to /etc/modprobe.conf:
options saa7134 card=42
The box includes a remote control, but that's not supported in the 2.6.14 kernel release. There is a patch floating around that enables the remote. I haven't tried it though.
2.6.14 Kernel
Slackware 10.2 comes with a 2.4.31 kernel so I compiled a 2.6.14 kernel to replace it. For the ECS 755-A2 board, the onboard sound uses the Intel 8x0 driver and the onboard LAN uses the SiS 900 module. Here's my .config file. In order to use the automatic wakeup feature, I had to compile the NVRAM and RTC modules as well.
MythTV
For some reason, the configure script doesn't put the right architecture in the makefile. It uses Pentium Pro by default. I had to run configure with --arch=athlon-xp to optimize for my architecture.

After installing, I created a user (mythtvuser) to run all MythTV functions. This user doesn't have a password so I can't just log in as mythtvuser. I need to log in as root first and then su to mythtvuser. Eventually, I'll get the machine to boot up and start the frontend right away so I won't need to log in.
Shutting down
MythTV has a feature where it can shut down the machine when it becomes idle. This can be set in the Shutdown/Wakeup Options section of mythtvsetup. Because I'm running the backend as mythtvuser and not root, I need to give mythtvuser the ability to shut down the computer without a password. To do that, I installed sudo and added this line to the sudoers file:
mythtvuser      ALL = NOPASSWD: /sbin/shutdown -h now
(Don't forget to use visudo to edit the file instead of a plain editor!)
Waking up
I used nvram-wakeup to wake the machine up. My motherboard isn't supported by nvram-wakeup so I used the included guess utility to make a configuration. I still had to go in and look at the bits individually though, because guess gets confused. Here's what's in my mb.conf file.

The problem is that when nvram-wakeup writes the NVRAM and RTC, it clears the alarm enable bit in the RTC. I can't seem to set it using an ioctl. The only way to do it was to write a small program to set it in direct ISA mode which only works as root. To further complicate matters, the shutdown script in /etc/rc.d/rc.6 runs hwclock to save the system time to the RTC. That, for some reason also clears the AIE bit so I removed that from rc.6 and now the machine will wake up whenever MythTV tells it to. It still won't wake up to update the database though.

Here's the code to set the AIE bit: rtc_set_wakeup.c.
To do
Some other features I'd like to add or fix up:
  • Be able to play DVDs
  • Use the remote control
  • Set up transcoding
  • Automatically wake up and run mythfilldatabase
Change Log
11/27/05 - Initial version
Contents

e-mail me: carl A.Tee cameltail.com