View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 19 posts ] 
Go to page 1, 2  Next

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sun Oct 10, 2004 3:14 pm 
Offline
Joined: Thu Oct 07, 2004 12:14 am
Posts: 9
Hi All,

With the help of some members of the Mythtv-Users mailing list, I have recently been able to a Matrox Dual Head ("DH") card working with Knoppmyth (and MythTV, in general) to display TV out on the second head. This HOWTO is the "recipe" that I am currently using to get it running, and will hopefully be of some help to others. I plan on posting this to the MythTV Documentation Wiki as well.

Note: This HOWTO assumes you have already installed Knoppmyth on a machine. The following must be performed on whatever machine is acting as the frontend, with the Matrox G400 DH card, and should be done from the command line. At the end of this HOWTO, I have a script that I run on startup to do it all automatically.

Prerequisites
1. Knoppmyth (or MythTV) installation
2. Matrox G400 card (connected to the TV)
3. matroxset binary (can be installed using apt-get

Step 1: Install Matrox Drivers
The frist thing we need to do is is install the mgadrivers from the Matrox site. As of this writing, they can be downloaded from http://www.matrox.com/mga/support/drivers/files/lnx_30.cfm. It is not necessary to download the "Power Desk" utility.

Extract the drivers with tar -zxpf mgadrivers-<version>.tgz and follow the instructions for installing the drivers.

Step 2: Load the Modules
Issue the following commands to load the necessary modules to enable framebuffer support:

Quote:
# modprobe i2c-matroxfb
# matroxfb_Ti3026
# matroxfb_crtc2
# matroxfb_maven


Step 3: Framebuffer Setup
Issue the following commands to setup the framebuffer to output on both the monitor and the TV:

Quote:
# matroxset -f /dev/fb1 -m 0
# matroxset -f /dev/fb0 -m 3
# matroxset -f /dev/fb0 -o 1 2 (for NTSC; if you have PAL, then change the '2' to a '1')

# fbset -fb /dev/fb0 -xres 800 -yres 600
# fbset -fb -left 36 -right -16 -upper 100 -lower 30 -hslen 42


Note: That last fbset command may need adjusting for your own setup. Unforutnately, if it does not work for your TV, then you will just have to play with the settings until it finally satifies you.

Step 4: Windows Configuration
Open /etc/X11/XF86Config-4 and make the following additions/modifications:

Quote:
Section "Monitor"

Make sure VertRefresh includes 50 (for PAL) or 60 (for NTSC)


Quote:
Section "Module"
Load "v4l" # Video for Linux


Quote:
Section "Device"
Driver "mga"
Option "hw cursor" "off"
Option "UseFBDev" "on"


Quote:
Section "Screen"
DefaultDepth 16
DefaultFbBPP 16
SubSection "Display"
Depth 16
Modes "800x600"
EndSection


Step 5: Start X Windows!
Log in as the user mythtv and run startx. You should see Knoppmyth start, and if you select Watch TV, you should now see the program come up on the screen.

Appendix A: Startup Script
To avoid having to manually enter all of the above, and instead have everything start automatically on reboots, etc., I came up witht he following script, which I call matroxfb, and is placed in the /etc/init.d directory. This script is then symlinked to /etc/rc3.d/S15matroxfb and /etc/rc5.d/S15matroxfb, so that it starts up pretty early. Here is the script:

Quote:
#!/bin/sh

# matroxfb: Startup script to setup Matrox G400 Framebuffer support
# for MythTV.
#
# Author: Alan Murrell <alan@murrell.ca>
#
# Changelog:
# Oct 10 2004 - initial release
#

modprobe="/sbin/modprobe"
matroxset="/usr/bin/matroxset"
fbset="usr/sbin/fbset"
region="NTSC" # NTSC or PAL

function usage() {
clear
echo ""
echo "Usage: $0 [start]"
echo ""
}

function load_modules() {
$modprobe i2c-matroxfb
$modprobe matroxfb_Ti3026
$modprobe matroxfb_crtc2
$modprobe matroxfb_maven
}

function setup_framebuffer() {
$matroxset -f /dev/fb1 -m 0
$matroxset -f /dev/fb0 -m 3
if [ "$region" = "NTSC" ]
then
$matroxset -f /dev/fb0 -o 1 2
else
$matroxset -f /dev/fb0 -o 1 1
fi

$fbset -fb /dev/fb0 -xres 800 -yres 600
$fbset -fb /dev/fb0 -left 36 -right -16 -upper 100 -lower 30 -hslen 42
}

case "$1" in
start )
load_modules
setup_framebuffer
;;
* )
usage
;;
esac

exit 0


The one thing I have not been able to correct as yet is getting that last fbset command to show the screen properly; I still have to enter it in manually. If anyone has any ideas on that, I would appreciate them.

I hope this helps someone on the future.

Silk


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 03, 2005 11:30 am 
Offline
Joined: Sat Jan 03, 2004 3:43 pm
Posts: 64
Location: Mountain View, CA
Cool, thanks for taking the time to document this stuff. I think there may be a typo in the "Load the Modules" section. I couldn't find a matroxfb_Ti3026 executable. Should this:
Quote:
# modprobe i2c-matroxfb
# matroxfb_Ti3026
# matroxfb_crtc2
# matroxfb_maven

actually be this:
Quote:
# modprobe i2c-matroxfb
# modprobe matroxfb_Ti3026
# modprobe matroxfb_crtc2
# modprobe matroxfb_maven

? After running the modprobe commands I'm having some trouble with the matroxset command:
Quote:
# matroxset -f /dev/fb1 -m 0
Cannot open /dev/fb1: No such device

Any guess as to what's going wrong?

Thanks in advance,

Boris


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 13, 2005 11:30 pm 
Offline
Joined: Sun Nov 09, 2003 11:25 pm
Posts: 19
Thanks for this howto Silk. Makes me want to dust off one of my G400's and build a Knoppmyth box. I do have a question. How is the output quality?? Is this similar to running the G400 in DVDMax mode under windows (which used to give the *BEST* SDTV output available on any video adapter to this day), or is it running a "Clone" style display, like all the other Video Card TV-outs. The reason I dumped Knoppmyth a while back was because of the intolerable SDTV output of the Nvidia card I had, and I didn't have the patience to get anything else working.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 30, 2005 8:03 am 
Offline
Joined: Sat Jul 30, 2005 7:59 am
Posts: 1
with the latest downloadable CD this howto doesn't work anymore (might have worked for earlier version, as you say).

the problem is that VESA is compiled in the knoppix kernel (not as a loadable module) and you cannot insert the matrox modules as they fail.

You will need to recompile the kernel and it will start working again.

Also, may I suggest this utility ftp://platan.vc.cvut.cz/pub/linux/matro ... n-prog.tgz to get better color for your tvout? My G400 with these settings

matrox 0x1e 0xd0
matrox 0x20 0xff
matrox 0x22 0xff

it's just fantastic! :)

Thank you very much for this howto anyway, very helpful!

Ciao


Top
 Profile  
 
 Post subject: help with R5A26
PostPosted: Mon Jan 02, 2006 12:29 pm 
Offline
Joined: Mon Nov 07, 2005 10:09 am
Posts: 153
Does anyone have a sample XF86Config-4 that they could post that would work out of the box with R5A26. I have searched and followed different guides, but none of them seem to work for me with the current version of knoppmyth. If I have to recompile the kernel I will learn but what exactly do I load as modules or what needs to be static in addition to the defaults in R5A26?

Thanks from a newbie.

BTW the matox card is working for me but no tv-out still with the G400 dual head.


Top
 Profile  
 
 Post subject: R5A26 missing
PostPosted: Wed Jan 04, 2006 8:11 pm 
Offline
Joined: Mon Nov 07, 2005 10:09 am
Posts: 153
mga_hal_drv.o seems to be missing from

/usr/X11R6/lib/modules/drivers/

in my clean install of R5A26... I am stuck, because I'm not sure how to get it...

Any help please?

This is a library needed for TV-out I think


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 04, 2006 11:35 pm 
Offline
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location: Nashville, TN
I believe you have to download the proprietary drivers from matrox's site to get the hal.

_________________
Have a question search the forum and have a look at the KnoppMythWiki.

Xsecrets


Top
 Profile  
 
PostPosted: Thu Jan 05, 2006 1:01 pm 
Offline
Joined: Mon Nov 07, 2005 10:09 am
Posts: 153
Ok, after two days of following how-to's i remembered something about lilo and nvidia tv-out... I couldn't remember what but I decided to comment out
vga=788 from lilo.conf... saved... typed lilo and rebooted.

For the first time, my tv came to life with more than text.

previously i got stuck on the how-to with
Quote:
matroxset -f /dev/fb1 -m 0
Cannot open /dev/fb1: No such device


now it worked... as Silk's guide describes... although either my LCD monitor or my tv are squished depending on the order in which i execute the script...

Anyway...besides what is mentioned in this guide...I changed three things from the default install in R5A26

1. recompiled the kernel installed it with the same config except that I removed vesafb

2. installed the latest G400max drivers from matrox compiled for Xfree86 4.3.0 which added mga_hal_drv.o in addition to mga_drv.o which was already included in the default knoppmyth install

3. commented out the 'vga=788' line in lilo.conf

The only variation from Silk's How-to may be that I needed to do #3 above ... but I am not sure.

Thanks for your help.

BTW the best info seems to come from here

http://directfb.org/wiki/index.php/Matr ... ead#TV-out

My next goal is to fix the color as mentioned...
and tweak the video quality. I get the impression that mplayer can give top notch interlaced video quality with this card but I don't know what part of mythtv uses mplayer and how that frame buffer stuff differs between mythtv x windows gui and watching a tv program or dvd... need to read more.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 22, 2006 7:15 pm 
Offline
Joined: Sun Jan 08, 2006 9:01 am
Posts: 19
I tried to follow this but I also get to do

# matroxset -f /dev/fb1 -m 0

and get

# Cannot open /dev/fb1: No such device

Does tv out work on g450 and what knoppmyth version should I be using. I naturally installed R5A30 the latest one, only to find out, no you wanna use an earlier version! WHAT!

I've pretty much decided to get a standalone freeview recorder, probably the humax 9200t, but will continue to try and get knoppmyth to work in spare time. I realise that might take weeks or months and in the meantime wanna actually watch and record some TV!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 22, 2006 7:23 pm 
Offline
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location: Nashville, TN
well did you try commenting vga=??? from lilo.conf and running lilo -v like the previous poster said he did to fix your very problem?

_________________
Have a question search the forum and have a look at the KnoppMythWiki.

Xsecrets


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 22, 2006 7:30 pm 
Offline
Joined: Sun Jan 08, 2006 9:01 am
Posts: 19
I didn't have that line in lilo.conf

I just tried typing lilo -v and rebooting but no change

Is there any other way of getting it to work?

Is there a video card that works with KnoppMyth without having to edit all sorts of files and google for hours to be disappointed? I admit I don't know a great deal about linux BUT have programed for 20 years in 8086, C, C++ etc so am not a complete starter (though I feel like one trying to do this). Ironically I met a friend who's been a linux sysadmin for many years and he gave up on MythTV unable to get it working, though this was a year ago and I don't think he used knoppmyth. But maybe I'm being optimistic about my chances of success?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 22, 2006 7:48 pm 
Offline
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location: Nashville, TN
unless you've already changed it you do have a vga=something line in /etc/lilo.conf you can either comment it out or set it to vga=normal that line has been in every version of knoppmyth.

_________________
Have a question search the forum and have a look at the KnoppMythWiki.

Xsecrets


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 23, 2006 1:26 pm 
Offline
Joined: Sun Jan 08, 2006 9:01 am
Posts: 19
I did a totally new install of KnoppMythR5A22, reinstalled matrox drivers just in case, #'d out the vga line, followed instructions to the letter but still same result. It simply does not work.


Last edited by johnjohn on Mon Jan 23, 2006 1:44 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 23, 2006 1:29 pm 
Offline
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location: Nashville, TN
did you run lilo -v as root after you commented out the line? otherwise it won't install the new mbr with the changes.

_________________
Have a question search the forum and have a look at the KnoppMythWiki.

Xsecrets


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 23, 2006 1:50 pm 
Offline
Joined: Sun Jan 08, 2006 9:01 am
Posts: 19
Yes I ran lilo -v and rebooted

My only curiosity is in the matrox drivers install. You do

sh install.sh

which says the 2 drivers are up to date

There is a lot more in the readme file regarding editing the XF86Config file wasn't sure if all this needed to be done as well, though I'm about to give it a go

stuff like this:-

----------copied from matrox driver readme.txt--------------
Example: Clone Mode

Section "Device"
Identifier "G400_1"
Driver "mga"
BusID "PCI:1:0:0"
Screen 0
EndSection

Section "Device"
Identifier "G400_2"
Driver "mga"
BusID "PCI:1:0:0"
Screen 1
Option "Tv" "yes"
EndSection

Section "ServerLayout"
Identifier "Layout1"
Screen "Screen0"
Screen "Screen1"
Option "Xinerama"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ] 
Go to page 1, 2  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu