个人工具

“UbuntuHelp:NvidiaTVOut”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(New page: {{From|https://help.ubuntu.com/community/NvidiaTVOut}} {{Languages|php5}} With this howto for your Nvidia graphic card, you can view X simultaneously on your monitor and TV. === Using Twi...)
 
第7行: 第7行:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
 
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
</nowiki></code>
+
</nowiki></pre>
  
 
Edit your xorg.conf
 
Edit your xorg.conf
 
<pre><nowiki>
 
<pre><nowiki>
 
gksudo gedit /etc/X11/xorg.conf
 
gksudo gedit /etc/X11/xorg.conf
</nowiki></code>
+
</nowiki></pre>
  
 
What follows is for a 1400x900 display. "..." indicates stuff left out. In the "meta modes" option, we indicate that we are not expecting TV by using a NULL. So the resolutions will probably differ for your device, but you modify the <code><nowiki>Device</nowiki></code> section of your xorg.conf file as
 
What follows is for a 1400x900 display. "..." indicates stuff left out. In the "meta modes" option, we indicate that we are not expecting TV by using a NULL. So the resolutions will probably differ for your device, but you modify the <code><nowiki>Device</nowiki></code> section of your xorg.conf file as
第29行: 第29行:
 
EndSection
 
EndSection
  
</nowiki></code>
+
</nowiki></pre>
 
Now save it. If you are using an S-Video cable change <code><nowiki>"COMPOSITE"</nowiki></code> to <code><nowiki>"SVIDEO"</nowiki></code>
 
Now save it. If you are using an S-Video cable change <code><nowiki>"COMPOSITE"</nowiki></code> to <code><nowiki>"SVIDEO"</nowiki></code>
 
If your TV uses PAL change <code><nowiki>"NTSC-M"</nowiki></code> to <code><nowiki>"PAL-B"</nowiki></code>, or other TVStandard. A modestly comprehensive list is available below.
 
If your TV uses PAL change <code><nowiki>"NTSC-M"</nowiki></code> to <code><nowiki>"PAL-B"</nowiki></code>, or other TVStandard. A modestly comprehensive list is available below.
第37行: 第37行:
 
<pre><nowiki>
 
<pre><nowiki>
 
Option "ConnectedMonitor" "CRT,TV"
 
Option "ConnectedMonitor" "CRT,TV"
</nowiki></code>
+
</nowiki></pre>
  
 
'''Now you need to restart X'''
 
'''Now you need to restart X'''
第48行: 第48行:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
 
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
</nowiki></code>
+
</nowiki></pre>
  
 
Opening up the file with the command <code><nowiki>gksudo gedit /etc/X11/xorg.conf</nowiki></code>, you will first need to edit the <code><nowiki>Device</nowiki></code> section.
 
Opening up the file with the command <code><nowiki>gksudo gedit /etc/X11/xorg.conf</nowiki></code>, you will first need to edit the <code><nowiki>Device</nowiki></code> section.
第68行: 第68行:
 
         BusID  "PCI:02:09:0"
 
         BusID  "PCI:02:09:0"
 
EndSection
 
EndSection
</nowiki></code>
+
</nowiki></pre>
  
 
The <code><nowiki>NoLogo</nowiki></code> and <code><nowiki>RenderAccel</nowiki></code> options are completely optional, but it is very important that you put in the <code><nowiki>BusID</nowiki></code>. You can find this using <code><nowiki>lspci</nowiki></code> or checking the contents of '''/var/log/Xorg.0.log'''.   
 
The <code><nowiki>NoLogo</nowiki></code> and <code><nowiki>RenderAccel</nowiki></code> options are completely optional, but it is very important that you put in the <code><nowiki>BusID</nowiki></code>. You can find this using <code><nowiki>lspci</nowiki></code> or checking the contents of '''/var/log/Xorg.0.log'''.   
第86行: 第86行:
 
         VertRefresh 60
 
         VertRefresh 60
 
EndSection
 
EndSection
</nowiki></code>
+
</nowiki></pre>
 
The Nvidia documentation suggest that you can use <code><nowiki>HorizSync</nowiki></code> values for your TV of 30-50, but I had no luck with that.  Running <code><nowiki>startx</nowiki></code> with verbose logging can give you the correct values for your television if neither work for you. For your monitor, you can find additional information [[UbuntuHelp:FixVideoResolutionHowto|here]]
 
The Nvidia documentation suggest that you can use <code><nowiki>HorizSync</nowiki></code> values for your TV of 30-50, but I had no luck with that.  Running <code><nowiki>startx</nowiki></code> with verbose logging can give you the correct values for your television if neither work for you. For your monitor, you can find additional information [[UbuntuHelp:FixVideoResolutionHowto|here]]
  
第116行: 第116行:
 
         EndSubSection
 
         EndSubSection
 
EndSection
 
EndSection
</nowiki></code>
+
</nowiki></pre>
 
Other <code><nowiki>TVOutFormat</nowiki></code> values can be <code><nowiki>COMPOSITE</nowiki></code> or <code><nowiki>SVIDEO</nowiki></code>, depending on what version of the nvidia drivers you are using (SVIDEO does ''not'' work with the 1.0-7667 drivers, do not use the hyphen).  The proper value for <code><nowiki>TVStandard</nowiki></code> can be found in the table below.  
 
Other <code><nowiki>TVOutFormat</nowiki></code> values can be <code><nowiki>COMPOSITE</nowiki></code> or <code><nowiki>SVIDEO</nowiki></code>, depending on what version of the nvidia drivers you are using (SVIDEO does ''not'' work with the 1.0-7667 drivers, do not use the hyphen).  The proper value for <code><nowiki>TVStandard</nowiki></code> can be found in the table below.  
  
第131行: 第131行:
 
         InputDevice    "Configured Mouse"
 
         InputDevice    "Configured Mouse"
 
EndSection
 
EndSection
</nowiki></code>
+
</nowiki></pre>
  
 
Now simply restart the X server, and it might actually work.  If it doesn't, all errors will be in '''/var/log/Xorg.0.log''', allowing you to find error messages and make the suggested changes.
 
Now simply restart the X server, and it might actually work.  If it doesn't, all errors will be in '''/var/log/Xorg.0.log''', allowing you to find error messages and make the suggested changes.

2007年5月13日 (日) 12:50的版本

With this howto for your Nvidia graphic card, you can view X simultaneously on your monitor and TV.

Using TwinView

Backup your xorg.conf

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

Edit your xorg.conf

gksudo gedit /etc/X11/xorg.conf

What follows is for a 1400x900 display. "..." indicates stuff left out. In the "meta modes" option, we indicate that we are not expecting TV by using a NULL. So the resolutions will probably differ for your device, but you modify the Device section of your xorg.conf file as


Section "Screen"
    ...
    Option         "TwinView"
    Option         "TVOutFormat" "SVIDEO"
    Option         "TVStandard" "NTSC-M"
    Option         "MetaModes" "1440x900,640x480; 1440x900,NULL; 1024x768,NULL; 800x600,NULL; 640x480,NULL"
    SubSection     "Display"
        ...
        Modes      "1440x900" "1280x1024" "1024x768" "720x450" "640x480"
    EndSubSection
EndSection

Now save it. If you are using an S-Video cable change "COMPOSITE" to "SVIDEO" If your TV uses PAL change "NTSC-M" to "PAL-B", or other TVStandard. A modestly comprehensive list is available below. You may also change MetaModes to whatever is appropriate for your system!

Note: With a Geforce FX 5200 using Ubuntu Edgy I had to add the following to the Device section in order for the above to work:

Option "ConnectedMonitor" "CRT,TV"

Now you need to restart X

A more complicated way - Running 2 X-Screens

Some cards are not able to use twinview, or you might not have much luck with the above. This configuration will enable you to run 2 X-Screens (one for the TV, the other one for your monitor) what's very handy if you want to use your PC while watching a movie, or running Media Center software like mythtv.


First, backup your original xorg.conf.

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

Opening up the file with the command gksudo gedit /etc/X11/xorg.conf, you will first need to edit the Device section.

Section "Device"
        Identifier      "Device0"
        Driver          "nvidia"
        Screen 0
        Option  "NoLogo"        "true"
        Option  "RenderAccel"   "true"
        BusID   "PCI:02:09:0"
EndSection

Section "Device"
        Identifier      "Device1"
        Driver "nvidia"
        Screen 1
        BusID   "PCI:02:09:0"
EndSection

The NoLogo and RenderAccel options are completely optional, but it is very important that you put in the BusID. You can find this using lspci or checking the contents of /var/log/Xorg.0.log.

Next, find the Monitor section and edit it as in the following example.

Section "Monitor"
        Identifier      "Monitor" #CRT
        HorizSync       30-70
        VertRefresh     50-140
        Option          "DPMS"
EndSection

Section "Monitor"
        Identifier "Television" #TV
        HorizSync 30-50
        VertRefresh 60
EndSection

The Nvidia documentation suggest that you can use HorizSync values for your TV of 30-50, but I had no luck with that. Running startx with verbose logging can give you the correct values for your television if neither work for you. For your monitor, you can find additional information here

Next, find the Screen section and edit it as in the following example. Naturally, you'll have to supply your own Modelines depending what what resolutions you want / are supported. This example is about as generic as you can get, however, and will work on many TV and CRT combinations.

Section "Screen"
        Identifier      "Screen0"
        Device          "Device0"
        Monitor         "Monitor"
        DefaultDepth    24
        Option  "ConnectedMonitor" "CRT"
        SubSection "Display"
                Depth           24
                Modes           "1024x768" "800x600" "640x480"
        EndSubSection
EndSection

Section "Screen"
        Identifier      "Screen1"
        Device          "Device1"
        Monitor         "Television"
        DefaultDepth    24
        Option  "TVOutFormat" "SVIDEO"
        Option  "TVStandard" "NTSC-M"
        Option  "ConnectedMonitor" "TV"
        SubSection "Display"
                Depth 24
                Modes "640x480"
        EndSubSection
EndSection

Other TVOutFormat values can be COMPOSITE or SVIDEO, depending on what version of the nvidia drivers you are using (SVIDEO does not work with the 1.0-7667 drivers, do not use the hyphen). The proper value for TVStandard can be found in the table below.

On some systems it is necessary to explicitly set what 'head' that was used with the ConnectedMonitor option. For example 'CRT-0' and 'TV-0'. This is also documented under Multiple X Screens with Nvidia cards. On other systems, specifying this option is known to _prevent_ TV-out from working, possibly with a message like "Unable to find available display devices for screen 1" in Xorg's log/output. Try commenting the ConnectedMonitor lines out if it doesn't work for you.

Finally, find the ServerLayout section and set it up as follows. If you prefer, you can use leftof instead of rightof. Other options can be found in the xorg.conf man page.

Section "ServerLayout"
        Identifier      "Basic Layout"
        Screen 0        "Screen0"
        Screen 1        "Screen1" rightof "Screen0"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
EndSection

Now simply restart the X server, and it might actually work. If it doesn't, all errors will be in /var/log/Xorg.0.log, allowing you to find error messages and make the suggested changes.


Finding your TVStandard

Due to various historical reasons, there are two main standards; NTSC in the Americas and Japan, and PAL in Europe and much of the rest of the world. Nvidia also supports HDTV standareds such as 1080i and 720p. This list can also be found in Nvidia's ReadMe


||PAL-B||Australia, Belgium, Denmark, Finland, Germany, Guinea, Hong Kong, India, Indonesia, Italy, Malaysia, The Netherlands, Norway, Portugal, Singapore, Spain, Sweden, and Switzerland|| ||PAL-D||China and North Korea|| ||PAL-G||Denmark, Finland, Germany, Italy, Malaysia, The Netherlands, Norway, Portugal, Spain, Sweden, and Switzerland|| ||PAL-H||Belgium|| ||PAL-I||Hong Kong, Ireland, and United Kingdom|| ||PAL-K1||Guinea|| ||PAL-M||Brazil|| ||PAL-N||France, Paraguay, and Uruguay|| ||PAL-NC||Argentina|| ||NTSC-J||Japan|| ||NTSC-M||Canada, Chile, Colombia, Costa Rica, Ecuador, Haiti, Honduras, Mexico, Panama, Puerto Rico, South Korea, Taiwan, United States of America, and Venezuela|| ||HD480i||480 line interlaced|| ||HD480p||480 line progressive|| ||HD720p||720 line progressive|| ||HD1080i||1080 line interlaced|| ||HD1080p||1080 line progressive|| ||HD576i||576 line interlace|| ||HD576p||576 line progressive||


Credits:


CategoryHardware CategoryDocumentation


An Alternative Way. (Also complicated)

The problem with the above two methods is that you are likely to experience tearing on the tv display as I did. This is because the graphics card only supports video overlay on one screen at a time and by default chooses the AGP/DVI connection. The method described at [1] chooses a setup that will only display one screen at a time, but nevertheless allows you to, for example, launch a movie on your tv screen and when finished go back to your desktop on your monitor. I find this ideal for my mythtv and desktop setup.

A word of advice: The guide describes a script to launch mplayer. In order for this to work, you must change your /etc/X11/Xwrapper.config so that allowed_users=anybody . This might be a security risk.