Linux Conspirare
LINUX MASCOT!!
IT'S ONLY THE BEST OS.

The UnOfficial Nvidia tvout Information



Using the TVOUT feature on NVIDIA-based cards with the NVIDIA linux driver
==========================================================================

 This page made by v@iki.fi for the most part and just placed here for users info. Linux
Conspirare claims no credit for it.

 This page is mainly for non twinview cards. I don't have a twinview card so I couldn't
give any info on it. If you got any info to add please email it to the address in the Nvidia
help page at the bottom (ie Email for submiting info or sites).

Look here for a example twinview setup and config

 I have added some files for you to download with examples.
These scritps work the same as tvout file says. Pretty much just names are a little diff.
It should be easy to figure out I hope. Get it here.
Tv out example files and docs.

1) Upgrade to NVIDIA driver 1.0-1251 or newer
====================================

  You can get the stuff from
http://www.nvidia.com/view.asp?PAGE=linux
ftp://ftp.nvidia.com/pub/drivers/english/XFree86_40/

  I won't walk you through installing the drivers -- that's more than
  adequately covered in the NVIDIA README:

  Basically it just comes down to

rpm --rebuild /path/to/NVIDIA_kernel.1.0-version.src.rpm
rpm -Uvh /path/to/NVIDIA_kernel.1.0-version.i386.rpm
rpm -Uvh NVIDIA_GLX.1.0-version.i386.rpm

  or something depending on your distro and installed kernel.

  NOTE: Nvidia drivers before 1.0-1251 DO NOT support TVOUT.


2) Read the TVOUT_README
========================

/usr/share/doc/NVIDIA_GLX-1.0/README

   That's the authorative source of information.

   Basically you can run both monitor and tvout simultaneously if you have
  twinview capable card. If you don't (like me), you can still launch an
  X server to another VT (and switch in between with ctrl-alt-F7/F8), but
  only one display (monitor or tv) is enabled at a time.

   Fortunately launching another X server to another VT is relatively easy
  with suitable script and you can actually do it from within your primary
  X server/session.

  ****Update agpgart should work now in drivers after 1.0-1251*****
  ****Update agpgart may not be capable of 2 X sessions. Works with nvagp though for 1.0-1251****


3) Tune your XF86Config
=======================

  I added these to my XF86Config:

  To the Monitor sections:

Section "Monitor"

    Identifier  "TV"

    HorizSync 30-50
    VertRefresh 60

EndSection

  That's straight out from the TVOUT_README.

  To the Screen sections:

Section "Screen"
    Identifier  "Screen_tvout640"
    Device      "geforce"
    Monitor     "TV"
    DefaultDepth 24

    # PAL-G for Finland; PAL-D for China and North Korea, see TVOUT_README
    Option "TVStandard" "PAL-G"
    Option "ConnectedMonitor" "TV"

    Subsection "Display"
        Depth       24
        Modes       "640x480"
        ViewPort    0 0
    EndSubsection
EndSection

Section "Screen"
    Identifier  "Screen_tvout800"
    Device      "geforce"
    Monitor     "TV"
    DefaultDepth 24

    Option "TVStandard" "PAL-G"
    Option "ConnectedMonitor" "TV"

    Subsection "Display"
        Depth       24
        Modes       "800x600"
        ViewPort    0 0
    EndSubsection
EndSection

  And finally to the ServerLayout sections:

    # monitor
    Screen "Screen 1"
    # tvout
    #Screen "Screen_tvout640"
    #Screen "Screen_tvout800"

4) Starting the server
======================

   You can now start the server to tvout mode by uncommenting the
  relevant Screen line in XF86Config. That's not convenient. Fortunately
  you can use xinit command line to select the screen. I use the following
  script to start the server in tvout mode:

  cat tvout

xinit $* -- :1 -bpp 24 -screen Screen_tvout800
or
startx -- :1 -bpp 24 -screen Screen_tvout800

   So if you do './tvout xclock' it launches an X server to VT 8, transfers
  control to it, and shows a xclock in there (in your tv, if you're lucky.)
  You can kill that server normally with ctrl-alt-backspace, or just exit
  xclock more gracefully. When the X server has finished, the control (and
  picture) comes back to where it was (eg. your primary X server and monitor).

   You can also switch between the secondary (tv) X and primary (monitor) X
  with ctrl-alt-F8/F7. Convenient, huh?


5) What do you do with it?
==========================

  Watch movies, of course.

  I have this script to launch movie play on tv:

  cat movieplay

/usr/X11R6/bin/xterm -e \
 /usr/local/bin/mplayer -fs -vo sdl -zoom \
   "$*"
  
  And I use it like this:

./tvout ./movieplay foo.avi

   (I'm not exactly sure why mplayer needs to be launched from xterm whereas
  most other programs work without it, but I don't complain. -fs means
  fullscreen, -vo sdl is needed since the xvideo extension is not yet
  supported with tvout, and -zoom may provide better performance with SDL.)

   Note that since you are not launching a window manager (no need for that),
  you don't see any borders on the maximized movie window. Nice.

   You can propably get your favourite movie player working in similar vein.


5a) Other uses
============

 Also you can do a simple use with a display manager and other stuff for automatic
 Tv stuff. The following is from MacSlow

Here is the stuff I came up with to make good use of
the TV-out plug on my nVIDIA gfx-card. In the attachment you'll find two
simple shell-scripts I use to make starting up this whole TV-thing
easier. They need to be put somewhere in the $PATH and treated with the
usual chmod ugo+x . But this is for sure nothing new to you I assume :)

    For me it works like this... once I start a program on the TV-set
via the use of these scripts my monitor turns black and I can only deal
with the computer via the display on the TV. After I exited the program
running on the TV, the additional X11-server is shut down again and
control comes back to the monitor. This is sofar the best setup I could
come up with on my non-TwinView GeForce256 DDR. I know of this nv-tv
tool, but I have not checked out that one yet. It promises to offer TwinView-like
features even for GeForce256-based cards.

________________________________________________________________
#!/bin/sh

XFree86 :1 vt8 -screen screen_tvout800 +bs -ac &
export DISPLAY=:1

# start the program you passed via the command-line, make sure
# to put the arguments passed in "" so they are regarded as one
# argument in this script
$1

export DISPLAY=:0
killall -15 XFree86

________________________________________________________________

#!/bin/sh

XFree86 :1 vt8 -screen screen_tvout800 +bs -ac &
export DISPLAY=:1

# use this if you want to have aviplay playback on the tv
#aviplay --fullscreen --maximize "$1"

# this example starts xine's DVD-playback on the tv in fullscreen
#xine -f -g -pq dvdnav://

# example how to use mplayer on the tv in fullscreen-mode
mplayer -fs "$1"

export DISPLAY=:0
killall -15 XFree86

________________________________________________________________

Mirco Mueller
Web: www.macslow.de


6) Related links
================

The rivatv project works on some older Riva-based cards:


http://sourceforge.net/projects/rivatv


7) Problems?
============

  Linus Larsson  reports that if you get an error
  about not being authorized to connect to the server, this trick will
  help:

mcookie|sed -e 's/^/add :1 . /'|xauth -q


- 18052001 v@iki.fi
- 16012002 v@iki.fi (updates)




Valid HTML 4.01!