Gentoo Wiki


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc

Cause I only want to use the TV-screen sometimes (watching videos with mplayer) and continue working on the monitor here explaination of the configuration for 2 seperate sessions. See nvidia drivers README for more info on the nvidia driver options (SVIDEO, PAL-I etc). Use the latest 8.16.xx version of drivers with ATI cards.

add a second monitor:

File: /etc/X11/XF86Config or /etc/X11/xorg.conf

add a second monitor:

 Section "Monitor" 
    Identifier "Monitor[0]" #CRT 
    HorizSync 30-95 
    VertRefresh 50-160 
 Section "Monitor" 
    Identifier "Monitor[1]" #TV 
    HorizSync 30-95
    VertRefresh 60

now add your tv-out-device:

Section "Device" 
   Identifier      "Device[0]" 
   Driver          "nvidia" 
   BusID           "PCI:01:00:00" #adjust using 'lspci' or cat /proc/pci 
   Screen 0 
Section "Device" 
   Driver          "nvidia" 
   Identifier      "Device[1]" 
   Screen 1 
   Option          "TVOutFormat" "Composite" #or SVIDEO etc 
   Option          "TVStandard" "PAL-G" #or NTSC, PAL-I for uk etc 
   Option          "ConnectedMonitor" "TV" 
   BusID           "PCI:01:00:00" #adjust using 'lspci' or cat /proc/pci 

and a second screen ..

Section "Screen" 
   Identifier  "Screen[0]" 
   Device      "Device[0]" 
   Monitor     "Monitor[0]" 
   DefaultDepth 24 
   Subsection "Display" 
       Depth       24 
       Modes       "1600x1200" 
       ViewPort    0 0 
Section "Screen" 
   Device "Device[1]" 
   Identifier "Screen[1]" 
   Monitor "Monitor[1]" 
   DefaultDepth 24 
       SubSection "Display" 
               Depth 24 
               Modes "1024x768" 

change your serverlayout:

Section "ServerLayout" 
   Identifier  "Simple Layout" 
       Screen 0 "Screen[0]" 
       Screen 1 "Screen[1]" RightOf "Screen[0]" 
   InputDevice "Mouse1" "CorePointer" 
   InputDevice "Keyboard1" "CoreKeyboard" 

ok should work, start x, you will have a session of your windowmanager on your monitor,and a separate on your tv. by moving your cursor to the right side, you get into the second session.

programs can be easily opened, by:

$ DISPLAY=:0.1 mplayer bla.avi

If you want it to be easier to play tvout, you can add this to your ~/.bashrc

alias tv="DISPLAY=:0.1 mplayer -fs"

This make tvout very simple to fire up. Just:

$ tv file.avi

If you want multiple files playing then just add "playlist" to your definition of tv in ~/.bashrc

An equivalent alias for tcsh users, to be put in their .tcshrc, is:

alias tv "setenv DISPLAY :0.1;mplayer -fs \!*;setenv DISPLAY :0.0"


Original Forum Post by piefke


Concerns or Compliments? Please use the Discussion section.

The option in the device section for using the s-video ouput is not correct. There it is "S-VIDEO", it should be "SVIDEO" [FIXED]

Stef Bon

Retrieved from ""

Last modified: Sat, 15 Apr 2006 11:45:00 +0000 Hits: 41,763