# HOWTO: Configuring NVIDIA TV-Out

## danomac

HOWTO: Configuring NVIDIA TV-Out

If you are reading this, I assume you are trying to get the TV Out working on your NVidia card. I just went through some fun with this and managed to set it up in 3 different ways. This HOWTO will attempt to describe the 3 different methods I used and their characteristics.

As more information is discovered, it will make it's way into this HOWTO. I currently don't own any new NVidia cards, I have a GeForce4 that supports TwinView.

TwinView

NVidia cards have something called TwinView. This uses some built in features in the NVidia drivers to configure the TV-Out. In it's simplest form, it can be set up as a clone of your primary display. It can also be set up as an extension of your desktop, and the resolution can be different on your primary display. Xinerama comes into play here, but not all applications are aware of this (when I checked my packages, these had xinerama support: mplayer, firefox, and thunderbird. Everything else spans over both the LCD and TV and well, it doesn't look right.  :Wink: )

Xorg

Second, Xorg also can treat the device as seperate displays. This is how I currently have my system set up: by default, my primary display is my LCD screen running at 1280x1024, and the TV-Out is unused. When I want to watch something on my TV, I start a new desktop on the TV and the control switches from my LCD Panel to my TV. When I'm finished, I end the session on the TV, and control returns to my LCD panel. (Keep in mind that my LCD panel's native resolution will not work with my TV. I've found this solution works the best for me.)

Getting Started

First of all, this guide assumes you have the NVidia drivers set up already. If you don't, it is rather meaningless continuing reading this HOWTO.

What configuration should I use?

This section is a list of possible uses and configurations you may want to try.

I'm trying to use my TV as the primary device (no LCD/CRT.) NVidia's TwinView Clone mode should work for this. This way, if you decide to hook up a CRT/LCD later you should be able to.

I just want the TV to show what the LCD/CRT is currently showing. Use NVidia's TwinView Clone mode.

I'm trying to extend my desktop onto my TV. Use NVidia's TwinView mode.

I just want to watch stuff on my TV, and don't need both LCD/CRT and TV to be active at the same time. See the Xorg screen setup below.

These are the ones I've tried, and have had working.

NVidia TwinView Clone mode

REMEMBER: this guide assumes you have the NVidia drivers set up already.

There is one restriction with Clone mode: you must use the same resolution on both your TV and LCD/CRT, which means you must choose a resolution that both devices can display. Both of my TVs will display 1024x768, but it isn't very clear. All TVs should be able to display 800x600.

First thing to do is disable xinerama in Xorg (the NVidia driver provides its own.) Search for the "ServerFlags" section in your xorg.conf, and disable Xinerama:

```

Section "ServerFlags"

   ...

   Option "Xinerama" "false"

   ...

EndSection

```

With that out of the way, we need to set up the Monitor, Device, and Screen sections in xorg.conf to enable clone mode, an example is below, setting clone mode to 1024x768:

```

Section "Monitor"

    Identifier  "NEC LCD1760V"

    HorizSync   31.5-81.1

    VertRefresh 56-75

EndSection

Section "Device"

    Identifier  "ASUS GEFORCE4"

    Driver      "nvidia"

    VideoRam    65536

    BusID "PCI:2:0:0"

    Screen 0

    Option "TwinView" "true"

    Option "TwinViewOrientation" "clone"

    Option "MetaModes" "1024x768,1024x768; 800x600,800x600; 640x480,640x480"

    Option "SecondMonitorHorizSync" "30-50"

    Option "SecondMonitorVertRefresh" "60"

    Option "TVOutFormat" "SVIDEO"

    Option "TVStandard" "NTSC-M"

EndSection

Section "Screen"

    Identifier  "Screen 1"

    Device      "ASUS GEFORCE4"

    Monitor     "NEC LCD1760V"

    DefaultDepth 24

    Subsection "Display"

        Depth       24

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

        ViewPort    0 0

    EndSubsection

EndSection

```

Notes:

For the Monitor section, make sure you set the correct values for the refresh rates (HorizSync/VertRefresh)! The ones shown work with my monitor, but not necessarily yours!

You might have to change VideoRAM and BusID to suit your card.

If your TV can't display 1024x768, remove 1024x768,1024x768; from the MetaModes line in the Device section, and "1024x768" from the Modes line in the Screen section. This should force Xorg to start in 800x600.

Output type: In this example, I am using the SVIDEO output, as stated by the TVOutFormat line in the Device section. The other valid value is COMPOSITE (which is usually a yellow RCA plug.)

Region issues: The SecondMonitorHorizSync, SecondMonitorVertRefresh, and TVStandard lines in the Device section are for TVs in North America. You may need to change these values for your region.

NVidia TwinView mode

REMEMBER: this guide assumes you have the NVidia drivers set up already.

First thing to do is disable xinerama in Xorg (the NVidia drivers provides its own.) Search for the "ServerFlags" section in your xorg.conf, and disable Xinerama:

```

Section "ServerFlags"

   ...

   Option "Xinerama" "false"

   ...

EndSection

```

Here is a sample xorg.conf that extends the desktop on the TV to the right of the LCD/CRT (the LCD/CRT has a resolution of 1280x1024, the TV 800x600):

```

Section "Monitor"

    Identifier  "NEC LCD1760V"

    HorizSync   31.5-81.1

    VertRefresh 56-75

EndSection

Section "Device"

    Identifier  "ASUS GEFORCE4"

    Driver      "nvidia"

    VideoRam    65536

    BusID "PCI:2:0:0"

    Screen 0

    Option "TwinView"

    Option "MetaModes" "1280x1024,800x600"

    Option "TwinViewOrientation" "RightOf"

    Option "SecondMonitorHorizSync" "30-50"

    Option "SecondMonitorVertRefresh" "60"

    Option "TVOutFormat" "SVIDEO"

    Option "TVStandard" "NTSC-M"

    Option "Xinerama" "on"

EndSection

Section "Screen"

    Identifier  "Screen 1"

    Device      "ASUS GEFORCE4"

    Monitor     "NEC LCD1760V"

    DefaultDepth 24

    Subsection "Display"

        Depth       24

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

        ViewPort    0 0

    EndSubsection

EndSection

```

Notes:

For the Monitor section, make sure you set the correct values for the refresh rates (HorizSync/VertRefresh)! The ones shown work with my monitor, but not necessarily yours!

You might have to change VideoRAM and BusID to suit your card.

You can change where the TV is by changing the TwinViewOrientation line in the Device section to something else, such as "LeftOf".

To change the resolution, set the MetaModes line in the Device section. As an example, to set the monitor to 1024x768 and the TV to 640x480, try using Option "MetaModes" "1024x768,640x480".

Output type: In this example, I am using the SVIDEO output, as stated by the TVOutFormat line in the Device section. The other valid value is COMPOSITE (which is usually a yellow RCA plug.)

Region issues: The SecondMonitorHorizSync, SecondMonitorVertRefresh, and TVStandard lines in the Device section are for TVs in North America. You may need to change these values for your region.

You might want to add the xinerama use flag to your make.conf and recompile applications that support it. Otherwise, they will span over both monitors when maximized.

Xorg screen setup

REMEMBER: this guide assumes you have the NVidia drivers set up already.

First thing to do is disable xinerama in Xorg. Search for the "ServerFlags" section in your xorg.conf, and disable Xinerama:

```

Section "ServerFlags"

   ...

   Option "Xinerama" "false"

   ...

EndSection

```

This section will show how to set up your X server to use the TV as a completely seperate display, and switch to it when needed. To do this, we need to define two Monitor sections, and two Screen sections in addition to the Device and ServerLayout sections.

First, we define the video device (change the VideoRam and BusID if necessary):

```

Section "Device"

    Identifier  "ASUS GEFORCE4"

    Driver      "nvidia"

    VideoRam    65536

    BusID "PCI:2:0:0"

    Screen 0

EndSection

```

Now we need to define the two monitors, the LCD/CRT and the TV. Set your monitor's refresh rates accordingly! Also, you may need to change the TV's refresh rates (the ones shown are for North America):

```

Section "Monitor"

    Identifier  "NEC LCD1760V"

    HorizSync   31.5-81.1

    VertRefresh 56-75

EndSection

Section "Monitor"

     Identifier "nvidiatv"

     HorizSync 30-50

     VertRefresh 60

EndSection

```

Now that we have the Monitors and the Video Card defined, now we need to associate them in the Screen section, and define the valid resolutions. When defining the TV section, note the TVStandard setting; the example is shown for North America. Change it if needed.

```

Section "Screen"

    Identifier  "CRT"

    Device      "ASUS GEFORCE4"

    Monitor     "NEC LCD1760V"

    DefaultDepth 24

    Subsection "Display"

        Depth       24

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

        ViewPort    0 0

    EndSubsection

EndSection

Section "Screen"

    Identifier "TV"

    Device "ASUS GEFORCE4"

    Monitor "nvidiatv"

    DefaultDepth 24

    Option "TVStandard" "NTSC-M"

    Option "ConnectedMonitor" "TV"

    Subsection "Display"

        Depth 24

        Modes "800x600"

        ViewPort 0 0

    EndSubSection

EndSection

```

Now we need to tell X to use the CRT when starting up, in the ServerLayout section.

```

Section "ServerLayout"

    Identifier  "Simple Layout"

    Screen "CRT"

    InputDevice "Mouse1" "CorePointer"

    InputDevice "Keyboard1" "CoreKeyboard"

EndSection

```

Now that the configuration is out of the way, we need to make sure X will load the desktop when it starts. If you haven't done this, now is the time to do it:

```

computer ~ # echo "exec startkde" > ~/.xinitrc

```

Now you should be able to start X and it will load up on your LCD/CRT. Now, to test the TV, turn the TV on, fire up a console and tell X to start a new desktop on it using:

```

computer ~ # startx -- :1 -bpp 24 -screen TV

```

If all is successful, your LCD/CRT will blank, and you will see your desktop loading up on your TV. To return to your LCD/CRT, end your session and the TV will turn off and your monitor will turn on.

Now, I'm rather lazy, so I have copied the startx command into a script, and created an entry on my KDE menu. When I click on it, the desktop starts on the TV.  :Wink:  To do this, copy this into /usr/bin/watchtv:

```

#!/bin/bash

startx -- :1 -bpp 24 -screen TV

```

and then make it executable:

```

computer ~ # chmod +x /usr/bin/watchtv

```

With this done, load up your KDE Menu Editor (or other WM Menu Editor) and add an entry, pointing to the script you just created. If you are using KDE, you might want to make sure the Enable launch feedback is unchecked.

Conclusion

Hopefully one of the 3 solutions presented here will work for you. I found switching the desktop over to the TV was the easiest for me; I would just use my wireless keyboard on the couch and choose stuff to watch.Last edited by danomac on Tue Jan 03, 2006 7:12 am; edited 2 times in total

----------

## cokey

Dude, that's great. All i need now is to get the sound working! I've bought what seems like worlds most expensive mobo and i can hear fuck-all!

HELP!!!

----------

## przeuj

Anyone knows how to start a KDE session with the last step? I am pretty sure that I would find this sooner or later, but maybe someone could help?

thanks,

Bart

----------

## Gitly

 *przeuj wrote:*   

> Anyone knows how to start a KDE session with the last step? I am pretty sure that I would find this sooner or later, but maybe someone could help?

 

```
echo "exec startkde" >> ~/.xinitrc
```

----------

## Bad Penguin

Per the nvidia documentation, you can find out what TV modes are supported by your chipset via:

```
startx -- -logverbose 5
```

You have to be hooked up to the tv before doing that, of course.   Control-c out then check /var/log/Xorg.0.log (if you are on screen 0) for the lines stating the TV modes supported.  If you have an HD tv and it is supported by your nvidia chipset, you are in luck  :Smile: 

All of this is documented in /usr/share/doc/nvidia-kernel-YOUR-VERSION/readme.gz

----------

## danomac

Oops, I forgot to mention .xinitrc for starting KDE. Changed the howto.

----------

## przeuj

Thanks!  :Smile: 

Bart

----------

## i4dnf

nvidia supports panning on the secondary display so it can have different resolutions even in clone mode (useful if you want to have your desktop at a resolution higher than 1024x1024)

 the  Metamodes  line in this case could look like this:

```
Option   "MetaModes" "1280x960,1024x768 @1280x960;1152x864,1024x768 @1152x864;1024x768,1024x768;"
```

----------

## odinriko

How would I make it so that nothing appears on the tv?  I am using "xorg screen setup"  and gnome appears on both my monitor and my tv.  I want nothing to appear on my tv unless directly called.  Is it somehow possible to make .xinitrc check for the DISPLAY variable?  To make it so that if DISPLAY=:0 then start gnome-session, elseif load fbsetroot --color black?

Urgh.  I wish I knew better scripting.

----------

## cal22cal

To make it so that nothing appears on the tv.

Here is my xorg.conf. Might be you can clean it up a bit.

```
Section "ServerLayout"

   Identifier "Multihead layout"

        Option "BlankTime" "0"

        Option "StandbyTime" "0"

        Option "SuspendTime" "0"

        Option "OffTime" "0"

   Screen 0 "Screen0" 0 0

   Screen 1 "Screen1"

   InputDevice "Mouse0" "CorePointer"

   InputDevice "Keyboard0" "CoreKeyboard"

   #Option "Xinerama" "on"

   #Option "Clone" "off"

EndSection

Section "Files"

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

   ModulePath "/usr/X11R6/lib/modules/extensions/nvidia"

   ModulePath "/usr/X11R6/lib/modules"

        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/CID/"

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

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

EndSection

Section "Module"

   #Load "dri"

   Load "dbe"

   Load "extmod"

   Load "fbdevhw"

   Load "record"

   SubSection   "extmod"

            Option   "omit xfree86-dga"

   EndSubSection

   Load "freetype"

   Load "type1"

   Load "v4l"

   Load "glx"

EndSection

Section "InputDevice"

   Identifier "Keyboard0"

   Driver "kbd"

   Option "XkbModel" "pc105"

EndSection

Section "InputDevice"

   Identifier "Mouse0"

   Driver "mouse"

   Option "Protocol" "IMPS/2"

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

   Option "ZAxisMapping" "4 5"

   Option "Emulate3Buttons" "yes"

EndSection

Section "Monitor"

   Identifier "Monitor0"

   VendorName "Monitor Vendor"

   ModelName "LCD Panel 1280x1024"

        HorizSync 39-75

        VertRefresh 50-150

   #Option "dpms"

   #Option "ConnectedMonitor" "DFP-0"

EndSection

Section "Monitor"

   Identifier "TV"

   VendorName "Monitor Vendor"

   ModelName "TV"

   HorizSync 30.0 - 50.0

   VertRefresh 60.0 - 60.0

   #Option "dpms"

   Option "ConnectedMonitor" "TV"

EndSection

Section "Device"

   Identifier "Videocard0"

   Driver "nvidia"

   VendorName "Videocard Vendor"

   BoardName "NVIDIA GeForce FX5200"

   Option "ConnectedMonitor" "CRT"

        Option "NvAGP" "3"

        Option "NoLogo" "1"

   Option "RenderAccel" "true"

   Option "AllowGLXWithComposite" "true" 

   Option "IgnoreDisplayDevices" "TV"          # very important

   BusID "PCI:1:0:0"

EndSection

Section "Device"

   Identifier "Videocard1"

   Driver "nvidia"

   VendorName "Videocard Vendor"

   BoardName "NVIDIA GeForce FX5200"

   Option "ConnectedMonitor" "TV"

        Option "NvAGP" "3"

        Option "NoLogo" "1"

   Option "RenderAccel" "true"

   Option "AllowGLXWithComposite" "true" 

   BusID "PCI:1:0:0"

   Screen 1

EndSection

Section "Screen"

   Identifier "Screen0"

   Device "Videocard0"

   Monitor "Monitor0"

   DefaultDepth 24

   Option "ConnectedMonitor" "CRT"

   SubSection "Display"

      Viewport 0 0

      Depth 24

      #Modes "1280x1024" "1152x864" "1152x768" "1024x768" "800x600" "640x480"

      Modes "1280x1024" "1152x768" "1024x768" "800x600" 

   EndSubSection

   SubSection "Display"

      Viewport 0 0

      Depth 24

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

   EndSubSection

EndSection

Section "Screen"

   Identifier "Screen1"

   Device "Videocard1"

   Monitor "TV"

   DefaultDepth 24

   #Option "TVStandard" "PAL-G"

   Option "TVStandard" "NTSC-M"

   Option "ConnectedMonitor" "TV"

   #Option "TVOutFormat" "COMPOSITE"

   Option "TVOutFormat" "SVIDEO" 

   SubSection "Display"

      Depth 24

      Modes  "640x480"

      #Modes  "800x600"

   EndSubSection

EndSection

Section "DRI"

   Group 0

   Mode 0666

EndSection
```

Watch movies 

```
DISPLAY=:0.1 vlc
```

http://gentoo-wiki.com/HOWTO_Dual_Monitors#Moving_focus_between_screens

Using the switchscreen utility to jump the mouse to TV by a shortcut key.

Move the mouse to the right side of the TV get back to DISPLAY:=0.0

Edit:- Post complete xorg.confLast edited by cal22cal on Fri Jan 20, 2006 3:37 am; edited 2 times in total

----------

## odinriko

This hurts my head.  Here is my current xorg.conf

```
# nvidia-xconfig: X configuration file generated by nvidia-xconfig

# nvidia-xconfig:  version 1.0  (odin@fenrir)  Sun Jan 15 04:00:22 MST 2006

Section "ServerFlags"

   Option "Xinerama" "false"

EndSection 

#Section "Extension"

#   Option "Composite"

#EndSection

#Section "ServerLayout"

#    Identifier     "Monitor Only"

#    Screen         "Monitor" 

#    InputDevice    "Mouse0" "CorePointer"

#    InputDevice    "Keyboard0" "CoreKeyboard"

#EndSection

#Section "ServerLayout"

#    Identifier     "Stretch"

#    Screen         "Stretch" 

#    InputDevice    "Mouse0" "CorePointer"

#    InputDevice    "Keyboard0" "CoreKeyboard"

#EndSection

Section "ServerLayout"

    Identifier     "Dual"

    Screen       0  "Monitor" 0 0

    Screen    1  "TV" 

    InputDevice    "Mouse0" "CorePointer"

    InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

#Section "ServerLayout"

#   Identifier     "Clone"

#    Screen         "Clone" 

#    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/"

EndSection

Section "Module"

    Load           "glx"

    Load           "record"

    Load           "extmod"

    Load           "dbe"

#   Load  "dri"

    Load           "xtrap"

    Load           "freetype"

    Load           "type1"

EndSection

Section "InputDevice"

    Identifier     "Keyboard0"

    Driver         "kbd"

EndSection

Section "InputDevice"

    Identifier     "Mouse0"

    Driver         "mouse"

    Option         "Protocol" "auto"

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

    Option         "ZAxisMapping" "4 5"

EndSection

Section "Monitor"

    Identifier     "Monitor"

    VendorName     "Monitor Vendor"

    ModelName      "Monitor Model"

EndSection

Section "Monitor"

       Identifier   "TV-out"

       VendorName   "Monitor Vendor"

       ModelName    "Monitor 1024x768"

       HorizSync    30.0 - 50.0

       VertRefresh  60.0 - 60.0

       Option      "dpms"

EndSection

Section "Device"

    Identifier     "svga"

    Driver      "nvidia"

    VendorName  "Nvidia"

    BoardName   "Nvidia GeForce FX (generic)"

    Option      "IgnoreDisplayDevices" "TV-out. TV, tv-out"   

    Screen 0

EndSection

Section "Device"

       Identifier  "tv-out"

       Driver      "nvidia"

       Option      "NoLogo" "1"

       Option      "TVStandard" "NTSC-M"

       Option      "TVOutFormat" "S-Video"

       VendorName  "Videocard Vendor"

       BoardName   "NVIDIA GeForce FX (generic)"

       BusID       "PCI:1:0:0"

       Screen      1

EndSection

Section "Device"

    Identifier     "stretch"

    Driver      "nvidia"

   Option "TwinView"

   Option "MetaModes" "1024x768,1024x768"

   Option "TwinViewOrientation" "LeftOf"

   Option "SecondMonitorHorizSync" "30-50"

   Option "SecondMonitorVertRefresh" "60"

   Option "TVOutFormat" "SVIDEO"

   Option "TVStandard" "NTSC-M"

   Option "Xinerama" "on" 

    VendorName  "Nvidia"

    BoardName   "Nvidia GeForce FX (generic)"

    Screen 0

EndSection

Section "Device"

    Identifier     "clone"

    Driver      "nvidia"

   Option "TwinView"

   Option "MetaModes" "1024x768,1024x768"

   Option "TwinViewOrientation" "Clone"

   Option "SecondMonitorHorizSync" "30-50"

   Option "SecondMonitorVertRefresh" "60"

   Option "TVOutFormat" "SVIDEO"

   Option "TVStandard" "NTSC-M"

   Option "Xinerama" "on" 

    VendorName  "Nvidia"

    BoardName   "Nvidia GeForce FX (generic)"

    Screen 0

EndSection

####################END DEVICE#######################

Section "Screen"

    Identifier     "Monitor"

    Device         "svga"

    Monitor        "Monitor"

    DefaultDepth    24

    Option         "NoLogo" "1"              # [<bool>]

    Option         "AllowGLXWithComposite" "1"   # [<bool>]

    SubSection     "Display"

        Viewport    0 0

        Depth       24

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

    EndSubSection

EndSection

Section "Screen"

       Identifier "TV"

       Device     "tv-out"

       Monitor    "TV-out"

       DefaultDepth     24

       SubSection "Display"

               Viewport   0 0

               Depth     24

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

       EndSubSection

EndSection

Section "Screen"

   Identifier "Stretch"

        Device         "stretch"

        Monitor        "Monitor"

        DefaultDepth    24

   SubSection "Display"

               Viewport   0 0

               Depth     24

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

   EndSubSection

EndSection

Section "Screen"

   Identifier "Clone"

        Device         "clone"

        Monitor        "Monitor"

        DefaultDepth    24

   SubSection "Display"

               Viewport   0 0

               Depth     24

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

   EndSubSection

EndSection

```

I don't understand what I'm doing wrong.  When I run startx it loads Gnome on both displays.

----------

## cal22cal

Post the complete xorg.conf in my previous message. 

Backup yours and try that one.

Hope it helps.

----------

## odinriko

Sorry about the long delay.  (I had a hd crash, then holy heck just getting everything working at all again)

Your xorg.conf gives me the same effect.  

1 gnome session on my monitor

1 gnome session on my tv.

I'm trying to get my tv to be unmanaged.

I want a gnome session on my monitor and a blank, but callable screen on my tv.

----------

## antineutrino

I can't can't can't can't can't can't get my TV-OUT to work!

it's really frustrating!

here is what I would like:

either an 800x600 clone of my 1600x1200 CRT on the TV

OR

the option of simply viewing movies on my TV.

right now my problem is that, when trying clone mode, my TV displays only a small portion of the screen AND is in BLACK and WHITE!  :Sad: 

here are a few of my errors (Xorg.0.log):

 *Quote:*   

> 
> 
> (II) NVIDIA(0): Not using default mode "1600x1200" (hsync out of range)
> 
> (II) NVIDIA(0): Not using default mode "800x600" (hsync out of range)
> ...

 

and here is my xorg.conf

 *Quote:*   

> 
> 
> cat /etc/xorg.conf  | grep -v "#" | grep -v "^$"
> 
> Section "ServerLayout"
> ...

 

----------

## antineutrino

If on the other hand I have two screens in my xorg.conf

like so:

```

Section "Device"

        Option     "RenderAccel"

        Option     "HWcursor"

        Option     "CursorShadow"

        Option     "CursorShadowAlpha" "32"

        Option     "CursorShadowXOffset" "3"

        Option     "CursorShadowYOffset" "3"

        Identifier  "Card0"

        Driver      "nvidia"

        Screen      0

        VendorName  "nVidia Corporation"

        Option "Coolbits" "1"

        Option          "NoLogo"

EndSection

Section "Device"

    Driver          "nvidia"

    Identifier      "card1"

    Option          "ConnectedMonitor" "TV"

EndSection

Section "Screen"

        Identifier "Screen0"

        Device     "Card0"

        Monitor    "Monitor0"

        DefaultDepth 24

        SubSection "Display"

                Viewport   0 0

                Modes "1600x1200" "1280x1152" "1280x1024" "1024x768" "800x600" "640x480"

                Depth     24

        EndSubSection

EndSection

Section "Screen"

   Device "card1"

   Identifier "TV"

   Monitor "TV"

   DefaultDepth 24

   SubSection "Display"

       Depth 24

       Modes "800x600"

       Viewport   0 0

   EndSubSection

EndSection

```

my monitor goes black when I start my TV display AND IT'S STILL BLACK AND WHITE!!!! :((((((

*help*

*please*

----------

## antineutrino

as usual, once I start posting questions I find the solution before anyone answers  :Wink: 

here it is for all who care:

TV-OUT, no color, black and white, the solution:

http://camp0s.altervista.org/sVideo/sVideo.htm

 :Smile: 

now all I would like to know is how I can watch movies on the TV without loosing my CRT display. (I gave up on clone mode - I can't get full screen on both with different resolutions - and scrolling around a big virtual screen is annoying.....)

cheers

aron

----------

## odinriko

Heres my setup.  I have it setup so that if X is called normally, it will use only my monitor, but if I do 

```
startx -- -layout dual
```

X will start on both my screens.

Also if you use exactly my setup, you can try out the layouts stretch and clone and see if they work nicely for you as well.

```
Section "ServerFlags"

   Option "Xinerama" "false"

EndSection

#Section "Extension"

#   Option "Composite"

#EndSection

Section "ServerLayout"

    Identifier     "Monitor Only"

    Screen         "Monitor"

    InputDevice    "Mouse0" "CorePointer"

    InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerLayout"

    Identifier     "Stretch"

    Screen         "Stretch"

    InputDevice    "Mouse0" "CorePointer"

    InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerLayout"

    Identifier     "Dual"

    Screen       0  "Monitor" 0 0

    Screen    1  "TV"

    InputDevice    "Mouse0" "CorePointer"

    InputDevice    "Keyboard0" "CoreKeyboard"

EndSection

Section "ServerLayout"

   Identifier     "Clone"

    Screen         "Clone"

    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/"

EndSection

Section "Module"

    Load           "glx"

    Load           "record"

    Load           "extmod"

    Load           "dbe"

#   Load  "dri"

    Load           "xtrap"

    Load           "freetype"

    Load           "type1"

EndSection

Section "InputDevice"

    Identifier     "Keyboard0"

    Driver         "kbd"

EndSection

Section "InputDevice"

    Identifier     "Mouse0"

    Driver         "mouse"

    Option         "Protocol" "auto"

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

    Option         "ZAxisMapping" "4 5"

EndSection

Section "Monitor"

    Identifier     "Monitor"

    VendorName     "Monitor Vendor"

    ModelName      "Monitor Model"

EndSection

Section "Monitor"

       Identifier   "TV-out"

       VendorName   "Monitor Vendor"

       ModelName    "Monitor 1024x768"

       HorizSync    30.0 - 50.0

       VertRefresh  60.0 - 60.0

       Option      "dpms"

EndSection

Section "Device"

    Identifier     "svga"

    Driver      "nvidia"

    VendorName  "Nvidia"

    BoardName   "Nvidia GeForce FX (generic)"

    Option      "IgnoreDisplayDevices" "TV-out. TV, tv-out"   

    Screen 0

EndSection

Section "Device"

       Identifier  "tv-out"

       Driver      "nvidia"

       Option      "NoLogo" "1"

       Option      "TVStandard" "NTSC-M"

       Option      "TVOutFormat" "S-Video"

       VendorName  "Videocard Vendor"

       BoardName   "NVIDIA GeForce FX (generic)"

       BusID       "PCI:1:0:0"

       Screen      1

EndSection

Section "Device"

    Identifier     "stretch"

    Driver      "nvidia"

   Option "TwinView"

   Option "MetaModes" "1024x768,1024x768"

   Option "TwinViewOrientation" "LeftOf"

   Option "SecondMonitorHorizSync" "30-50"

   Option "SecondMonitorVertRefresh" "60"

   Option "TVOutFormat" "SVIDEO"

   Option "TVStandard" "NTSC-M"

   Option "Xinerama" "on"

    VendorName  "Nvidia"

    BoardName   "Nvidia GeForce FX (generic)"

    Screen 0

EndSection

Section "Device"

    Identifier     "clone"

    Driver      "nvidia"

   Option "TwinView"

   Option "MetaModes" "1024x768,1024x768"

   Option "TwinViewOrientation" "Clone"

   Option "SecondMonitorHorizSync" "30-50"

   Option "SecondMonitorVertRefresh" "60"

   Option "TVOutFormat" "SVIDEO"

   Option "TVStandard" "NTSC-M"

   Option "Xinerama" "on"

    VendorName  "Nvidia"

    BoardName   "Nvidia GeForce FX (generic)"

    Screen 0

EndSection

####################END DEVICE#######################

Section "Screen"

    Identifier     "Monitor"

    Device         "svga"

    Monitor        "Monitor"

    DefaultDepth    24

    Option         "NoLogo" "1"              # [<bool>]

    Option         "AllowGLXWithComposite" "1"   # [<bool>]

    SubSection     "Display"

        Viewport    0 0

        Depth       24

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

    EndSubSection

EndSection

Section "Screen"

       Identifier "TV"

       Device     "tv-out"

       Monitor    "TV-out"

       DefaultDepth     24

       SubSection "Display"

               Viewport   0 0

               Depth     24

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

       EndSubSection

EndSection

Section "Screen"

   Identifier "Stretch"

        Device         "stretch"

        Monitor        "Monitor"

        DefaultDepth    24

   SubSection "Display"

               Viewport   0 0

               Depth     24

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

   EndSubSection

EndSection

Section "Screen"

   Identifier "Clone"

        Device         "clone"

        Monitor        "Monitor"

        DefaultDepth    24

   SubSection "Display"

               Viewport   0 0

               Depth     24

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

   EndSubSection

EndSection 

```

----------

## batistuta

antineutrino, your problem is easy to solve. You need to set the metamodes correctly in clone mode, then when switching resolution to a lower mode using control+shitf+"- key" will show on your CRT less than what you had before, but you can pan around. So your icons and stuff don't get messed up in your desktop, but you see part of it. The same gets cloned on your TV. The beautiful thing about this, is that when resizing mplayer, VLC, etc, they all get resized to what you see, not the full virtual resolution. So you see full screen on your TV   :Very Happy: 

Search in google for examples with metamode (and please post your answer), I don't have access to my box right now to post my xorg.cong   :Rolling Eyes: 

----------

## dreadhead

Hi!

Is there also the possibility to use two Monitors (Twinview) plus a separate Screen on the TV-Out?

I have a working TwinView-Setup with my two Monitors. Now I would like to start a mythfrontend on the TV-Out connected to my TV. The TV-Out doesn't need to have InputDevices like Mouse or Keyboard since I use lirc for Mythtv. I tested it with this config-file:

```
Section "ServerLayout"

   Identifier "Simple Layout"

   Screen 0 "Screen Monitor"

   Screen 1 "Screen TV" LeftOf "Screen Monitor"

EndSection

Section "Monitor"

   Identifier "Belinea"

   HorizSync 30-95

   VertRefresh 30-150

EndSection

Section "Monitor"

   Identifier "Siemens"

   HorizSync 60-90

   VertRefresh 70-110

EndSection

Section "Monitor"

   Identifier "TV"

   HorizSync 60

   VertRefresh 30-150

EndSection

Section "Device"

   Identifier "Nvidia Monitor"

   Driver "nvidia"

#   Screen 0

   BusID "PCI:01:00:00"

   Option "TwinView"

   Option "MetaModes" "1280x1024 @1280x1024, 1600x1200"

   Option "TwinViewOrientation" "RightOf"

   Option "SecondMonitorHorizSync 60-90

   Option "SecondMonitorVertRefresh 70-110

EndSection

Section "Device"

   Identifier "Nvidia TV"

   Driver "nvidia"

#   Screen 1

   Option "TVOutFormat" "Composite"

   Option "TVStandard" "PAL-G"

   Option "ConnectedMonitor" "TV"

   BusID "PCI:01:00:00"

EndSection

Section "Screen"

   Identifier "Screen Monitor"

   Device "Nvidia Monitor"

   Monitor "Belinea"

   DefaultDepth 24

   SubSection "Display"

      Depth 24

      Modes "1280x1024"

      ViewPort 0 0

   EndSubSection

EndSection

Section "Screen"

   Identifier "Screen TV"

   Device "Nvidia TV"

   Monitor "TV"

   DefaultDepth 24

   SubSection "Display"

      Depth 24

      Modes "800x600"

   EndSubSection

EndSection

```

If I uncomment the Screen-Parameters in the Device-Section I have two Screens: One on the First Monitor and one on the TV. The second Monitor is off. If I leave them commented I have a working TwinView setup but my TV is off. I have tried to change the Screen ID's but I couldn't figure out a working config for my needs. 

Does anybody here have an idea how I could realize this?

Thanks!

----------

## ___c___

Excellent How-to. I followed option 4 and it works great. 

There is just one small detail bugging me: there is a blue line on the left and top edge of the picture when i use the TVOUT.

On my CRT the image is perfect. I suspect it may be due to wrong refresh rate ... but i have no idea what the right ones are for my TV.

I'm gonna post the relevant part of my conf file ... maybe someone can spot the problem   :Smile: 

```

Section "Monitor"

    Identifier  "Monitor-CRT"

    HorizSync   31.5 - 150.0

    VertRefresh 40-75

EndSection

Section "Monitor"

    Identifier  "Monitor-TV"

    HorizSync   30-50

    VertRefresh 60

EndSection

Section "Device"

        Identifier  "Videocard0"

        Driver      "nvidia"

        VendorName  "Videocard vendor"

        BoardName   "nVidia Corporation NV34M [GeForce FX Go5200]"

        Screen  0

        BusID   "PCI:1:0:0"

EndSection

Section "Screen"

    Identifier  "CRT"

    Device      "Videocard0"

    Monitor     "Monitor-CRT"

    DefaultDepth 24

    Subsection "Display"

        Depth       8

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

    EndSubsection

    Subsection "Display"

        Depth       16

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

    EndSubsection

    Subsection "Display"

        Depth       24

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

    EndSubsection

    Subsection "Display"

        Depth       32

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

    EndSubsection

EndSection

Section "Screen"

    Identifier  "TV"

    Device      "Videocard0"

    Monitor     "Monitor-TV"

    DefaultDepth 16

    Option          "TVStandard" "PAL-B"

    Option          "TVOutFormat" "S-VIDEO"

    Option          "ConnectedMonitor" "TV"

    Subsection "Display"

        Depth 16

        Modes "800x600"

        ViewPort 0 0

    EndSubSection

EndSection

```

----------

## danomac

I believe PAL-B's VertRefresh is 50, but I have no idea about the HorizSync - maybe you should try googling it (or maybe someone else here knows.)

----------

## ___c___

from what i've found on the net it seems that the vert refresh of PAL-B is indeed 50 but it didn't work for me.

i've tried another config commonly found in PAL-B xorg.conf (H 60 & V 30-150)and it worked but didn't remove those lines.

i've tried changing depth to 24 and also changing resolution to 640x480 but that didn't help.

it's not that big of a problem though ... maybe it's just my TV getting old   :Confused: 

----------

## ___c___

i've also tried playing with the nvidia-settings but it had no influences.

----------

## batistuta

I've used the metamode configuration for some months with some success. That is, I have my desktop at 1280x1024 but only shows 1024x768 and panns the rest. gmplayer, when going fullscreen, goes to the metamode 1024x768 so I can watch my movie on full screen on the TV. But all other players, kaffeine, kmplayer, VLC, etc, they go to 1280x1024 when going fullscreen. That is, they don't give a sh*t about the metamode. Is there any option that I need to pass to mplayer so that it fullscreens to the metamode rather than the whole resolution?   :Rolling Eyes: 

----------

## dreadhead

Hi!

Try changing the Overscan. It removes some black borders on your tv-screen. Sometimes it helps also for the blue lines since they are outside the visible area. This is my config for example:

```
Section "Device"

        Identifier "Nvidia TV"

        Driver "nvidia"

        Option "ConnectedMonitor" "TV"

        Option "NvAgp" "1"

        Option "TVOutFormat" "SVIDEO"

        Option "TVStandard" "PAL-B"

        Option "TVOverscan" "0.9"

        Option "XvmcUsesTextures" "0"

        BusID "PCI:1:0:0"

EndSection

```

If there are still blue lines you could try this:

```
/usr/bin/xvattr -a XV_COLORKEY -v 0
```

Hope this helps.

dreadhead

----------

## ___c___

thanks dreadhead!

i had no luck with the TVOverscan but i've put this command in my xinitrc 

```
/usr/bin/xvattr -a XV_COLORKEY -v 0
```

and now the blue lines are gone in both mplayer and xine   :Smile: 

----------

