Freevo Software Build Log is a good starting point for the software.

I think KnoppMyth will be the first port of call; most writeups on the net seem to suggest that it's got a good set of pre-patched binaries, I like Debian/Knoppix, and going for another linux distro would be wasting time; I don't plan to be using anything but MythTV on the box much anyway.

cdrecord dev=/dev/cdrom driveropts=burnfree -speed=16 -verbose -dao -data ~/DL/KnoppMythR5A12.iso

sadly this seems way too slow; it gets into grub, but cannot load the kernel it seems. So another way to get KnoppMyth onto the machine is required.

...After a couple of hours of looking into PXE and net booting, it turns out that in fact, it *will* boot from the USB CD/DVD drive -- as long as that is plugged into the bottom USB port and there's no other USB devices plugged in! ah, hardware.

So, onward with KnoppMyth setup.

it seems "knoppix" and "knoppix26" are not supported, but "expert" works. Quick trace of the expert install steps:

Into the KnoppMyth setup screen ( Now, since I want to use LVM for my KnoppMyth partitions, I'll go for a manual install...

    hda5 / 2GB [bootable]
    hda6 swap 800MB
    hda7 /cache 500MB *
    hda8 /myth  500MB *
    hda9 LVM    all the rest of the space

mkswap /dev/hda6 && swapon /dev/hda6
mke2fs -j -m1 -L root -M / /dev/hda5
mke2fs -j -m1 -L cache -M /cache /dev/hda7
mke2fs -j -m1 -L myth -M /myth /dev/hda8

left hda9 blank for now

OK, I'm happy with that. Reboot off the Knoppix CD and leave the machine running memtest.

...back to find errors...


wouldn't you just know it. memtest reports:

Tst  Pass    Failing Address          Good     Bad      Err-Bits Count Chan
---  ----    ----------------------   ----     -----    -------- ----- ----
  4     0    00015847e28 - 344.4MB    fffbffff fffbfbff 00000400     2    1

This is with memtest-86 v3.0. Re-tested with memtest86+ v1.55, and got the same bit failure:

Tst  Pass    Failing Address          Good     Bad      Err-Bits Count Chan
---  ----    ----------------------   ----     -----    -------- ----- ----
  6     0    00015847e28 - 344.4MB    fffbffff fffbfbff 00000400     5

(test #6 is "Moving inversions, 32 bit pattern".)

If I want to use BADRAM: the setting to avoid that word is

reran test with BIOS set to "Failsafe defaults" and same bit fails; memtest86+ v1.55 testing the range from 344MB-345MB repeatedly finds that bit failing even with conservative settings.

OK, how to get this repaired?

the part was: pqi POWER Series 184-Pin 512MB DDR PC-2100 - Retail Item# N82E16820141173: $45.50

warranty info at :

so, that's a possible TODO.


next step, networking.

ifconfig eth1:

      inet addr:  Bcast:  Mask:

changed eth1 to be statically addressed: /etc/network/interfaces:

iface eth1 inet static
        up route add -net default gw
        down route del default gw

Next, LVM

[email protected]:~$ sudo pvcreate /dev/hda9
  Physical volume "/dev/hda9" successfully created

 * create a volume group, "vg":
[email protected]:~$ sudo vgcreate vg /dev/hda9
  /dev/hdc: open failed: No such device or address
  /dev/hda1: read failed after 0 of 2048 at 0: Input/output error
  /dev/hda2: open failed: No such device or address
  /dev/hda3: open failed: No such device or address
  /dev/hdc: open failed: No such device or address
  /dev/hda1: read failed after 0 of 2048 at 0: Input/output error
  /dev/hda2: open failed: No such device or address
  /dev/hda3: open failed: No such device or address
  /dev/hdc: open failed: No such device or address
  /dev/hda1: read failed after 0 of 2048 at 0: Input/output error
  /dev/hda2: open failed: No such device or address
  /dev/hda3: open failed: No such device or address
  Volume group "vg" successfully created

(those devices are nonexistent, so that's expected.)

[email protected]:~$ sudo vgdisplay vg
  /dev/hdc: open failed: No such device or address
  /dev/hda1: read failed after 0 of 2048 at 0: Input/output error
  /dev/hda2: open failed: No such device or address
  /dev/hda3: open failed: No such device or address
  --- Volume group ---
  VG Name               vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  1
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                0
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               70.99 GB
  PE Size               4.00 MB
  Total PE              18173
  Alloc PE / Size       0 / 0
  Free  PE / Size       18173 / 70.99 GB
  VG UUID               0jrnld-xX82-MX3s-MPxc-OH06-0XTd-yXEBBN

added hda8, hda9, and vgextend'd onto those. now:

  Free  PE / Size       18411 / 71.92 GB

suggested new layout:

        /               2GB
        /var            500MB
        /cache          8GB
        /myth           50GB

        + 800MB swap = 61300MB, leaving 10.62GB free for minor tweaks
        and possible eventually just allocating entirely to /myth.

as noted on the wiki page , I had
to add the device-mapper:
modprobe dm-mod
echo dm-mod >> /etc/modules

sudo lvcreate -L 500M -n var vg
sudo lvcreate -L 8G -n cache vg
sudo lvcreate -L 50G -n myth vg
sudo update-rc.d lvm start 26 S . stop 82 1 .

sudo mke2fs -j -m1 -L var /dev/vg/var
sudo mke2fs -j -m0 -i8000000 -L cache /dev/vg/cache
sudo mke2fs -j -m0 -i8000000 -L myth /dev/vg/myth

sudo mkdir /mnt/tmp
sudo mount /dev/vg/myth /mnt/tmp
sudo cp -a /myth/* /mnt/tmp
sudo umount /dev/vg/myth
sudo mv /myth /myth-
sudo mkdir /myth
sudo mount /dev/vg/myth /myth
sudo chmod 1777 /myth

sudo mount /dev/vg/cache /mnt/tmp
sudo cp -a /cache/* /mnt/tmp
sudo umount /dev/vg/cache
sudo mv /cache /cache-
sudo mkdir /cache
sudo mount /dev/vg/cache /cache
sudo chmod 1777 /cache

sudo mount /dev/vg/var /mnt/tmp
sudo cp -a /var/* /mnt/tmp
sudo umount /dev/vg/var
sudo mkdir /bigvar
sudo mount /dev/vg/var /bigvar

sudo mkdir /var/REMOVE
for dir in log mail opt spool ; do
  sudo mv /var/$dir /var/REMOVE && sudo ln -s /bigvar/$dir /var/$dir

[assuming there were no errors in all of the above:]
sudo rm -rf /var/REMOVE /cache- /myth-
sudo rm -rf /bigvar/{autofs,backups,cache,lib,local,lock,run,tmp,www}

added to /etc/fstab:

/dev/vg/cache   /cache  ext3    defaults,auto   0 2
/dev/vg/myth    /myth   ext3    defaults,auto   0 2
/dev/vg/var     /bigvar ext3    defaults,auto   0 2

also added a tmpfs, always good to have one of these!:

none    /tmpfs  tmpfs   defaults        0       0

: jm 62...; sudo mkdir /tmpfs
: exit=0 Sun Apr 10 15:16:16 PDT 2005; cd /usr/src/kernel-source-2.6.9-chw
: jm 63...; sudo mount !$
sudo mount /tmpfs

Memtest Boot Image

Installed memtest86+: apt-get install memtest86+

added to /etc/lilo.conf:

image  = /boot/memtest86+.bin
 label = memtest86+

sync; sudo lilo; sudo reboot

And rerun memtest overnight, this time using BIOS failsafe defaults.

2005-04-10: the same bit is bad in the overnight memtests. it's bad RAM and I'll have to RMA it (eventually).

In the meantime: box comes up, but ethernet driver doesn't start! a couple of reboots do the same, then another reboots gives a kernel panic in memory allocation for soundcard initialisation from ALSA modules. (eek!)

init 6 and set BIOS to use optimized defaults again. continue reboot, and yep, eth1 has returned; something in the BIOS optimized defaults is required for eth1 to work.

annoyance: vim isn't installed. sudo apt-get install vim

fixed /etc/lvm/lvm.conf:

    # Exclude the cdrom drive
# jm - commented
# filter = [ "r|/dev/cdrom|" ]

# jm - just hda's, thanks
    filter = [ "a|^/dev/hda|", "r/.*/" ]

annoyance: knoppix does stupid things in /etc/profile, which breaks scp if you use $PS1 being set as an indication of an interactive shell (as /bin/sh doco used to recommend). workaround below. also remove bash completion:

# [ "$PS1" -a -f /etc/bash_completion ] && . /etc/bash_completion
# PS1="\[email protected]\h:\w\\$ "

(ps: note that the bash completion line even uses the $PS1-exists trick itself in that line! hello Knoppix developers!!)


get drivers for: zd1201-0.14 zd1201-0.14-fw from that project's download page, and unpack:

cd /usr/src/
sudo mkdir jm-patches_2.6.9
sudo chown jm jm-patches_2.6.9
cd jm-patches_2.6.9

mkdir zd1201-0.14; cd zd1201-0.14; tar xvfz /home/jm/zd1201-0.14.tar.gz
cd ..
tar xvfz /home/jm/zd1201-0.14-fw.tar.gz

cd /usr/src/
sudo tar xfj kernel-source-2.6.9-chw.tar.bz2
cd kernel-source-2.6.9-chw/
sudo patch -p1< /usr/src/jm-patches_2.6.9/zd1201-0.14/

sudo make oldconfig
sudo make all modules install modules_install

        reboot, and...

cd /usr/src/jm-patches_2.6.9/zd1201-0.14
sudo make install

: exit=0 Sun Apr 10 20:31:53 PDT 2005; cd /usr/src/jm-patches_2.6.9/zd1201-0.14-fw
sudo make

sudo depmod -ae
sudo modprobe zd1201
iwconfig wlan0
sudo iwconfig wlan0 essid "MY ESSID"
sudo iwconfig wlan0 channel 1

    it works! so vi /etc/network/interfaces:

auto lo eth1 wlan0
iface wlan0 inet static
        wireless-essid MY ESSID
        wireless-channel 1
        up route add -net default gw
        down route del default gw

sudo ifup wlan0
sudo ifdown eth1
sudo vi /etc/modules

    append the line:


    hey presto, everything is going via wlan0 now! however, wlan0 doesn't come
    up at boot -- looks like it requires hotplug, and that's set to runs after
    networking. doh.  add a local boot script to work around this:

sudo vi /etc/init.d/local
ifup wlan0

sudo chmod 755 /etc/init.d/local
sudo update-rc.d local start 99 5 .

    turning off unused daemons;

sudo update-rc.d -f inetd remove
sudo update-rc.d -f portmap remove


The remote

followed . However there were no signs of life when running "irw". so: says:

sudo install-i586-l

Following that page's instructions -- there's a plethora of same-but-different remotes by Hauppauge. Genius hardware people again. Checked the sticker inside the remote's battery compartment; it's an A415-HPG.


edit that file, remove all other sections except for the A415-HPG one, installed as /etc/lircd.conf . Restarted "lircd", ran "irw", and the correct presses now show up. yay.

To get mythtv to work correctly, use bindings from here:

finally: make it run at boot.

echo lircd >> /etc/initd.local

Back to hardware

Went to Fry's and Radio Shack -- no sign of any AC-DC converters that can push out 5A. So it is;

  PW12V-5A    1   AC-DC 12 V, 5A Switching Power Adapter (110/220V)   $25.00

drat. but still, I picked up lots of components, a soldering iron, and bits and pieces anyway to make a power switch and a power LED at Fry's ;) I considered buying a Dremel cutter at Home Depot, but didn't in the end due to price ($60!)

After getting home and getting some food, I get out the soldering iron and gin up a power LED attached to a jumper; given the time since I last did this, I think I did a pretty good job! This page is a pretty good guide: (naturally I found that page afterwards of course.)

I also bought a batch of Fry's "motherboard stand-off hardware set" (threaded brass spacers with washers and nuts) and an "ATX-style push button power switch", which was nifty, as I was expecting to have to solder one of those to a jumper lead etc. These all got set up on the board.

Next task: stripping out the internals of the Sun Exabyte 8500 tape drive. The tape drive itself is easily removed as a single chunk -- unfortunately, I then have to totally disassemble it to get the front panel off. But by the end of that process (note: required a small Torx screwdriver) I have the enclosure's casing, top and bottom parts, with the two parts of the front fascia of the tape drive itself, separate.

The next thing to do is to see if the components fit... I'd measured it up against the board itself previously, and it, of course, fit just fine with plenty of room to spare.

What I hadn't considered though, was the hard disk... duh. With the EPIA board inside the case, the hard disk doesn't fit in a flat position; so it would have to be installed on its side. That would be fine, except even on its side, it doesn't fit! (The HD is 4" across, and the casing is about 3.8" internally.)

Initially, I consider cutting a hole in the bottom of the case to permit the drive to poke through. That seems pretty daunting, since I hadn't sprung for that Dremel ;) It also seems likely to be ugly and kludgy, probably involving a layer of duct tape holding the drive into the box... nasty. Leave it for the night to sleep on it.

2005-04-11: Sleeping on it certainly helped. I realised that there's no reason the drive had to be in either a strictly vertical or horizontal position -- why not put it in at an angle?

Sure enough, with the board in place in the back-left corner of the case, there is plenty of room on the right hand side for the hard drive, as long as it's on its side at an angle from the vertical. The lid of the case will close with the hard drive in place, with about 0.5" clearance between the CPU's heatsink and the bottom of the drive.

There's still a question as to whether it'll fit with the PW-200-M power supply board on the ATX power socket. Looks very likely, though.

Another possible issue will be heat dissipation, since this is quite close to the CPU. We'll just have to see how that goes; it may be necessary to get a fan in there somewhere...

But all in all, this is looking like a workable fix.

It takes a little bit of head-scratching to think of a way to stop the drive from accidentally falling onto the heatsink, or, worse, a live pin on the PW-200-M board. However, I eventually realise that two caps of a Bic ballpoint pen are just the right size to fit into a convenient hole in the case's bottom, and hold the drive in place. At least, that should work until I can think of a more reliable, permanent way to keep those separate ;)

The next trick: assembling the two parts of the front panel fascia. This is pretty easy -- when in Home Despot, I picked up a tube of silicone sealant (GE "Silicone II Househould Glue" fwiw). Silicone sealant has the great properties of (a) drying quickly, (b) being rubbery and non-brittle, so resilient to little knocks, (c) having good surface tension so it can stretch across small gaps. All in all, it's perfect for the job, and I use it to glue the two pieces of the fascia together.

First, I use a strip of sellotape to hold the "door" in correct position relative to the surrounding fascia, taping the tape across the front of the two pieces. Next, I flip it over, place it face-down on the table, and apply sealant to the top and sides, bridging the goop between the door and fascia. Leave it to dry for the night.

Finally, I remove the internal RF shielding from the bottom of the case. The entire Sun tape drive enclosure is fully RF shielded with a thin plate of steel; I want to maximise the space I have internally, and I'd prefer the nonconductive properties of the plastic instead of the grounding properties of the plate. So I rip it out of the bottom part. Unfortunately, this exposes a grid of reinforcing struts with hollow holes between them, which I don't want in one part, since I want a solid bottom for one of the mainboard's stand-offs to stand on.

So using scissors, I cut out and retain a small section of the plate. Sealant glue time again, and I glue it in place to the bottom of the case, stand a couple of heavy things on it, and leave it to dry for the night.

2005-04-12: hacksaw! cut loads of holes in the back of the case. hack hack.

2005-04-13: got small PSU from Plugged it in, everything works, totally silent.

But what's this -- the temperature is hitting 65 deg C?! 'A C3 in an EBGA package is rated up to 85 degrees, although in practice a running machine would reboot or freeze at around 70-75 degrees.'

Yikes. It gets even hotter with the case on...


CPU temp:           (with lid on)
15:21       33      start
15:49       69
15:51       70
15:55       71      starting to smell -- I panic -- end of test!

(with lid off)
16:16       47      start
16:30       64

(with no hd)
16:39       54      start
17:10       65      
17:22       65
17:43       65
seems stable with no active cooling and no case.

(with lid back on)
17:45       60      start
17:48       64
18:01       70
18:09       72
18:17       74
18:24       75
18:47       76
19:46       76
20:24       79      (post a bout of memtest86+)
20:30       77
21:09       76
(still pretty stable.  but I'd prefer cooler...)

(installed fan)
09:09       27      start
09:21       57
09:34       67
09:42       70
09:56       73
10:04       74
10:25       76
10:28       77

booted into linux to monitor idle temp using 'sensors':
10:33       77
10:37       70
10:54       63 sensors / 58 by BIOS
11:20       61.9 sensors
11:35       61.2 sensors
Idle temps now seem to be:
+63.5 C /dev/hda: WDC WD800JB-00JJA0: 44 C
+62.2 C /dev/hda: WDC WD800JB-00JJA0: 44 C
+61.9 C /dev/hda: WDC WD800JB-00JJA0: 44 C
BIOS reports 58 C for 61 C according to sensors, so we're good.

rearranged fan and rebooted:
+57.6 C /dev/hda: WDC WD800JB-00JJA0: 37 C

compiling kernel:
+85.2 C /dev/hda: WDC WD800JB-00JJA0: 46 C
+88.0 C /dev/hda: WDC WD800JB-00JJA0: 46 C (reality: 70 C according to BIOS)

note: lm_sensors reports all sorts of wrongness for the temp. 77 deg C (BIOS) = 96.1 (lm_sensors). oops. Easily fixed though with a bit of googling. 85C is acceptable top range for VIA C3 Ezra BIOS runs CPU at 100% so temperature during normal use should be lower 600MHz VIA Eden processor = Samuel 2 processor core

VIA Eden ESP datasheet notes that functional operation is guaranteed iside: Operating Junction Temp (Tj): 5-90 deg C Op Case Temp (Tc): 0-85 Tj is what's measured by the BIOS I think: 'The junction temperature of the die can be measured by using the processor s on-chip diode.'

so upshot -- we can push CPU temp as far as 90 deg C without *too many* issues...

CPU Frequency Scaling cpu freq control! 'longhaul', 'cpufreq_userspace'


# power mgmt, cpu freq scaling

sudo vi /etc/default/powernowd: }}} OPTIONS=-v

: jm 11...; sudo /etc/init.d/powernowd start
sudo update-rc.d powernowd start 99 5 . stop 02 1 .

install lm_sensors:

  modprobe i2c-core i2c-isa
  modprobe vt1211
  correct sum:
  sudo modprobe i2c-viapro ; sudo modprobe i2c-proc ;sudo modprobe i2c-core ; sudo modprobe i2c-isa ; sudo modprobe vt1211

installed hddtemp, and:

sudo crontab -e
*/5 * * * * logger "`sensors | perl -ne '/Proc/ and s/\(.*$// and print'`"

out of disk space! wtf? ah, it's /usr/src. create a new /home volume for that and the home dirs...

sudo lvcreate -L 1G -n home vg
sudo mke2fs -j -m1 -L home /dev/vg/home
sudo mkdir /
sudo mount /dev/vg/home /
sudo cp -a /home/* /
sudo cp -a /usr/src /
sudo mv /usr/src{,-}
sudo ln -s / /usr/src
sudo umount /dev/vg/home
sudo mv /home /home-
sudo mkdir /home
sudo mount /dev/vg/home /home

[if it looks good:]
sudo rm -rf /home- /usr/src-

add to /etc/fstab:
/dev/vg/home   /home  ext3    defaults,auto   0 2

SMART daemon

sudo vi /etc/smartd.conf
# jm:off
/dev/hda -a -o on -S on -s S/../.././04

sudo update-rc.d smartmontools start 99 5 . stop 02 1 .


['M' to unmute the appropriate channels]
[set Master, PCM and Line to 85% ish]
mplayer -fs ~/test.mp3
sudo alsactl store

hookups to TV also work -- direct from soundcard at least.

Getting TV-in, TV-out working

sudo modprobe ivtv-fb
fb0: iTVC15 TV out frame buffer device

: jm 37...; sudo modprobe saa7127 enable_output=1 output_select=0 test_image=1
: jm 40...; ivtvctl -u 0x3000 -p 6

sudo modprobe ivtv
sudo modprobe ivtv-fb

        added those to /etc/modules

ivtv: Initialized WinTV PVR 350, card #0
ivtv-osd: fb1: iTVC15 TV out frame buffer device

sudo rmmod saa7127; sudo modprobe saa7127 test_image=1

NOTE: "output_select" and "enable_output" are NOT supported on this
driver on KnoppMyth, despite ALL the howtos suggesting them.  bizarro.
if they're used, you get noise and an error in dmesg!

sudo rmmod saa7127; sudo modprobe saa7127

    got ivtvdrv.o from
    and installed
    edit XF86Config-4 to use:

Driver      "ivtvdev"
Option      "fbdev" "/dev/fb1"
BusID "00:0x14.0"

        I had the lime-green effect, too.  fix:

: jm 19...; sudo ivtvctl -j reg=0x6c,val=0xfa -d /dev/video16
: jm 20...; sudo ivtvctl -j reg=0x2d,val=0x38 -d /dev/video16

TV Recording

from --

   ivtvctl -u 0x3000
   ivtvctl -p 4
   ivtvctl -f width=720,height=480
   ivtvctl -v input=3,output=1
   cat /dev/video0 > test.mpg

works -- I get an MPEG full of static!

according to I need to fix my "tuner" line due to:

Apr 14 21:52:46 potato kernel: tveeprom: tuner = LG TAPE H001F MK3 (idx = 68, type = 47)

Apr 14 21:52:46 potato kernel: tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)

change to:

options tuner type=47

sudo su - mythtv
export DISPLAY=:0
killall mythfrontend
mythtv-setup -f ntsc-cable-hrc -d /dev/video -c "9"
   ivtvctl -p 4
   dd if=/dev/video0 bs=64k count=29 of=test.mpg ; mplayer -fs test.mpg

: jm 4...; sudo /etc/cron.daily/mythtv-backend

Sound in TV

[got ivtv-0.2.0-rc3i from ivtv site and unpacked]

cd /home/jm/ftp/ivtv-0.2.0-rc3i/driver
find /lib/modules -name 'msp3400*' -print
[remove BOTH found files]
: jm 113...; sudo cp msp3400.ko /lib/modules/2.6.9-chw-4/extra/msp3400.ko
: jm 120...; sudo depmod -ae
sudo reboot

[next, go into mythtv setup screen and set volume to control Master, instead of PCM.]

The remote revisited

Some mods necessary to get the lircd config files matching up... ~mythtv/.mythtv/lircrc

: jm 35...; mysqlcheck -Ap --auto-repair --user=root [no password] using irexec to restart mythfrontend

Getting plain AVI video out working

First, get the video browsing working, and make the dir writable so files can be uploaded:

sudo mkdir ~mythtv/.mythtv/MythVideo
sudo chmod 777 ~mythtv/.mythtv/MythVideo

After investigating all the following options and rebuilding MPlayer with the ivtvosd patch:

configure --prefix=/usr/local/ivtvmplayer \
    --disable-dvdread --disable-cdparanoia --disable-unrarlib 

/usr/local/ivtvmplayer/bin/mplayer -ao oss:/dev/dsp -cache 8192 -fs -zoom -quiet -framedrop -vo ivtv  /myth/video/test.avi

it finally turns out that it's pretty much impossible :( Basically the PVR-350 cannot do normal bitmap display fast enough. argh. so:

Displaying video on alternate TV-Out

Alternative option: set up a second TV Out from the onboard tv-out S-Video connector!

sudo xauth -f /var/lib/gdm/:1.auth add :1 . ABABAB
sudo X -auth /var/lib/gdm/:1.auth -bs -noreset -nolisten tcp -xf86config /etc/X11/XF86Config-4.via :1 
export XAUTHORITY=/var/lib/gdm/:1.auth
xsetbg -fullscreen -display :1 /usr/share/mythtv/themes/blue/background.png
xauth extract - :1 > /tmp/:1.auth
su mythtv -c "xauth merge /tmp/:1.auth" < /tmp/:1.auth

mplayer -ao oss:/dev/dsp -cache 8192 -fs -zoom -quiet -vo xv -display :1 /myth/video/Look\ Around\ You\ -\ S2E2\ -\ Health.avi

Works great! TODO: document what I've done here more fully.

Restarting with Blue button

TODO: document this here. It was pretty easy ;) a little config file for "irexec" that runs a script when one of the buttons is pushed. I now have it running two scripts depending on which button is pressed, one to restart just the front end, one to restart both frontend and backend.

sudo irexec /usr/local/etc/irexec.restarter

Streaming Audio (BBC radio etc)

cd /home/jm/ftp/MPlayer-1.0pre5-ivtv-osd-4
./configure  --disable-dvdread --disable-cdparanoia --disable-inet6 \
--disable-ftp --enable-debug --with-codecsdir=/usr/local/lib/codecs \
--with-reallibdir=/usr/local/lib/codecs --with-win32libdir=/usr/local/lib/codecs \
--with-livelibdir=/usr/local/lib/codecs --enable-xv 

export DISTCC_HOSTS="jalapeno radish"
sudo /etc/init.d/distcc start
    [on all hosts]

make -j 4 CC=distcc CXX=distcc

make -n install

sudo tar cvfz ~/ftp/mplayerbackup.tgz \
  /usr/local/{share,etc,lib}/mplayer \
  /usr/local/man/man1/{mencoder,mplayer}.1 \
  /usr/local/bin/{mencoder,mplayer} \

sudo make install

sudo ldconfig

/usr/local/bin/mplayer -v 3 'rtsp://*/ev7/live24/radio4/live/r4_dsat_g2.ra'

sudo chmod 664 /dev/rtc
        [mplayer complains about it, so why not]

applied changes to /usr/share/mythtv XML config files (cool!) from

NFS access to the myth machine

: jm 13...; sudo chmod 777 video music gallery games

sudo /etc/init.d/portmap start
sudo /etc/init.d/nfs-common start
sudo mkdir /myth
sudo mount potato:/myth /myth

[unreliable -- crashes the wifi.  NFS is not a workable option.
let's try samba instead...]

: jm 5...; sudo /etc/init.d/samba start
: jm 6...; sudo smbpasswd -a mythtv
[set password]
[can now access it through nautilus!  konqueror doesn't work though
for some reason, but no big deal.]

For sftp access -- added a user using "adduser":
public:x:1001:1001:Public File Transfer:/myth:/bin/bash

Remote access to mythfrontend

: jm 1...; sudo apt-get install x11vnc
sudo vi /etc/gdm/PreSession/Default
/usr/bin/x11vnc -nap -wait 50 -passwd [PASSWORD] -display :0 -forever -o /tmpfs/x11vnc.log -bg &

also: exactly as described!

Spinning down the disk when idle

specs on the disk: Model=WDC WD800JB-00JJA0, FwRev=05.01C05, SerialNo=WD-WCAM94212346

Performance Specifications
Average Seek - Read 8.9 ms average
        - Write         10.9 ms average
Track-to-Track Seek     2.0 ms average
Full Stroke Seek        21 ms average
Index Pulse Period      8.3 ms (nominal)
Average Latency         4.2 ms (nominal)
Rotational Speed        7200 RPM (nominal)
Buffer Size     8 MB
Spindle Start Time
- From Power-on to Drive Ready 1        = 8.0 s average 
- From Power-on to Rotational Speed 2   = 6.0 s average 
Spindle Stop Time       5.1 s average
Contact Start/Stop Cycles (CSS)         50,000 minimum

Power Management Commands
Operating Mode  RMS Current 1   Power, Typical 1
                12 VDC  5 VDC    
Idle (E1H)      330 mA  675 mA  7.25 W
Standby (E0H)   20 mA   200 mA  1.2 W
Sleep (E6H)     20 mA   50 mA   0.5 W

Operating Temperature and Humidity
  Temperature 2         5°C to 55°C (41°F to 131°F) 
  Humidity              5-85% RH non-condensing
                        33°C (maximum wet bulb)
  Thermal Gradient      20°C/hour (maximum)
  Humidity Gradient     20%/hour (maximum)

sudo vi /etc/syslog.conf
# jm: warnings or higher, log with a sync
*.warn                          /var/log/warn.log
auth,authpriv.*                 -/var/log/auth.log
uucp.*                          -/var/log/uucp.log
mail.err                        -/var/log/mail.err
news.crit                       -/var/log/news/news.crit
news.err                        -/var/log/news/news.err

sudo vi /etc/init.d/sysklogd
SYSLOGD="-m 0"

: jm 67...; sudo /etc/init.d/sysklogd restart

        hddtemp: setting RUN_DAEMON to false doesn't work.  have to
        hack the script

sudo vi /etc/init.d/hddtemp
        [at start:]

exit    #jm

spin down after 10 minutes of idleness:
sudo hdparm -S 120 /dev/hda

: root 127...; sudo vi /etc/mysql/my.cnf
comment "log=" line
: root 128...; sudo /etc/init.d/mysql restart

thinking about this. with 50000 spindown/spinup cycles specced for, let's say with spinup/down 4 times an hour:

        4*24*30 = 2880 cycles per month
        50000/2880 = 17.36 months before failure

that's not so good! maybe not a good idea then. I'm going to leave it out.


 Timing buffered disk reads:   56 MB in  3.04 seconds =  18.42 MB/sec
 Timing buffered disk reads:   60 MB in  3.02 seconds =  19.84 MB/sec
 Timing buffered disk reads:   56 MB in  3.03 seconds =  18.50 MB/sec
 Timing buffered disk reads:   56 MB in  3.04 seconds =  18.42 MB/sec

 multcount    = 16 (on)
 IO_support   =  1 (32-bit)
 unmaskirq    =  1 (on)
 using_dma    =  1 (on)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 readahead    = 6344 (on)
 geometry     = 65535/16/63, sectors = 80026361856, start = 0

pretty much optimal out-of-the-box!

Odd interrupts

: jm 6...; cat /proc/interrupts

  0:     415010          XT-PIC  timer
  2:          0          XT-PIC  cascade
  8:          1          XT-PIC  rtc
  9:          0          XT-PIC  acpi
 10:          0          XT-PIC  uhci_hcd, VIA8233
 11:      59204          XT-PIC  ohci1394, uhci_hcd, ivtv0
 12:          2          XT-PIC  ehci_hcd
 14:      10921          XT-PIC  ide0
 15:       5216          XT-PIC  uhci_hcd
NMI:          0
LOC:          0
ERR:        785             <<<NOTE!
MIS:          0

what are the ERRs? found in dmesg: spurious 8259A interrupt: IRQ7. notes it's harmless. suggests rebuilding the kernel without CONFIG_LOCAL_APIC, which I may do if I'm rebuilding anyway (TODO).

however, I don't like having 3 busy devices on one interrupt. TODO: BIOS tweak for ivtv PCI card irq?

added to /etc/lilo.conf:

# new
        append="noapm noacpi noapic nolapic pci=biosirq"

# original default
#       restricted
#       alias=1

Didn't make any difference though ;)

further tweaks -- remove unused drivers and modules:

sudo rmmod eth1394
sudo rmmod ohci1394
sudo rmmod sbp2
sudo rmmod ieee1394
sudo rmmod shpchp pciehp pci_hotplug
sudo rmmod sg
sudo rmmod parport_pc
sudo rmmod parport
sudo rmmod 8250
sudo rmmod serial_core
sudo rmmod ds
sudo rmmod yenta_socket
sudo rmmod pcmcia_core
sudo rmmod usb_storage
sudo rmmod ohci_hcd
sudo rmmod megaraid
sudo rmmod tmscsim
sudo rmmod aic7xxx
sudo rmmod a100u2w
sudo rmmod ide_cd

wow, Knoppix really loads a pile of crap ;) added to /etc/hotplug/blacklist:

# Apr 18 2005 jm

lines removed from /etc/modules:


[so that's where they're all coming from!!]

For now it seems like the BIOS is the only way to reselect different IRQs for the PVR-350 PCI card, and it doesn't offer that option. So this task is on the back burner.

Channel Icons

: jm 89...; mkx
: jm 90...; ./
[answered prompts]
: jm 92...; sudo su mythtv -c "mythfilldatabase --import-icon-map iconmap.xml --update-icon-map"

Time Sync

sudo ntpdate

[and added to cron at 3.55 AM every day. I don't want a full-blown ntpd running on this triggering disk and CPU activity.]