The UHF of the film world.
Latest news

quietearth [Cathode Ray Mission 01.15.07] Tuvalu

The best way to do this is using the mga_vid driver which will plug directly into mplayer, grab the source and compile:

I'm using ubuntu edgy which has a weird problem, I had to remove the matrox_w1 module for any of my matrox stuff to work:
# rmmod matrox_w1

From your compiled mga_vid source:
# insmod mga_vid.ko

Then run the following, most kernels already have these compiled in, and then set the tv out standards for our card.
# modprobe matroxfb_base
# modprobe matroxfb_crtc2
# matroxset -f /dev/fb0 -m 5
# matroxset -f /dev/fb1 -m 2
# matroxset -f /dev/fb1 -o 1 2 (NTSC)
(use matroxset -f /dev/fb1 -o 1 1 for PAL)

You should now be plugged into port 2 on the back of your card and receiving video. At this point we can use the mga driver:
# mplayer -vo mga FILENAME...

or the slower framebuffer device:
# mplayer -vo fbdev:/dev/fb1 FILENAME...

If you're using a small monitor like I am, you can change the x/y size like such:
# fbset -fb /dev/fb1 -xres 400 -yres 260 -depth 16
and for pal users:
# fbset -yres 576 -xres 768 -upper 44 -lower 4 -vslen 1

On a side note, for some weird reason you can only use the mga driver once via mplayer, after that it's frozen and you have to use the fbdev device. Anyone have any ideas?

Now the whole thing which brings it together, X baby, here's the mimimal config file I'm using on a small lcd monitor, or you can grab it from small.xorg.conf
Section "Device"
    Identifier  "MATROX CARD 1"
    VendorName  "Matrox"
    BoardName   "G450"
    BusID       "PCI:1:0:0"
#    Option    "UseFBDev"
    Driver "fbdev"
    Option    "HWcursor" "no"
    Option "fbdev" "/dev/fb1"

Section "Monitor"
    Identifier   "console"
    VendorName   "Unknown"
    ModelName    "Unknown"
    HorizSync    31.5 - 31.5
    VertRefresh  50.0 - 70.0

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

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

Section "Screen"
        Identifier "Display 1"
        Device     "MATROX CARD 1"
        Monitor    "console"
        DefaultDepth 16
        SubSection "Display"
                Depth     16
                Modes    "480x230"

Section "ServerLayout"
        Identifier      "tvout"
        Screen          "Display 1" 0 0
        InputDevice     "Mouse0" "CorePointer"
        InputDevice     "Keyboard0" "CoreKeyboard"

More information can be found at the following links:

You might also like


Anonymous (12 years ago) Reply

Thanks very much for sharing your experiences; I have a G450 and will use your instructions to get Xorg on my TV. Your help is appreciated. Take care


Anonymous (12 years ago) Reply

Have you already figured out how to use the mga driver more than once in the console mode? I haven't tried this tutorial yet but my original plan was to not use X at all in my "linux mediacenter" pc.


quietearth (12 years ago) Reply

I really haven't tried to figure out the mga driver, I just use the framebuffer with mplayer. One thing you will notice with mplayer is you might need to set the proper resolution with fbset for what your watching. This resolutions is shown in the mplayer output when you start playing something.

Leave a comment