KnoppMyth R4V5 install

Date: November 25 2004

These are my trials and tribulations of the KnoppMyth install.

My Hardware:
Network card: Wireless Abocom or Admtek  ADM8211 - cheapo wireless card I found on eBay
TV Tuner card: Hauppauge WinTV PVR-250 MCE (NTSC/NTSC-J 32552 REV B123) This is an OEM type card that I bought on eBay. It has an FM tuner and was recommended for a home theater setup. Since it is missing the encoder chip, it may not be that great.

My only beef about Linux is that you can't just double-click the Setup.exe and get the software to install.  Instead, you have to spend hours digging through log files looking at error messages, looking them up on Google, recompiling programs, and downloading packges just to get a piece of software running.  I guess it is an operating system for people who enjoy problem solving more than just having something work. Kind of like building your own model airplane instead of buying one off the shelf that just works.

Problem 1: Copy errors

First, the CD was running into errors copying the files during the automated install.  I burned the ISO image on the drive that I am trying to install from, so it is weird that it is getting errors.  By moving the CD from the CD-R drive to the DVD drive, I was able to get it to install without the copy errors.

Problem 2: Blinking light problem

Second, I had the keyboard blinking light problem.  Had to keep hitting shift during install so the screen wouldn't blank and lock up the install. 

Problem 3: Can't boot from hard drive

Once it installed, lilo wouldn't boot.  I booted off the CD and ran the following commands:
su - root
mount -o rw /dev/hda1 /mnt/hda1
chroot /mnt/hda1
mount -t proc /proc proc

The network card was not detected, so I couldn't run the apt-get. Since I am running version R4V5, I don't think I needed to update the lilo.
cd /etc
cp -p lilo.conf lilo.conf.bak
vi /etc/lilo.conf

Comment out the following line:
part: /dev/hdd1, typ: 7

lilo -v
umount /proc

Make sure to remove the KnoppMyth CD, and you should be able to boot off the hard drive.

Problem 4: Can't boot system

Rebooted, but the system hung on boot when detecting the USB devices usb_uhci.c.  Had to unplug the ATI Remote Wonder USB device.
Made it past the USB hang, but hung again on the msp3410: daemon started command.
Had to unplug my WinTV NTSC/NTSC-J 32552 REV B123 card per this thread.

Problem 5: Network card not recognized

At this point, I got the MythTV program to start up, but the PVR card and Network card don't work, so I need to get them running first.

So I have a wireless ADM8211 network card that is not working.  I searched for a driver, then finally found one at here.

I downloaded the latest version of the driver, which was adm8211-20041121.tar.bz2.  Reading the INSTALL file, I found out that it doesn't support the 2.4 Linux kernel.  KnoppMyth R4V5 uses the version 2.4 Linux kernel.  The final version of the driver that will support the 2.4 kernel is adm8211-20041111.tar.bz2

Since there is no network to transfer the file, I had to copy it to a DOS formatted floppy, then mount under Linux to copy to the hard drive.
mkdir /mnt/flop
mount /dev/fd0 /mnt/flop
ls /mnt/flop
cp /mnt/flop/adm8211-20041111.tar.bz2 .
umount /mnt/flop

tar jxvf adm8211-20041111.tar.bz2

Extract Linux sources
cd /usr/src
tar jxf linux-2.4.25-chw.tar.bz2
rm linux
ln -s linux-2.4.25-chw linux
cd linux
make oldconfig dep
mv ~/adm8211 /usr/src/linux/drivers/net/wireless
cd drivers/net/wireless/adm8211/
make install
modprobe adm8211
cd /etc/network/
cp -p interfaces interfaces.bak
vi interfaces

Add the following lines to the end of the interfaces file:
iface eth0 inet dhcp

or to set a static address:

iface eth0 inet static
wireless_essid my_essid
wireless_key my_wireless_key
wireless_channel 7

change the auto line to automatically start the eth0 interface:
auto lo eth0

ifup eth0

ping to see if ethernet card works.

Need to get wireless card to start on boot, as well as set the network to a static IP.
cd /etc
cp -p modules modules.bak

vi modules

Add adm8211 to the end of that file

Problem 6: PVR card not working

cd /etc/mythtv/modules
cp -p ivtv ivtv.bak
vi ivtv
alias char-major-81 videodev
alias char-major-81-0 ivtv
options ivtv debug=1 cardtype=2 mpg_buffers=100
options tuner type=2 # NTSC tuner
options msp3400 once=1 simple=1
add below ivtv msp3400 sa7115 tuner

mount floppy
tar zxvf /mnt/flop/CVS-LATEST.tar.gz

IVTV Current version: ivtv-0.1.10-pre2-ck105i.tgz

Downloaded latest CVS of ivtv and installed. It contained the patch to get my WinTV PVR-250MCE card working.
cd ivtv

cd driver

Some warnings show up, but they don't seem to be a problem.
make install

Problem 7: No video when choosing Watch TV

mythtv > mythtv.log 2>&1

Get error message "Couldn't find Xv support, falling back to non-Xv mode"
pthread_setschedparam: Operation not permitted

X-Video Extension version 2.2
screen #0
no adaptors present

vi /var/log/XFree86.0.log

My video card is an ATI Radeon 9500 Pro
Detected as ATI Technologies Inc Radeon R300 AD [Radeon 9500 Pro] Rev 0
ATI Technologies Inc unknown chipset (0x4164) rev 0

KnoppMyth is running XFree86 Version 4.3.0 (Debian 4.3.0-0ds4 20030416150820)

Install the ATI driver per the instructions on this page. These are slightly better than the instructions listed on the ATI site.

Download the ATI Linux driver for the Radeon 9500 Pro running under XFree86 Version 4.3.0

Need to install the alien package to convert the rpm file to a .deb.
apt-get update
apt-get install alien

Convert .rpm to .deb
alien fglrx-glc22-4.3.0-3.2.0.i586.rpm

Install the .deb package
dpkg-i fglrx-glc22-4.3.0-3.2.0.i586.deb

Got error message "trying to overwrite `/usr/X11R6/lib/', which is also in package xlibmesa4-gl
This didn't work, so I had to issue the following command:
dpkg-i --force all fglrx-glc22-4.3.0-3.2.0.i586.deb

Check to see that the module installed.
lsmod | grep fglrx

The module is not there, so you have to make sure it is there before you continue.

I had to manually install the module via these instructions:

cd /lib/modules/fglrx/build_mod
cd ..

Make sure that fglrx module loaded.

lsmod|grep fglrx


Mount POSIX shared memory in fstab. The ATI driver will not work unless this is done. You will get an error about the ?GL

cd /etc
cp -p fstab fstab.bak
vi fstab

Add following line to /etc/fstab:

tmpfs /dev/shm tmpfs defaults 0 0
mount /dev/shm
mount | grep shm

Back up the /etc/X11/XF86Config-4

cd /etc/X11
cp -p XF86Config-4 XF86Config-4.bak

Run the script to configure the monitor.


Enable Quad Buffer Stereo? n
Enable TV out? Y
TV type? 1. NTSC-M
FireGL Screen layout? 3. Clone Mode (2 screens - same content)
Select Primary and Secondary display devices? 1. (p) auto detect - (s) auto detect
Monitor horizontal refresh? 7. 31.5 - 91.1; up to 1280x1024 @ 85 Hz - Actually, I selected 4, which goes up to 75 Hz for now. The monitor was looking weird with the really high refresh rate.
Monitor vertical refresh? 5. 60-100
Second monitor horizontal refresh? 1. 31.5 VGA Since this is a TV out, it will be less than VGA
Second monitor vertical refresh? 2. 50-70 (VGA)
Modes for the first monitor? 321 (corresponds to 3 - "1024x768", 2 - "800x600", 1 - "640x480" in that order)
DRI restrictions? 1 - no restrictions
Application profile? 1. default
Advanced Graphics Features Settings: initialize xfree86-dga? y - I will try this option. Not sure what it does.
export pseudo color visuals? n
syncronize buffer swaps with the vertical sync signal? n
Full Scene Anti Aliasing (FSAA)? 1. All (Visuals for 2,4, and 6 samples per pixel)
Force multi sample visuals for every OpenGL application? n
Disable FSAA Gamma? n
Customize FSAA Multi Sample Position? n
use external AGP GART module? n
Enable "AGP Locked User Pages"? y
Which storage method do you want to use? 0 - default (FireGL workstation boards: fast)

Make sure you backed up the /etc/X11/XF86Config-4

Shall I write it to '/etc/X11/XF86Config-4'? y

Cross your fingers and press CTRL + ALT + Backspace and XFree86 will restart hopefully with the new ATI driver. If it doesn't you will have to troubleshoot from a shell account.

Run glxgears to see that it is working.


Running this before the ATI driver was installed gave me this error:
Xlib: extension "XFree86-DRI" missing on display ":0.0"
The gears showed up with ~250 FPS. After the ATI driver install, I was getting between 1200 and 1500 FPS. Nice performance increase.

Run fgl_glxgears to see if that works.
Before the ATI driver install, this didn't work. I got the same error as above, plus "Error: couldn't get fbconfig". Afterwards, it shows a 3D rotating box with gears quickly rotating on the surfaces. It was performing at ~248 FPS. Nice!

xvinfo will now display pages of information.

glxinfo | grep rendering should output this:

direct rendering: Yes

Get information on OpenGL rendering


Problem 8: QT directory not found

vi /var/log/mythtv/mythbackend.log

Shows error message: Qsettings: error creating /.qt
Fix by running the following commands

mkdir /.qt
chown mythtv:mythtv /.qt

Problem 9: Not connecting to database

Getting errors:

Unable to connect to database!
Driver error was [1/-1]:
QMYSQL3: Unable to connect
Database error was:
Unknown database 'mythconverg'

Rebuild the MythTV MYSQL database
cd /usr/local/bin/
sh MythTV-sql


MythTV Setup

clear ? yes
clear ? yes

All other values are default unless specified.

1. General
    IP address:
    Master Server IP address:

2. Capture Cards
    Card Type: MPEG-2 Encoder Card (PVR-250, PVR-350)
Default Input: Tuner 0

3.  New Video Source
Video Source name: Zap2It
XMLTV listings grabber: North America (DataDirect)
User ID: (my Zap2it user id)
Password: (my Zap2it password)
Click "Retrieve Lineups)
It fills in the Data Direct Lineup automatically.

4. Input connections
[ MPEG : /dev/video ] (Tuner 0) -> (Zap2it) This is the Video Source that you set up in the last step.

Run mythfilldatabase from the command prompt to populate the database. You are downloading several days worth of TV guide data, so expect it to be slow. This is slow and may take 10 minutes or more.

Problem 10: Video and sound is all choppy jumpy jittery

Ran mythtv from command line. Was getting message"prebuffering pause". The video is jerky and the audio sounds like it is in fast forward. It jumps around and just sounds like it is skipping.

I checked top, and the CPU utilization is only around 15%, so that isn't the problem.

Utilities/Setup > Setup > TV Settings > Recording Profiles
MPEG-2 Encoders (PVR-250, PVR-350) > Default
Width: 720 (default is 480)
Height: 480
Bitrate: 5600 (default is 4500)

This fixed the video, but the sound is still jerky.

Another recommendation was to make sure the DMA (Direct Memory Access) is turned on for the hard drive

Audio Quality
Type: Layer II
Bitrate: 128 (default is 384)

That fixed the sound and video from lagging and being all choppy.

Problem 11: Frame rate is slow and the pictures are not smooth.
Try some filters. Turned on kerneld

The video works, but when I plug in my Windows hard drive and run WinTV2000, SageTV demo, GB-PRV, or GotAllMedia, the video is significantly better. I have been a big fan of Linux, but the quality level is just not there to make the machine into a PVR. If you find a way to get decent quality using MythTV, drop me an email. Now I just need to find a decent Windows PVR program.


Problem 8: Weather not working

Useful commands:

Run KnoppMyth-frontend
KnoppMyth-install (install the program on the hard drive
KnoppMyth-frontend (database setup)
KnoppMyth-main (main menu for setup program)


Useful links:
Keyboard Commands for MythTV


Set up Samba to share files with other Windows PCs