Personal Guide to KnoppMyth
Written by Administrator   
Monday, 16 October 2006

Well, it had been a long time in the making, but my MythTV box (based on the Knoppmyth distro) has finally been tweaked to my satisfaction. The project originally began as an initiative to create a Digital Jukebox in place of the 5-Disc CD changer I had previously utilized, but it quickly turned into a more robust, versatile system that I now use for all of my home-media needs.

All configuration(s) involved are included in the document. I can't say I know too many friends who will utilize this, but maybe it will assist some poor soul at his last nerve when a search engine crawls the site. I probably won't be able to answer too many inquiries regarding MythTV configurations (with KnoppMyth), but I might reply and post to a select few if I deem them noteworthy. Thanks to all the KnoppMyth Wiki posts for their assistance! Please note that this guide was not written entirely by me. As a matter of fact, most code snippets were pulled from the KnoppMyth Wiki

You might want to download the Microsoft Document version of the KnoppMyth Setup Guide instead. 

Personal Log of KnoppMyth Installation & Configuration

 

Date: 07-05-2006

 

Hardware:

 

  • MSI Low-end MicroATX Motherboard
  • NVidia FX5200 Video Card with TV-Out
  • Hauppage WinTV TV-Tuner Card (401)
  • Generic 10/100 NIC Card
  • Athenatech Low-end MicroATX Case

 

Software           [POST-INSTALLATION]

 

  • (Free)NX-Server for Linux (Most Recent)
  • NX-Client for Linux
  • NX-Node for Linux
  • Webmin Administration
    • First, change the webmin password:

      su
      /usr/share/webmin/changepass.pl /etc/webmin root your_desired_password

      Then edit the miniserv.conf file to allow access to webmin:

      nano /etc/webmin/miniserv.conf

 

 

KnoppMyth Plug-ins & Add-ons:

 

  • MythStream (Shell Script)


Exit out of the mythtv front-end. Open a terminal window or login via SSH.

 

su (change to root) cd /usr/local/bin

 

{Added 5/13/2006 - files on mplayerhq.hu have changed}

 

nano mythstream-install.sh

 

Change the line:

 

export MPLAYER_CODECS_VERSION?=20050412

to:

export MPLAYER_CODECS_VERSION?=20060501

 

(because the old codecs are no longer on mplayerhq.hu -also delete the ? that is being added by the wiki, it doesn't belong there)

 

Change the line:

 

ftp://ftp5.mplayerhq.hu/mplayer/releases/MPlayer-$MPLAYER_VERSION.tar.bz2

to:

http://www.mplayerhq.hu/MPlayer/releases/MPlayer-$MPLAYER_VERSION.tar.bz2

 

~~~Edit by kwbolte:

Because of MPlayer server problems I had to use this mirror:

 

ftp://ftp.fu-berlin.de/unix/X11/multimedia/MPlayer/releases/MPlayer-$MPLAYER_VERSION.tar.bz2

 

Also I had to change

 

http://www.mplayerhq.hu/MPlayer/releases/codecs/all-$MPLAYER_CODECS_VERSION.tar.bz2

to:

ftp://ftp.fu-berlin.de/unix/X11/multimedia/MPlayer/releases/codecs/all-$MPLAYER_CODECS_VERSION.tar.bz2

 

~~~

 

Hit CTRL-O and hit enter to save, CTRL-X to exit then type:

 

mythstream-install.sh

 

    • Added BeatBlender PLS
    • Added GrooveSalad PLS
    • Added SpaceDrone PLS
    • Added XTC.Radio.London PLS
    • Added Swiss BigBeat PLS

 

 

  • Channel Icon Grabber (Python Script)
    • mkiconmap.pl
    • Problems with original script; See notes below:

 

mkiconmap.pl REVISION Notes

 

For those who have installed mythtv from packages, you'll need to do a few things first.  Before you can do anything with this, perl will need some modules to get this compiled correctly (XML::Writer and XML::Twig, if you don't already have them installed). For those who would like to use Perl's CPAN, run this:

 

# perl -MCPAN -eshell

 

(go through the questions if it's the first time you are running this.  If you're not sure what answers to provide, go with the defaults) Once you get through all the questions, you should see a cpan> prompt.  Next,

 

cpan> install XML::Writer

cpan> install XML::Twig

cpan> quit

 

Now go ahead and untar/uncompress the file downloaded above and run:

 

perl Makefile.PL

make

make test

make install

 

Now you can run the mkiconmap.pl script and then import it into the database. (sample below)

 

$ mkiconmap.pl --grab --share=/tmp --out=iconmap.xml

$ mythfilldatabase --import-icon-map iconmap.xml --update-icon-map

 

ALSO NOTE: You should install XMLTV for everything to work: http://xmltv.org/

 

 

  • Audio Problems or Issues

 

VIA 8237 Sound Problem in Linux

Submitted by mhulboj on Sat, 2006-02-04 11:42. Technical

 

I had problems with sound under Kubuntu Breezy Badger (5.10) running originally packaged kernel (2.6.12-10) and ALSA (1.0.9b-4). The computer is equipped with an MSI motherboard (KM4M-V or something really similar). Sound is provided by an integrated VT8237 chipset and the responsible module is called via82xx.

 

So what was the problem and what steps were necessary to get rid of it? The initial problem was that trying to play any sound yielded no result. For most of the next steps I have been using following command to test whether the sound is somehow working:

 

cat /dev/urandom > /dev/dsp

 

First thing was to check if sound is working at all on this machine. It was tested under Windows XP and indeed it is possible to get the sound working (without problems).

 

Next I had checked whether the channels are not muted. By default all ALSA channels come muted - and sometimes it may cause some confusion. Yet it turned out that all the needed channels were unmuted (use alsamixer for this).

 

After that I had looked at the dmesg output to see if there were any strange messages related to via82xx. I found something:

 

[4294696.737000]           via82xx: Assuming DXS channels with 48k fixed sample rate.

[4294696.737000]          Please try dxs_support=5 option

[4294696.737000]          and report if it works on your machine.

[4294696.737000]          For more details, read ALSA-Configuration.txt.

 

I have checked that there are few possible options for dxs_support variable. I have tried them out and seen no change. In the end I have left following option:

 

options snd_via82xx dxs_support=4

 

I have looked at various results returned by Google, but haven't found anything particularly interesting (a lot of various problems but none seem to be related with mine). I still didn't have enough information to utilise Google knowledge properly.

 

I have played a bit with alsactl tool and finally discovered something strange. I have issued following commands:

 

root@jc:/home/mhulboj# alsactl power 0 off

Power state for card #0 is D3hot

root@jc:/home/mhulboj# alsactl power 0 on

Power state for card #0 is D0

root@jc:/home/mhulboj# cat /dev/urandom > /dev/dsp

 

And after that I was able to hear the noise for about five seconds. After that time everything was dead as previously. If I issued above commands again - it would again work for few seconds.

 

This last discovery was very interesting and when compared against Google search results it turned out that few people had similar problem. After some more searching I have found a solution - one needs a custom .asoundrc (or global /etc/asound.conf) file. The contents of the file should be (works for me):

 

pcm.dmixer {

    type dmix

        ipc_key 1024

    slave {

            pcm "hw:0,0"

            period_time 0

            period_size 1024

            buffer_size 8192

       rate 44100

           }

 

       bindings {

               0 0

               1 1

           }

   }

 

   pcm.dsp0 {

       type plug

           slave.pcm "dmixer"

   }

 

   pcm.!default {

           type plug

           slave.pcm "dmixer"

   }

 

   pcm.default {

      type plug

         slave.pcm "dmixer"

   }

 

 ctl.mixer0 {

     type hw

         card 0

   }

 

FOR NORMAL PCI soundcards, run the "alasconf" script!

$ amixer set Master,0 100%,100% unmute

$ amixer set PCM,0 100%,100% unmute

$ amixer set Line,0 75%,75% mute captur

$ amixer set Capture,0 100%,100% captur

$ su

# alsactl store

# exit

 

To access the mixer control panel (graphical mode) use “alsamixer”. Make sure to run “alsactl store” following any changes.

 

  • Setting up LIRC

 

In current versions of KnoppMyth this should be done correctly by the /usr/local/bin/lirc-reconfig.sh script. Hauppauge remotes are type 16. To clarify the "which remote is which" question:

 

    * "Cigar shaped" with ~34 buttons is what is known as the GREY remote (subtype b).

    * "Dog bone shaped" with many more buttons is what is known as the SILVER remote (subtype c).

 

<!--[if !supportLists]-->·          <!--[endif]-->Use “irw” command to detect received signals from the remote.

  • Use “irrecord myremote.conf” to generate a custom configuration file (if it works!).

 

  • Configuring NVIDIA Graphics Adapter/Card
    • To remove the blue bordering lines, change the color of them to black:

 

In a terminal window CODE:

su -

<root password>

apt-get update

apt-get install xvattr

 

Next, logout, then login as the "mythtv" user.

 

Then you want to open an editor like nano and add the following line to ~/.fluxbox/apps. Add this line before the line that contains KnoppMyth-Run CODE:

[startup] {xvattr -a XV_COLORKEY -v 0}

 

Save that file and then to make it take effect:

/etc/init.d/gdm restart

 

To test it without making the permanent change described above, open terminal and type in:

xvattr -a XV_COLORKEY -v 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


    • To correct any over-scan or color correction issues, do the following:
      • Make sure you’ve run “apt-get nvtv.”
        • Start watching LiveTV
        • <ctl><alt>-F1 to a console, log in as mythtv
        • nvidia-settings --display=:0
        • <alt>-F7 to go back to LiveTV
      • Another, VNC/NX option is the fillowing:
        • Start watching LiveTV on the myth box
        • From an xterm in the remote window on the second computer, execute "nvidia-settings --ctrl-display=:0"

Setting up and configuring Samba in Linux

 

  • Samba is installed by default, so first start up the daemon using /etc/init.d/samba start, then make sure to add it to the startup list so it will initialize automatically:
    • update-rc.d samba defaults
  • To share music or other files from a Windows machine, do the following:
    • su
    • apt-get update
    • apt-get install smbclient
    • apt-get install smbfs
    • smbmount //10.0.0.100/Downloads /myth/music/protoss
  • If you would like to always mount a Windows shared directory on startup of your MythTV box, you will need to add a line to /etc/fstab as follows:
    • su
      nano /etc/fstab
      Add as the final line:

      //windows-server-name/shared-folder-name /linux/mount/point smbfs
      username=xp_username,password=xp_password 0 0
      <!--[if !supportLineBreakNewLine]-->
      <!--[endif]-->
  • Then save and exit your text editor.You can also avoid entering your password in the fstab file by pointing to a 'credentials' file. See instructions on how to do this at the following page:

    http://www.justlinux.com/nhf/Filesystems/Mounting_smbfs_Shares_Permanently.html

 

XF86Config File for NviDia FX5200 (with/for TV-output)

This /etc/X11/XF86Config-4 works for me, doing TV output with an FX5200 based video card...

Section "ServerLayout"
        Identifier     "XFree86 Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "PS/2 Mouse" "CorePointer"
EndSection
 
Section "ServerFlags"
        Option "AllowMouseOpenFail"  "true"
        Option  "NoPM"  "true"
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/Type1"
EndSection
 
Section "Module"
#       Load  "ddc"  # ddc probing of monitor
#       Load  "GLcore"
        Load  "dbe"
        Load  "v4l"
        Load  "extmod"
        Load  "glx"
        Load  "bitmap" # bitmap-fonts
        Load  "speedo"
        Load  "type1"
        Load  "freetype"
        Load  "record"
EndSection
 
Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option      "CoreKeyboard"
        Option "XkbRules" "xfree86"
        Option "XkbModel" "pc105"
        Option "XkbLayout" "us"
EndSection
 
Section "InputDevice"
        Identifier  "PS/2 Mouse"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "ZAxisMapping" "4 5"
        Option      "Device" "/dev/psaux"
        Option      "Emulate3Buttons" "true"
        Option      "Emulate3Timeout" "70"
        Option      "SendCoreEvents"  "true"
EndSection
 
# Auto-generated by KNOPPIX mkxf86config
 
Section "Monitor"
        Identifier   "Monitor0"
        VendorName      "Panasonic"
        ModelName       "CT-27SF22T1"
        HorizSync 30 - 50
        VertRefresh 60 - 60
        DisplaySize 271 204  #  75 DPI @ 800x600
        #DisplaySize 204 153 # 100 DPI @ 800x600
        #DisplaySize 535 415 # Real measurements
 
        # The "magic" modelines borrowed from someone else
        Modeline "800x600" 40.12 800 848 968 1056 600 601 605 628 #60Hz
        # From http://xtiming.sourceforge.net/cgi-bin/xtiming.pl
        # hfreq: 37.9 kHz
        Modeline "800x600@60" 38.21 800 832 976 1008 600 612 618 631
 
        # The "magic" modelines borrowed from someone else
        Modeline "640x480" 25.175 640 664 760 800 480 491 493 525 #60Hz
        # From http://xtiming.sourceforge.net/cgi-bin/xtiming.pl
        # hfreq: 30.43 kHz
        Modeline "640x480@60" 24.11 640 672 760 792 480 490 495 505
 
EndSection
 
Section "Device"
        Identifier  "Card0"
        Driver      "nvidia"
        VendorName  "Rosewill"
        BoardName   "nVidia GeForce FX5200"
        #Option     "RenderAccel" "1"
 
        Option "ConnectedMonitor" "TV"
        Option "TVStandard" "NTSC-M"
        Option "TVOutFormat" "SVIDEO"
 
        Option "NoLogo" "1"
        # sw_cursor is needed for some ati and radeon cards
        #Option     "sw_cursor"
        # Other options...
        #Option     "hw_cursor"
        #Option     "NoAccel"
        #Option     "ShowCache"
        #Option     "ShadowFB"
        #Option     "UseFBDev"
        #Option     "Rotate"
        # The following line is auto-generated by KNOPPIX mkxf86config
        #BusID      "PCI:1:0:0"
EndSection
 
Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultColorDepth 24
        SubSection "Display"
                Depth     1
                Modes "800x600" "640x480" "800x600@60" "640x480@60"
        EndSubSection
        SubSection "Display"
                Depth     4
                Modes "800x600" "640x480" "800x600@60" "640x480@60"
        EndSubSection
        SubSection "Display"
                Depth     8
                Modes "800x600" "640x480" "800x600@60" "640x480@60"
        EndSubSection
        SubSection "Display"
                Depth     15
                Modes "800x600" "640x480" "800x600@60" "640x480@60"
        EndSubSection
        SubSection "Display"
                Depth     16
                Modes "800x600" "640x480" "800x600@60" "640x480@60"
        EndSubSection
        SubSection "Display"
                Depth     24
                Modes "800x600" "640x480" "800x600@60" "640x480@60"
        EndSubSection
        SubSection "Display"
                Depth     32
                Modes "800x600" "640x480" "800x600@60" "640x480@60"
        EndSubSection
EndSection
 
#Section "DRI"
#       Mode 0666
#EndSection

edit (for some reason i had to copy this to /etc/X11/XF86Config not /etc/X11/XF86Config-4) (randomhtpcguy)

 

Last Updated ( Tuesday, 29 May 2007 )