# NVIDIA TV Out the Easy Way [HOWTO]

## count_zero

If you're like me, the only time you use TV out is to watch some video that you've downloaded off the web on your television.  I never could get my NVIDIA TwinView to work correctly, but I think that this method is better for watching movies anyway.  I can right click on any movie file, and there is now an option under "actions" in my KDE menu to "View on TV" (adapted from http://www.kde-look.org/content/show.php?content=13948 and http://www.iofcea.de/cgi-bin/seite.pl?file=linuxtvout).  This way uses KDE servicemenus, but there's probably an equivelant for Gnome, etc.  

The way this is set up, the movie opens on the television, and my laptop screen turns off while the movie is playing.  Once the movie is done or you hit escape, the tv picture turns off and your laptop display is back to normal.  The tricky part for me was setting up my xorg.conf to enable this.

Here are the relevant snippets from my xorg.conf.  You may have to change some resolution sizes based on your TV.  Also, I have an NVIDIA graphics card, so the options are probably different on other cards:

```

-----------------snip------------------

######## X Server ########

Section "ServerLayout"

   Identifier   "Default Layout"

   Screen   0   "Screen0" 0 0

   InputDevice   "Alps" "CorePointer"

   InputDevice   "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerFlags"

   Option      "Xinerama"   "false"

EndSection

----------------snip-------------------

######## Monitors ##########

  #### LAPTOP LCD ####

Section "Monitor"

   Identifier   "Monitor0"

   VendorName   "Monitor Vendor"

   ModelName   "Dell 1600x1200 Laptop Display Panel"

   HorizSync   31.5 - 90.0

   VertRefresh   59.0 - 85.0

   Option      "dpms"

EndSection

  #### TV SCREEN ####

Section "Monitor"

        Identifier      "TV-monitor"

        VendorName      "Sony"

        ModelName       "Television"

        Option       "ConnectedMonitor" "TV"

        HorizSync       30-50

        VertRefresh     60

   Option      "dpms"

EndSection

######### Graphics Cards ############

  #### NVIDIA DEFAULT ####

Section "Device"

   Identifier   "Videocard0"

   Driver      "nvidia"

   VendorName   "Monitor Vendor"

   BoardName   "nVidia GeForce 2 Go"

   VideoRam   32768

   Option      "NoLogo" "true"

   Option      "NvAGP"   "2"

    Option       "RenderAccel" "On"

        Option          "AllowGLXWithComposite" "true"

EndSection

  #### TV-OUT ####

Section "Device"

        Identifier      "TV-device"

        Driver          "nvidia" 

        VendorName      "Monitor Vendor"

        BoardName       "nVidia GeForce 2 Go"

        VideoRam        32768

        Option          "NoLogo" "true"

        Option          "NvAGP" "2"

        Option          "RenderAccel" "On"

        Option          "AllowGLXWithComposite" "true"

        Screen          0

          Option          "TVStandard" "NTSC-M"

   Option      "TVOutFormat" "COMPOSITE"    # (or "SVIDEO" if that's what you're using)

   Option      "ConnectedMonitor" "TV"

EndSection

####### Screens #########

  #### LAPTOP LCD ####

Section "Screen"

       Identifier   "Screen0"

       Device      "Videocard0"

       Monitor      "Monitor0"

       DefaultDepth   24

       SubSection "Display"

           Depth      24

           Modes      "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "800x600" "640x480"

       EndSubsection

   SubSection "Display"

      Depth      16

      Modes      "1600x1200" "1400x1050" "1280x1024" "1280x960" "1152x864" "800x600" "640x480"

   EndSubsection

EndSection

   #### TV SCREEN ####

Section "Screen"

       Identifier   "TV"

       Device      "TV-device"

       Monitor      "TV-monitor"

       DefaultDepth   24

       SubSection "Display"

                Depth      24

                Modes        "800x600"

       EndSubSection

EndSection

--------------------snip-------------------------

```

Basically what is done here is creating a new "screen" or profile, which utilizes the graphics card in a different configuration as well as the TV monitor instead of the laptop LCD.  Notice that the custom screen "TV" calls on the custom device "TV-device" and monitor "TV-monitor".

You need MPlayer installed for this to work (there was also an option for xine, complete with a bash script, http://www.iofcea.de/files/tvout, but it didn't work for me).  The KDE service menu looks like this:

```

# ~/.kde/share/apps/konqueror/servicemenus/View_on_TV.desktop

# Service Menu for viewing Videos on TV

# based on an idea for TV-Out with Nvidia Cards seen on

# http://www.iofcea.de/cgi-bin/seite.pl?file=linuxtvout

# Thanks go to Markus Iofcea

[Desktop Entry]

ServiceTypes=video/*

Actions=ViewOnTvMplayer

[Desktop Action ViewOnTvMplayer]

Name=View on TV (MPlayer)

Icon=mplayer

Exec=/bin/sh -c "X -screen TV :1 -ac & sleep 2; DISPLAY=:1 mplayer -fs -vo x11 -zoom -really-quiet %U; ps ax|grep 'X -screen TV'|cut -f 1 -d' '|xargs kill"

```

Just copy this file, "View_on_TV.desktop" to ~/.kde/share/apps/konqueror/servicemenus/.

That's all there is to it.  I hope this helps someone. :Very Happy: 

Thanks go to Cellardoor and Markus Iofcea

----------

## atdsm

Nifty. I'll have to try it out with my card...

----------

## svf

thanks  :Very Happy: 

----------

## jdoe

works here  :Smile: 

thanks... that's what I was looking for  :Smile: 

I manage it with a nautilus script

~/.gnome2/nautilus-scripts/watch_on_tv

(must be chmod +x )

```

X :1 -screen "Screen TV" &

sleep 2

DISPLAY=":1" xine "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ; ps aux | grep "Screen TV" | grep -v grep | sed s/"root     "/""/ | cut -f1 -d' ' | xargs kill

```

it doesn't work when you select a directory or multiple files, but it does work for me with one right file  :Razz: 

select a divx -> right click -> scripts -> watch_on_tv

john

----------

## jspr

Work perfectly here  :Smile: 

thank you!

----------

## tommy_haaland

Mine doesn't seem to work. I have Gainward card which is a Geforce FX 5200, 128 mb.

When I start gnome, I see the nvidia screen, so the driver is loaded.  I copied this to ~/.gnome2/nautilus-scripts/watch_on_tv :

```

X :1 -screen "Screen TV" &

sleep 2

DISPLAY=":1" xine "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ; ps aux | grep "Screen TV" | grep -v grep | sed s/"root     "/""/ | cut -f1 -d' ' | xargs kill 

```

This is my xorg.conf, I had to add Option "IgnoreDisplayDevices" "TV"  so that TV didn't load automatically when I started Gnome

```

Section "ServerLayout"

   Identifier     "X.org Configured"

   Screen      0  "Screen0" 0 0

   InputDevice    "Mouse0" "CorePointer"

   InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerFlags"

   Option      "Xinerama"   "false"

EndSection 

Section "Files"

   RgbPath      "/usr/X11R6/lib/X11/rgb"

   ModulePath   "/usr/X11R6/lib/modules"

   FontPath     "/usr/share/fonts/misc/"

   FontPath     "/usr/share/fonts/TTF/"

   FontPath     "/usr/share/fonts/Type1/"

   FontPath     "/usr/share/fonts/CID/"

   FontPath     "/usr/share/fonts/75dpi/"

   FontPath     "/usr/share/fonts/100dpi/"

#   FontPath     "/usr/share/fonts/lfp-fix/"

EndSection

Section "Module"

   Load  "extmod"

   #Load  "dri"

   Load  "dbe"

   Load  "record"

   Load  "xtrap"

   Load  "glx"

   Load  "type1"

   Load  "freetype"

EndSection

Section "InputDevice"

   Identifier  "Keyboard0"

   Driver      "kbd"

   Option "XkbLayout" "no-latin1"

EndSection

Section "InputDevice"

   Identifier  "Mouse0"

   Driver      "mouse"

   Option       "Protocol" "IMPS/2"

   Option       "Device"   "/dev/usbmouse"

        Option      "Buttons"  "7"

        Option      "ZAxisMapping"  "4 5"

      # Option      "Resolution"    "100"

EndSection

######### MONITORS #########

Section "Monitor"

   Identifier   "Monitor0"

   VendorName   "Monitor Vendor"

   ModelName    "Monitor Model"

        #HorizSync 30-70

        #VertRefresh 50-160

   Option "dpms"

   

EndSection

  #### TV SCREEN ####

Section "Monitor"

        Identifier      "TV-monitor"

        VendorName      "Sanyo"

        ModelName       "Television"

        Option       "ConnectedMonitor" "TV"

        HorizSync       30-50

        VertRefresh     60

      Option      "dpms"

EndSection 

######### Graphics cards ###########

Section "Device"

        ### Available Driver options are:-

        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",

        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"

        ### [arg]: arg optional

        #Option     "SWcursor"              # [<bool>]

        #Option     "HWcursor"              # [<bool>]

        #Option     "NoAccel"               # [<bool>]

        #Option     "ShadowFB"              # [<bool>]

        #Option     "UseFBDev"              # [<bool>]

        #Option     "Rotate"                # [<str>]

        #Option     "VideoKey"              # <i>

        #Option     "FlatPanel"             # [<bool>]

        #Option     "FPDither"              # [<bool>]

        #Option     "CrtcNumber"            # <i>

   Identifier  "Videocard0"

   Driver      "nvidia"

   VendorName  "nVidia Corporation"

   BoardName   "GeForce FX 5200"

   VideoRam    128000

   #Option "NoLogo" "true"

        Option "IgnoreDisplayDevices" "TV"

   Option       "NvAGP" "3"

   Option       "RenderAccel" "On"

        Option       "AllowGLXWithComposite" "true" 

EndSection

  #### TV-OUT ####

Section "Device"

        Identifier      "TV-device"

        Driver          "nvidia"

        VendorName      "nVidia Corporation"

        BoardName       "GeForce FX 5200"

        VideoRam        128000

        #Option          "NoLogo" "true"

        Option          "NvAGP" "3"

        Option          "RenderAccel" "On"

        Option          "AllowGLXWithComposite" "true"

        Screen          0

        Option          "TVStandard" "PAL-B"

      Option          "TVOutFormat" "COMPOSITE"   

      Option          "ConnectedMonitor" "TV"

EndSection 

########### Screens ###########

Section "Screen"

   Identifier "Screen0"

   Device     "Videocard0"

   Monitor    "Monitor0"

        DefaultDepth 24 

   SubSection "Display"

      Depth     24

               #Modes "1024x768"

                Modes "1280x1024"

                Viewport 0 0

   EndSubSection

#   SubSection "Display"

#      Viewport   0 0

#      Depth     4

#   EndSubSection

#   SubSection "Display"

#      Viewport   0 0

#      Depth     8

#   EndSubSection

#   SubSection "Display"

#      Viewport   0 0

#      Depth     15

#   EndSubSection

#   SubSection "Display"

#      Viewport   0 0

#      Depth     16

#   EndSubSection

#   SubSection "Display"

#      Viewport   0 0

#      Depth     24

#   EndSubSection

EndSection

   #### TV SCREEN ####

Section "Screen"

       Identifier   "TV"

       Device      "TV-device"

       Monitor      "TV-monitor"

       DefaultDepth   24

       SubSection "Display"

                Depth      24

                Modes        "800x600"

       EndSubSection

EndSection
```

----------

## killercow

I tried this on a geforce 265 deluxe, and since it doesn;t support twinview i had to alter the config a tad.

When i booted with the monitor on the card, it played nice, and gave me 800x600 on the monitor.

After setting the correct settings to x it gave 800x600 on the tv. so i was happy, things were good.

After the first reboot (without the monitor attatched) my entire screen has been displaced, almost 20% of the screen has fallen of the bottom. (not virtual desktop).

I tried a bunch of different hsync,and vsync, but the all either screw up the entire screen or displace the screen even more.

also tried overscan options in the config, doesn't do squat.

does anyone know how to fix this?

----------

## El Tazar

Using Nautilus under Gnome and mplayer, I had some problems with paths containing whitespaces. I now use the following:

```

X -screen ScreenTV :1 -ac & 

sleep 2

DISPLAY=":1" mplayer -fs -vo x11 -zoom -really-quiet "$@"

```

Note that this code does not automatically shut down the running X-server after mplayer exit as the other scripts.

----------

## marcowave

works almost perfect!  :Very Happy: 

3 little problems:

1. It works in Black&White.. I try to set PAL-B and PAL-G in xorg.conf but it doesn't change... I have to change something else? 

1. If I want to play a DVD on tv?

2. If I want to play a .rm file on TV? rm files work perfectly on mPlayer, but I don't have the option in the menù "play on TV"

one question:

is it possible to switch between the two screens? 

avi and mpeg work perfectly!  :Very Happy: 

----------

## JSharku

 *marcowave wrote:*   

> works almost perfect! 
> 
> 3 little problems:
> 
> 1. It works in Black&White.. I try to set PAL-B and PAL-G in xorg.conf but it doesn't change... I have to change something else? 
> ...

 

Have you tried composite/s-video? Could be what's causing the problem. No idea on the rest though.

Sharku

----------

## marcowave

 *JSharku wrote:*   

> 
> 
> Have you tried composite/s-video? Could be what's causing the problem. No idea on the rest though.
> 
> Sharku

 

the cable is s-video.. I set "SVIDEO" in xorg.conf... maybe i have to set "S-VIDEO"?

now I try  :Very Happy: 

----------

## marcowave

ok now is on color  :Very Happy: 

the other problem is that in the "View on TV (mPlayer)" contextual menù appears only with .avi and .mpg files... 

I want it to work even with .rm files (always in mPlayer)

how can I do this?

----------

## rawoul

I have a much better way of doing this, but i think it only works on dual head graphic cards.

This method simply sets up two X screen on one display (:0.0 and :0.1), instead of two displays (:0 and :1). This way only one X server is active, and you can have both screens displaying something at the same time. This is also better than TwinView since it doesn't use Xinerama.

Now to play a video on the TV you just have to do

```
DISPLAY=:0.1 mplayer blabla.avi
```

Here is my xorg config:

```
Section "ServerLayout"

   Identifier   "dual"

   Screen      0 "Screen0" 0 0

   Screen      1 "Screen1" LeftOf "Screen0"

   InputDevice   "Mouse0" "CorePointer"

   InputDevice   "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerLayout"

   Identifier   "single"

   Screen   0   "Screen0" 0 0

   InputDevice   "Mouse0" "CorePointer"

   InputDevice   "Keyboard0" "CoreKeyboard"

EndSection

Section "Files"

   RgbPath      "/usr/lib/X11/rgb"

   ModulePath   "/usr/lib/modules"

   FontPath   "/usr/share/fonts/misc/"

   FontPath   "/usr/share/fonts/TTF/"

   FontPath   "/usr/share/fonts/Type1/"

   FontPath   "/usr/share/fonts/75dpi/"

   FontPath   "/usr/share/fonts/100dpi/"

   FontPath   "/usr/share/fonts/artwiz/"

EndSection

Section "Module"

   Load      "record"

   Load      "extmod"

   Load      "dbe"

   Load      "glx"

   Load      "xtrap"

   Load      "freetype"

   Load      "type1"

EndSection

Section "ServerFlags"

   Option      "Xinerama"   "false"

EndSection

Section "InputDevice"

   Identifier   "Keyboard0"

   Driver      "kbd"

EndSection

Section "InputDevice"

   Identifier   "Mouse0"

   Driver      "mouse"

   Option      "Protocol" "evdev"

   Option      "Device" "/dev/input/mice"

   Option      "Buttons" "10"

   Option      "ZAxisMapping" "9 10"

   Option      "Emulate3Buttons" "false"

EndSection

Section "Monitor"

   Identifier   "Monitor0"

   HorizSync   30-96

   VertRefresh   50-160

   Option      "DPMS"

EndSection

Section "Monitor"

   Identifier   "Monitor1"

   HorizSync   30-50

   VertRefresh   60

EndSection

Section "Device"

   Option      "CursorShadow"   "true"

   Option      "NoLogo"   "true"

   Option      "RenderAccel"   "true"

   Identifier   "Card0"

   Driver      "nvidia"

   BusID      "PCI:1:0:0"

   Screen      0

EndSection

Section "Device"

   Option      "TVStandard"   "PAL-B"

   Option      "TVOutFormat"   "COMPOSITE"

   Option      "CursorShadow"   "true"

   Option      "NoLogo"   "true"

   Option      "RenderAccel"   "true"

   Identifier   "Card1"

   Driver      "nvidia"

   BusID      "PCI:1:0:0"

   Screen      1

EndSection

Section "Screen"

   Identifier   "Screen0"

   Device      "Card0"

   Monitor      "Monitor0"

   DefaultDepth   24

   SubSection "Display"

      Viewport   0 0

      Depth      24

      Modes      "1280x1024" "1024x768" "800x600" "640x480"

   EndSubSection

EndSection

Section "Screen"

   Identifier   "Screen1"

   Device      "Card1"

   Monitor      "Monitor1"

   DefaultDepth   24

   SubSection "Display"

      Viewport   0 0

      Depth      24

      Modes      "640x480"

   EndSubSection

EndSection
```

----------

## Pajarico

Why mine doesn't work? I have a geforce 5200 fx with VGA, DVI and S-VIDEO. I'm currently trying to get VGA+SVIDEO. I try with:

```
 DISPLAY=:0.1 mplayer foo.avi
```

I get the avi played but in the same terminal and played with aalib (i don't know why). Just in case, i tried forcing another video output:

```
 DISPLAY=:0.1 mplayer -vo x11 foo.avi
```

And i get:

```
vo: couldn't open the X11 display (:0.1)!
```

If i try:

```
X -screen TV :0 -ac & sleep 2; DISPLAY=:1 mplayer -fs -vo x11 -zoom 
```

I get:

```

Fatal server error:

Server is already active for display 0

        If this server is no longer running, remove /tmp/.X0-lock

        and start again.

...

[1]+  Exit 1                  X -screen TV :0 -ac

...

vo: couldn't open the X11 display (:1)!
```

My xorg.conf:

```

# **********************************************************************

# Server flags section.

# **********************************************************************

### X Server ###

Section "ServerLayout"

   Identifier   "Default Layout"

   Screen   0   "tarjeta" 0 0

   Screen      1 "TV" LeftOf "tarjeta"

#   Screen 1 "TV" 0 1

   Option "Xinerama" "off"

   Option "Clone" "on"

#   InputDevice   "Alps" "CorePointer"

#   InputDevice   "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerFlags"

#    Option       "DefaultServerLayout" "Default Layout"

    Option      "Xinerama"   "false"

#    Option "NoTrapSignals"

#    Option "DontVTSwitch"

#    Option "DontZap"

#    Option "Dont Zoom"

#    Option "DisableVidModeExtension"

#    Option "AllowNonLocalXvidtune"

#    Option "DisableModInDev"

#    Option "AllowNonLocalModInDev"

EndSection

# **********************************************************************

# Monitor section

# **********************************************************************

Section "Monitor"

    Identifier  "samsung"

    HorizSync   31-61

    VertRefresh 56-75

EndSection

#### TV SCREEN ####

Section "Monitor"

        Identifier      "tele"

        VendorName      "Panasonic"

        ModelName       "Quintrix"

        HorizSync       30-50

        VertRefresh     60

#      Option       "ConnectedMonitor" "TV"

#      Option      "dpms"

EndSection 

# **********************************************************************

# Graphics device section

# **********************************************************************

Section "Device"

    Identifier   "Standard VGA"

    VendorName   "Unknown"

    BoardName   "Unknown"

# The chipset line is optional in most cases.  It can be used to override

# the driver's chipset detection, and should not normally be specified.

#    Chipset   "generic"

    Driver     "vga"

#    BusID      "PCI:0:10:0"

#    VideoRam   256

#    Clocks   25.2 28.3

EndSection

Section "Device"

    Identifier  "5200fx"

    Driver      "nvidia"

    Option "CursorShadow" "true"

    Option "CursorShadowAlpha" "50"

    Option "CursorShadowXOffset" "4"

    Option "CursorShadowYOffset" "2"

    Option      "NoLogo" "true"

    Screen          0

    VideoRam   128

#    Option      "NvAGP"   "2" 

#    Option       "RenderAccel" "On"

#    Option          "AllowGLXWithComposite" "true"

#    VideoRam    32768

#    Insert Clocks lines here if appropriate

EndSection

#### TV-OUT ####

Section "Device"

    Identifier      "TV-out"

    Driver          "nvidia"

    VendorName      "Monitor Vendor"

    Screen          1

    Option          "TVStandard" "PAL-G"

    Option      "TVOutFormat" "SVIDEO"

#   Option "TVOverScan" 0.0

#   Option      "ConnectedMonitor" "TV"

EndSection 

# **********************************************************************

# Screen sections

# **********************************************************************

### MONITOR ###

Section "Screen"

    Identifier  "tarjeta"

    Device      "5200fx"

    Monitor     "samsung"

    DefaultDepth 24

    Subsection "Display"

        Depth       8

        Modes       "1280x1024" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       16

        Modes       "1280x1024" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

    Subsection "Display"

        Depth       24

        Modes       "1280x1024" "1024x768" "800x600" "640x480"

        ViewPort    0 0

    EndSubsection

EndSection

### TV ###

    Section "Screen"

       Identifier   "TV"

       Device      "TV-out"

       Monitor      "tele"

       DefaultDepth   24

       SubSection "Display"

                Depth      24

                Modes        "800x600"

       EndSubSection

EndSection

```

I'm probably missing a small thing but i find the xorg confs rather confusing. Thanks in advance.

----------

## count_zero

@Pajarico:

try this instead:

```
X -screen TV :1 -ac & sleep 2; DISPLAY=:1 mplayer -fs -vo x11 -zoom
```

----------

## Pajarico

Thanks. 

Ummh  :Confused:  I get the same again:

```
(EE) Screen 0 deleted because of no matching config section.

...

[1]+  Aborted                 X -screen TV :1 -ac

...

vo: couldn't open the X11 display (:1)!
```

----------

## Pajarico

*bump*

----------

## Bigun

*bookmarked*

----------

## Bigun

Ideas what this means?

```
Xlib: connection to ":1.0" refused by server
```

It refuses connection to the new X session...

----------

## Bigun

 *Pajarico wrote:*   

> Thanks. 
> 
> Ummh  I get the same again:
> 
> ```
> ...

 

Yeah, that won't work because of the twinview setup you tried.  You may want to go with the xorg.conf setup at the beginning of the howto.

*EDIT*

Also Pajarico, try running this command in a terminal after you setup your xorg.conf just like above (hit "Ctrl+Alt+Bckspce" after you have tried it):

```
X :1 -screen "TV" & sleep 4 && DISPLAY=":1" xine "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"  ; ps aux | grep "Screen TV" | grep -v grep | sed s/"root     "/""/ | cut -f1 -d' ' | xargs kill
```

I want to see if you get the same error I do when you come back to your original desktop.

----------

## Bigun

Nevermind, got it to work beautifully with mplayer-bin:

```
X -screen TV :1 -ac &

sleep 2

mplayer-bin -display :1 -vo x11 -fs -zoom "$@"; ps ax|grep 'X -screen TV'|cut -f 1 -d' '|xargs kill
```

----------

## Pajarico

Ok, as suggested by bigun89 i reverted my xorg.conf to look like the one of the first poster.

Something was going wrong, not sure about what, but also the euroconnector at the back of my TV cannot take S-video, so i have to plug it on the front of the TV, a bit annoying but it's ok.

Now the problem comes with the output. I created this script:

```
X :1 -screen TV -ac &

sleep 2

DISPLAY=":1" mplayer -fs -vo x11 foo.avi
```

The first i see is that my monitor turns off, and my TV shows the nvidia logo for a moment and then the bare X desktop (just a gray background and the x-shaped cursor. The output is positive, i don't get any errors and according to it mplayer plays the movie as expected but on the TV i don't see mplayer, i just see the X server and the cursor. Why?

It seems like the parallel X process starts, but mplayer doesn't use it. Why?

Also i see that the image has no color, althought i have set it:

```
#### TV-OUT ####

Section "Device"

    Identifier      "TV-device"

    Driver          "nvidia"

    VendorName      "Monitor Vendor"

    BoardName       "nVidia GeForce 2 Go"

    Option      "NoLogo" "true"

    Screen          0

    Option          "TVStandard" "PAL-M"

    Option      "TVOutFormat" "S-VIDEO"

   Option      "ConnectedMonitor" "TV"

EndSection 

```

Any help much appreciated.

EDIT: Additionally: Can i make the spawned the new X process to run in the background? so i can still use my monitor at the same time i play a movie.

----------

## Bigun

 *Pajarico wrote:*   

> 
> 
> ```
> X :1 -screen TV -ac &
> 
> ...

 

Try this "exact" script.

```
X -screen TV :1 -ac &

sleep 2

mplayer -display :1 -vo x11 -fs -zoom "$@"; ps ax|grep 'X -screen TV'|cut -f 1 -d' '|xargs kill
```

If worse goes to worse... open and run the script as a commandline in a terminal so you can see the output:

```
X -screen TV :1 -ac & sleep 2 && mplayer -display :1 -v 3 -vo x11 -fs -zoom <type filename here>
```

You may see some errors that explain a few things.

----------

## Pajarico

Tried both ways and i'm still getting the Xorg desktop and the x cursor.  :Crying or Very sad:  Is the same again, X starts, mplayer starts, but they don't connect to each other.

I don't see any errors with the last command, then again is too long and i might missed something. What did you expected to see?

 :Wink: 

----------

## Bigun

 *Pajarico wrote:*   

> Tried both ways and i'm still getting the Xorg desktop and the x cursor.  Is the same again, X starts, mplayer starts, but they don't connect to each other.
> 
> I don't see any errors with the last command, then again is too long and i might missed something. What did you expected to see?
> 
> 

 

I had the same issue... run the commandline on a terminal and see what text is shown, it may give a clue.

----------

## Pajarico

I did read it but didn't find anything problematic, none of xorg or mplayer gives errors.

----------

## rawoul

Pajarico, try

```
xdpyinfo | grep screen
```

You should have something like

```
default screen number:    0

number of screens:    2

screen #0:

screen #1:
```

I'm not sure what Option Clone does in your config, otherwise it seems ok.

----------

## Pajarico

Hi rawoul

Here's mine:

 *Quote:*   

> lxuser@hal2000 ~ $ xdpyinfo | grep screen
> 
> default screen number:    0
> 
> number of screens:    1
> ...

 

So i have only a screen. Shouldn't it show 2 screens?, as i have two defined screens: "Screen0" and "TV"  :Question: 

Also: remember that i'm using the config from count_zero, not yours!! I reverted to it since i screwed it up a bit, so now the config is identical (that means that clone is disabled and i have only "screen 0" defined in ServerLayout section).

Also2: in your example you are using the svideo output and the vga output as two differents screens, right? I'm just a bit confused about this as i thought i couldn't use that approach with the s-video output, only with VGA+DVI. Please confirm me this as i like your approach better.

And a last question  :Wink:  can you use the monitor and TV simultaneously with your config?

----------

## Pajarico

Hi again rawoul

Made some changes to my xorg.conf:

-Added Screen 1:

```
### X Server ###

Section "ServerLayout"

   Identifier   "Default Layout"

   Screen   0   "Screen0" 0 0

   Screen   1   "TV" LeftOf "Screen0"

EndSection

```

-Added Screen 0:

```
Section "Device"

    Identifier  "Videocard0"

    Driver      "nvidia"

    VendorName      "Monitor Vendor"

    BoardName       "nVidia GeForce 2 Go" 

    Option "CursorShadow" "true"

    Option "CursorShadowAlpha" "50"

    Option "CursorShadowXOffset" "4"

    Option "CursorShadowYOffset" "2"

    Option      "NoLogo" "true"

    Screen          0

EndSection
```

-And screen 1:

```
Section "Device"

    Identifier      "TV-device"

    Driver          "nvidia"

    VendorName      "Monitor Vendor"

    BoardName       "nVidia GeForce 2 Go"

    Option          "TVStandard" "NTSC-M"

    Option      "TVOutFormat" "SVIDEO"

    Screen       1

   Option      "ConnectedMonitor" "TV"

EndSection 

```

Restarted X and xdpyinfo | grep screen keeps telling me that i have a single screen.

----------

## rawoul

I think a geforce2go does not have dual head support, you can't display on two screens at the same time :(.

Edit: check your Xorg.0.log there should be a warning confirming this, but i'm not sure.

----------

## Pajarico

log doesn't contain anything about it.

----------

## Pajarico

If my card doesn't have dual-head support it's ok. I would prefer it, but is not really something beyond essential.

I use this post to bump the thread a bit and to say that i have checked the S-Video cable with a polimeter ans it is ok  :Rolling Eyes:  , so i don't understand why i get a black and white signal. The cable is about 9 meters long, could be that a problem? BTW, I get about 3 ohms.

Also I haven't been able to solve the mplayer issue, I still get the desktop but the player doesn't connect to it, meaning that I don't see the movie. I would think that it was a limitation in mplayer or Xorg but the startyer of this post has the same configuration and it works!!  :Shocked: 

----------

## Bigun

 *Pajarico wrote:*   

> If my card doesn't have dual-head support it's ok. I would prefer it, but is not really something beyond essential.
> 
> I use this post to bump the thread a bit and to say that i have checked the S-Video cable with a polimeter ans it is ok  , so i don't understand why i get a black and white signal. The cable is about 9 meters long, could be that a problem? BTW, I get about 3 ohms.
> 
> Also I haven't been able to solve the mplayer issue, I still get the desktop but the player doesn't connect to it, meaning that I don't see the movie. I would think that it was a limitation in mplayer or Xorg but the startyer of this post has the same configuration and it works!! 

 

Try

```

Option      "TVOutFormat" "S-VIDEO" 

```

Your missing a dash.

 *Pajarico wrote:*   

> 
> 
> ```
> Section "Device"
> 
> ...

 

Also, I had black and white only... and the cause was a bent s-video pin.  Check for that too.

----------

## Pajarico

I have added the dash, althought the README states otherwise. The pins are not bent, I moved the connectors while plugged in he TV but I don't see even interferences. Haven't checked the end attached to the card, may be a bit loose, I hope is that  :Confused:  .

And about the X display thing, I'm still lost.

----------

## Pajarico

I tried again and now i can see the video on the TV always, it seems like my card? X? mplayer? can't have two X processes running at the same time  :Shocked:  .Weird.

Now everytime i type:

```
 X -screen TV :1 -ac & sleep 2 && mplayer -display :1 -fs -zoom van.morrison-late.with.jools.holland.2005-05-27.mpg
```

..i have to do it from the console, no X running, althought I still seeing it in black and white  :Crying or Very sad: 

EDIT:

 *rawoul wrote:*   

> I think a geforce2go does not have dual head support, you can't display on two screens at the same time .
> 
> Edit: check your Xorg.0.log there should be a warning confirming this, but i'm not sure.

 

Sorry, I didn't spot this. Actually my card is a geforce 5200fx, that information is copied from the example of the first poster  :Razz: 

BTW, Is okay to crosspost this to a more appropriate section?

----------

## KrzychuG

Very helpfull topic. I configured my xorg like author proposed in first post changing few settins to our standards and i've got nice colour display, 1024x768 resolution on TV and mplayer plays movie file almost perfectly. I'm using -vo sdl to get subtiles under movie and because of that i have some weird blue box around the movie. With -vo x11 -zoom -fs it's fine, but it's too slow and subtiles are on the movie.

Since i like console a little i just made small sh script, called it tvplayer and put in /usr/bin. Now, everythime when i want to play something on tv i only have to type: tvplayer /path/to/file addition_options_to_mplayer_if_needed

```

X -screen TV :1 -ac & sleep 2; DISPLAY=:1 xset s off && DISPLAY=:1 mplayer -vo sdl -fs "$@"; ps ax | grep 'X -screen TV' | cut -f 2 -d' ' | xargs kill

```

I had to change "cut -f 1 -d' '" part to "cut -f 2 -d ' '" just because second x server wasn't killed after mplayer closed (it couldn't get proper process PID).

I also have one, small question. When i'm using sdl as video output mplayer forgets to turn off screensaver and i've got blank screen every 15 minutes. As you see i tried to turn off screensaver manually (as i usually do on primary x server) but it doesn't work in here. Any advices on that?

----------

## Pajarico

 *Quote:*   

> I also have one, small question. When i'm using sdl as video output mplayer forgets to turn off screensaver and i've got blank screen every 15 minutes. As you see i tried to turn off screensaver manually (as i usually do on primary x server) but it doesn't work in here. Any advices on that?

 

That's probably the conf file that the spawned X server reads contains a line executing xscreensaver. I had similar problems, but can't remember the eact file...

And I'm still don't know why my output is black and white...

----------

## Pajarico

I moved the computer near the TV and  outpot is colored, i moved back to my bedroom and the image is still colored. I don't know what happened but now it works!   :Wink: 

----------

