Main /

Myth Box

Navigation

Links

Useless Badges


All original content, unless otherwise noted, is licensed under a Creative Commons License.

@

Myth Box

Myth TV PVR

My beloved Series 1 TiVo has been dying a slow, painful death. Recently, I decided that instead of "renting" a new Series 2+ TiVo, I'd investigate the state of MythTV and un-encumbered, DRM-free, opensource PVRs. Below are my notes on the process, hopefully someone googling for similar hardware finds it useful. As I've upgraded I've added additional notes below. After major changes in my setup I reset this page, so check out MythBoxArchive for some past configuration hints.

The Specs

The goal was to build something on-par with the TiVo, both in size/loudness and in appliance-like stability. Other considerations were the need for wireless and existing external FireWire storage. HDTV (in or out) was not a primary consideration, nor was theater-quality sound. Rough budget was $500, with a little slack for re-usable parts in case the project ended in failure.

Hardware

  • VIA EPIA MII10000
    • Mini-ITX
    • 1GHz VIA Nehemiah C3 CPU (i686, MMX, SSE)
    • CIA CLE266 Unichrome (MPEG2 XvMC, Composite/S-Video out)
    • CardBus and CompactFlash
    • FireWire
    • 10/100 ethernet
  • Seagate 250GB 7200RPM HD
  • Hauppauge WinTV PVR-500 MCE
    • 2 PVR-150's on one card
    • Hardware MPEG-2 encoding
    • FM radio tuner
  • Zapway.de IR receiver
  • Generic Mini-ITX case, DVD+CD-RW

Software

  • KnoppMyth R5C7

Front Ends

  • In addition to the KnoppMyth frontend/backend, I use two other standalone front ends: my Intel iMac running MythFrontend, and a Roku PhotoBridge HD1000 running MythRoku.

Install Notes

After a ~5 year break from installing and configuring linux (livecds rule), things seem to have improved quite a bit... About 90% of the install just worked. The notes below are broken up by hardware component and detail what I had to do to get it working and/or optimized (e.g. video works out of the box, but not all the unichrome bells and whistles).

The basic install instructions are at http://knoppmythwiki.org/index.php?id=KnoppMythInstall

Misc KnoppMyth settings

  1. Install the i686 packages
  2. No boot splash screen (too hard to read on a TV)
  3. No LIRC (do it manually below)
  4. Fix up /etc/apt/sources.conf:
deb http://http.us.debian.org/debian stable main contrib non-free
deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
deb http://security.debian.org stable/updates main contrib non-free
  1. Convert /myth to XFS
  2. Enable MySQL networking: comment out skip-networking in /etc/mysql/my.cnf
  3. Enable MySQL LAN permissions: mysql -u root mythconverg and grant all on mythconverg.* to mythtv@"172.16.0.%" identified by "mythtv"
  4. Install DeCSS: /usr/share/doc/libdvdread3/examples/install-css.sh
  5. apt-get install autofs and uncomment smb automount
  6. MPlayer Resume
  7. Set audio output to ALSA:default, mixer to default
  8. Fetch Channel icons: (as root) /usr/local/bin/mkiconmap.pl && mythfilldatabase --import-icon-map iconmap.xml --update-icon-map

WPA2 Wireless

  1. Create /etc/wpa_supplicant.conf:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=2
fast_reauth=1

network={
        ssid="SSIDString"
        proto=RSN
        key_mgmt=WPA-PSK
        group=CCMP
        pairwise=CCMP
        psk="PasswordString"
}
  1. update-rc.d wpasupplicant defaults
  2. Enable and set driver/device in /etc/default/wpasupplicant
  3. /etc/init.d/wpasupplicant start
  4. Add wireless-essid SSIDString to wireless dev's section of /etc/network/interfaces

Unichrome X drivers

  1. Replace /etc/X11/XFree86Config-4:
Section "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        RgbPath      "/usr/X11R6/lib/X11/rgb"
        ModulePath   "/usr/X11R6/lib/modules"
        FontPath     "/usr/X11R6/lib/X11/fonts/misc:unscaled"
        FontPath     "/usr/X11R6/lib/X11/fonts/misc"
        FontPath     "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
        FontPath     "/usr/X11R6/lib/X11/fonts/75dpi"
        FontPath     "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
        FontPath     "/usr/X11R6/lib/X11/fonts/100dpi"
        FontPath     "/usr/X11R6/lib/X11/fonts/Speedo"
        FontPath     "/usr/X11R6/lib/X11/fonts/PEX"
# Additional fonts: Locale, Gimp, TTF...
        FontPath     "/usr/X11R6/lib/X11/fonts/cyrillic"
#       FontPath     "/usr/X11R6/lib/X11/fonts/latin2/75dpi"
#       FontPath     "/usr/X11R6/lib/X11/fonts/latin2/100dpi"
# True type and type1 fonts are also handled via xftlib, see /etc/X11/XftConfig!        FontPath     "/usr/X11R6/lib/X11/fonts/Type1"
        FontPath     "/usr/share/fonts/ttf/western"
        FontPath     "/usr/share/fonts/ttf/decoratives"
        FontPath     "/usr/share/fonts/truetype"
        FontPath     "/usr/share/fonts/truetype/openoffice"
        FontPath     "/usr/share/fonts/truetype/ttf-bitstream-vera"
        FontPath     "/usr/share/fonts/latex-ttf-fonts"
        FontPath     "/usr/X11R6/lib/X11/fonts/defoma/CID"
        FontPath     "/usr/X11R6/lib/X11/fonts/defoma/TrueType"
EndSection


Section "ServerFlags"
#       Option  "NoTrapSignals"
#       Option  "DontVTSwitch"
#       Option  "DontZap"
#       Option  "Dont Zoom"
#       Option  "DisableVidModeExtension"
#       Option  "AllowNonLocalXvidtune"
#       Option  "DisableModInDev"
#       Option  "AllowNonLocalModInDev"
        Option  "BlankTime"     "0"
        Option  "StandbyTime"   "0"
        Option  "SuspendTime"   "0"
        Option  "OffTime"       "0"
        Option  "AllowMouseOpenFail"
        Option  "NoPM"
EndSection


Section "Module"
        Load  "dbe"
        Load  "extmod"
        Load  "fbdevhw"
        Load  "glx"
        Load  "record"
        Load  "freetype"
        Load  "type1"
        Load  "dri"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "yes"
EndSection

Section "Monitor"
        Identifier   "Television"
        HorizSync    30.0-50.0
        VertRefresh  60.0
        Option      "DPMS" "false"
        #Option     "nodpms"
        #Option     "noddc"
        ModeLine "720x480" 26.7 720 736 808 896 480 481 484 497
EndSection

Section "Device"
        Identifier  "via"
        Driver      "via"
        VideoRam    32768
        Option      "PciRetry" "true"
        Option      "ActiveDevice" "TV"
        Option      "TVType" "NTSC"
        Option      "TVOutput" "S-Video"
        Option      "EnableAGPDMA" "true"
        Option      "TVScan" "over"
#       Option      "TVDeflicker"  "2"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "via"
        Monitor    "Television"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "800x600" "720x480Noscale" "720x480"
        EndSubSection
EndSection

Section "DRI"
        Group        0
        Mode         0666
EndSection
  1. Enable "Bob 2x" de-interlacing in the "Tv Playback" mythfrontend settings

Unichrome XvMC support

  1. http://www.mythtv.org/wiki/index.php/XvMC

PVR-500 handholding

  1. Disable generic v4l modules:
cd /lib/modules/2.6.15-chw-2/kernel/drivers/media/video
mv tuner.ko tuner.ko.off
mv tveeprom.ko tveeprom.ko.off
mv tda9887.ko tda9887.ko.off

LIRC

  1. Add setserial /dev/ttyS0 uart none to /etc/init.d/bootmisc.sh
  2. Replace lirc_i2c with lirc_serial in /etc/lirc/hardware.conf
  3. Use http://lirc.sourceforge.net/remotes/dishnet/301_501_3100_5100_58xx_59xx as /etc/lircd.conf

Links

The following long list of URLs was helpful in my quest for PVR perfection. Some of the instructions above came from these pages. My general policy is to link to instructions if they are being updated and maintained, and to repeat them here (so I can update them if needed) if they are not. The exception is one and two liners. I am not claiming to have come up with any of these tricks on my own, I owe it all to Google and trial and error.

Update Notes

KnoppMyth R5D1

  • Create /myth/backup/restore.list before starting upgrade:
./etc/ssh
./etc/wpa_supplicant.conf
./etc/default/wpasupplicant
./etc/network/interfaces
./etc/X11/XF86Config-4
  • i686 packages, source.conf, and PVR-500 handholding steps no longer required
  • Re-run mythtv-setup and delete/recreate all devices
  • Tasks that need to be repeated:
    • comment out skip-networking in /etc/mysql/my.cnf
    • Install DeCSS: /usr/share/doc/libdvdread3/examples/install-css.sh
    • apt-get install autofs and uncomment smb automount
    • update-rc.d wpasupplicant defaults
    • Change fstype of /myth from ext3 to xfs in /etc/fstab
    • Append setserial /dev/ttyS0 uart none to /etc/init.d/bootmisc.sh
  • new /etc/X11/XF86Config-4
Section "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
        RgbPath      "/usr/X11R6/lib/X11/rgb"
        ModulePath   "/usr/X11R6/lib/modules"
        FontPath     "/usr/X11R6/lib/X11/fonts/misc:unscaled"
        FontPath     "/usr/X11R6/lib/X11/fonts/misc"
        FontPath     "/usr/X11R6/lib/X11/fonts/75dpi:unscaled"
        FontPath     "/usr/X11R6/lib/X11/fonts/75dpi"
        FontPath     "/usr/X11R6/lib/X11/fonts/100dpi:unscaled"
        FontPath     "/usr/X11R6/lib/X11/fonts/100dpi"
        FontPath     "/usr/X11R6/lib/X11/fonts/Speedo"
        FontPath     "/usr/X11R6/lib/X11/fonts/PEX"
# Additional fonts: Locale, Gimp, TTF...
        FontPath     "/usr/X11R6/lib/X11/fonts/cyrillic"
#       FontPath     "/usr/X11R6/lib/X11/fonts/latin2/75dpi"
#       FontPath     "/usr/X11R6/lib/X11/fonts/latin2/100dpi"
# True type and type1 fonts are also handled via xftlib, see /etc/X11/XftConfig!        FontPath     "/usr/X11R6/lib/X11/fonts/Type1"
        FontPath     "/usr/share/fonts/ttf/western"
        FontPath     "/usr/share/fonts/ttf/decoratives"
        FontPath     "/usr/share/fonts/truetype"
        FontPath     "/usr/share/fonts/truetype/openoffice"
        FontPath     "/usr/share/fonts/truetype/ttf-bitstream-vera"
        FontPath     "/usr/share/fonts/latex-ttf-fonts"
        FontPath     "/usr/X11R6/lib/X11/fonts/defoma/CID"
        FontPath     "/usr/X11R6/lib/X11/fonts/defoma/TrueType"
EndSection


Section "ServerFlags"
#       Option  "NoTrapSignals"
#       Option  "DontVTSwitch"
#       Option  "DontZap"
#       Option  "Dont Zoom"
#       Option  "DisableVidModeExtension"
#       Option  "AllowNonLocalXvidtune"
#       Option  "DisableModInDev"
#       Option  "AllowNonLocalModInDev"
        Option  "BlankTime"     "0"
        Option  "StandbyTime"   "0"
        Option  "SuspendTime"   "0"
        Option  "OffTime"       "0"
        Option  "AllowMouseOpenFail"
        Option  "NoPM"
EndSection


Section "Module"
        Load  "dbe"
        Load  "extmod"
        Load  "fbdevhw"
        Load  "glx"
        Load  "record"
        Load  "freetype"
        Load  "type1"
        Load  "dri"
EndSection

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "yes"
EndSection

Section "Monitor"
        Identifier   "Television"
        HorizSync    30.0 - 85.0
        VertRefresh  50.0 - 120.0
        #DisplaySize    400 300
        DisplaySize     200 150
        Option      "nodpms"
        Option      "noddc"
        #Refresh Rate 60Hz
        ModeLine "720x480" 26.7 720 736 808 896 480 481 484 497
        ModeLine "720x576" 32.7 720 744 816 912 576 577 580 597
        ModeLine "848x480" 31.5 848 864 952 1056 480 481 484 497
        ModeLine "856x480" 31.7 856 872 960 1064 480 481 484 497
        ModeLine "1024x512" 41.3 1024 1056 1160 1296 512 513 516 531
        ModeLine "1280x768" 80.1 1280 1344 1480 1680 768 769 772 795
        ModeLine "1440x1050" 126.2 1440 1536 1688 1936 1050 1051 1054 1087
EndSection

Section "Device"
        Identifier  "via"
        Driver      "via"
        VideoRam    32768
        Option      "PciRetry" "true"
        Option      "ActiveDevice" "TV"
        Option      "TVType" "NTSC"
        Option      "TVOutput" "S-Video"
        Option      "EnableAGPDMA" "true"
        Option      "TVScan" "over"
#       Option      "TVDeflicker"  "2"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "via"
        Monitor    "Television"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "800x600" "720x480Noscale"
        EndSubSection
EndSection

Section "DRI"
        Group        0
        Mode         0666
EndSection

KnoppMyth R5D18 (Alpha)

Recent Changes (All) | Edit SideBar Page last modified on September 30, 2007, at 02:18 PM Edit Page | Page History
Powered by PmWiki