个人工具

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

来自Ubuntu中文

跳转至: 导航, 搜索
第14行: 第14行:
 
Here is mine:
 
Here is mine:
 
<pre><nowiki>  
 
<pre><nowiki>  
Section "Device"
+
Section "Device"
Identifier  "Videocard0"
+
        Identifier  "Videocard0"
Driver      "nvidia"
+
        Driver      "nvidia"
VendorName  "Videocard vendor"
+
        VendorName  "Videocard vendor"
BoardName  "NVIDIA GeForce FX5900XT"
+
        BoardName  "NVIDIA GeForce FX5900XT"
Option      "TwinView"                "true"
+
        Option      "TwinView"                "true"
Option      "RenderAccel"              "true"
+
        Option      "RenderAccel"              "true"
Option      "UseEdidFreqs"            "true"
+
        Option      "UseEdidFreqs"            "true"
Option      "MetaModes"                "1600x1200,1600x1200;1280x1024,1280x1024;1024x768,NULL;800x600,800x600;640x480,640x480"
+
        Option      "MetaModes"                "1600x1200,1600x1200;1280x1024,1280x1024;1024x768,NULL;800x600,800x600;640x480,640x480"
Option      "SecondMonitorHorizSync"  "30-110"
+
        Option      "SecondMonitorHorizSync"  "30-110"
Option      "SecondMonitorVertRefresh" "50-160"
+
        Option      "SecondMonitorVertRefresh" "50-160"
EndSection
+
EndSection
 
</nowiki></pre>
 
</nowiki></pre>
 
The most important is the "TwinView" one, which enables the dualhead support. "UseEdidFreqs" means to probe the monitors for the resolutions they support (more on that in a moment). The "MetaModes" is where the configuration really lies - this tells the driver how you want the displays configured. The first entry will be the default and each entry is separated by a semicolon (";"). The first entry in mine therefore is "1600x1200,1600x1200" which means that both monitors should be in a 1600x1200 screenmode, making the total X display 3200x1200. Same principle for 1280x1024,1280x1024. The next one is slightly different, "1024x768,NULL" means that the second monitor will display nothing, so this mode is a true 1024x768 mode on the first monitor only (I use this one for playing games so they don't cross the monitor boundary). Beyond that, the "SecondMonitor" options are because my second monitor doesn't support EDID frequency lookups, so I have to tell the driver its refresh rates.
 
The most important is the "TwinView" one, which enables the dualhead support. "UseEdidFreqs" means to probe the monitors for the resolutions they support (more on that in a moment). The "MetaModes" is where the configuration really lies - this tells the driver how you want the displays configured. The first entry will be the default and each entry is separated by a semicolon (";"). The first entry in mine therefore is "1600x1200,1600x1200" which means that both monitors should be in a 1600x1200 screenmode, making the total X display 3200x1200. Same principle for 1280x1024,1280x1024. The next one is slightly different, "1024x768,NULL" means that the second monitor will display nothing, so this mode is a true 1024x768 mode on the first monitor only (I use this one for playing games so they don't cross the monitor boundary). Beyond that, the "SecondMonitor" options are because my second monitor doesn't support EDID frequency lookups, so I have to tell the driver its refresh rates.
第31行: 第31行:
 
Here is mine:
 
Here is mine:
 
<pre><nowiki>  
 
<pre><nowiki>  
Section "Screen"
+
Section "Screen"
Identifier  "Screen0"
+
        Identifier  "Screen0"
Device      "Videocard0"
+
        Device      "Videocard0"
Monitor      "Monitor0"
+
        Monitor      "Monitor0"
DefaultDepth 24
+
        DefaultDepth 24
SubSection "Display"
+
        SubSection "Display"
Viewport  0 0
+
          Viewport  0 0
Depth      24
+
          Depth      24
Modes      "3200x1200" "2560x1024" "1024x768" "1600x600" "1280x480"
+
          Modes      "3200x1200" "2560x1024" "1024x768" "1600x600" "1280x480"
EndSubSection
+
        EndSubSection
EndSection
+
EndSection
 
</nowiki></pre>  
 
</nowiki></pre>  
 
The "Modes" line being the important one here, you can see that it tells X the sizes the displays will be once the nvidia driver has set the monitors up with the metamodes above.
 
The "Modes" line being the important one here, you can see that it tells X the sizes the displays will be once the nvidia driver has set the monitors up with the metamodes above.
第56行: 第56行:
 
Option "RenderAccel" "true"
 
Option "RenderAccel" "true"
 
Option "UseEdidFreqs" "true"
 
Option "UseEdidFreqs" "true"
 +
 
EndSection
 
EndSection
 +
 +
 
Section "Device"
 
Section "Device"
 
Identifier "Device[1]"
 
Identifier "Device[1]"
第65行: 第68行:
 
Option "RenderAccel" "true"
 
Option "RenderAccel" "true"
 
Option "UseEdidFreqs" "true"
 
Option "UseEdidFreqs" "true"
 +
 
EndSection
 
EndSection
 
</nowiki></pre>
 
</nowiki></pre>
第74行: 第78行:
 
VertRefresh 43-60
 
VertRefresh 43-60
 
EndSection
 
EndSection
 +
 
Section "Monitor"
 
Section "Monitor"
 
Identifier "CRT Monitor"
 
Identifier "CRT Monitor"
第80行: 第85行:
 
VertRefresh 43-100
 
VertRefresh 43-100
 
EndSection
 
EndSection
 +
 
Section "Screen"
 
Section "Screen"
 
Identifier "Default Screen[0]"
 
Identifier "Default Screen[0]"
第89行: 第95行:
 
Modes "1600x1200" "1280x1024"
 
Modes "1600x1200" "1280x1024"
 
EndSubSection
 
EndSubSection
 +
 
Section "Screen"
 
Section "Screen"
 
Identifier "Default Screen[1]"
 
Identifier "Default Screen[1]"
第103行: 第110行:
 
<pre><nowiki>
 
<pre><nowiki>
 
Section "ServerLayout"
 
Section "ServerLayout"
Identifier      "Xinerama"
+
        Identifier      "Xinerama"
Screen          0 "Default Screen[0]" 0 0
+
        Screen          0 "Default Screen[0]" 0 0
Screen          1 "Default Screen[1]" LeftOf "Default Screen[0]"
+
        Screen          1 "Default Screen[1]" LeftOf "Default Screen[0]"
 
InputDevice "Generic Keyboard"
 
InputDevice "Generic Keyboard"
 
InputDevice "Configured Mouse"
 
InputDevice "Configured Mouse"
第119行: 第126行:
 
<pre><nowiki>
 
<pre><nowiki>
 
Section "Monitor"
 
Section "Monitor"
Identifier "Fujitsu0"
+
        Identifier "Fujitsu0"
Option  "DPMS"
+
        Option  "DPMS"
 
EndSection
 
EndSection
 
Section "Monitor"
 
Section "Monitor"
Identifier "Fujitsu1"
+
        Identifier "Fujitsu1"
Option  "DPMS"
+
        Option  "DPMS"
 
EndSection
 
EndSection
 +
 
Section "Device"
 
Section "Device"
Identifier      "ati0"
+
        Identifier      "ati0"
Driver          "radeon"
+
        Driver          "radeon"
BusID          "PCI:1:0:0"
+
        BusID          "PCI:1:0:0"
Screen          0
+
        Screen          0
 
EndSection
 
EndSection
 +
 
Section "Device"
 
Section "Device"
Identifier      "ati1"
+
        Identifier      "ati1"
Driver          "radeon"
+
        Driver          "radeon"
BusID          "PCI:1:0:0"
+
        BusID          "PCI:1:0:0"
Screen          1
+
        Screen          1
 
EndSection
 
EndSection
 +
 
Section "Screen"
 
Section "Screen"
Identifier      "screen0"
+
        Identifier      "screen0"
Device          "ati0"
+
        Device          "ati0"
Monitor        "Fujitsu0"
+
        Monitor        "Fujitsu0"
DefaultDepth    24
+
        DefaultDepth    24
SubSection "Display"
+
        SubSection "Display"
Depth  24
+
                Depth  24
Modes  "1280x1024"
+
                Modes  "1280x1024"
EndSubSection
+
        EndSubSection
 
EndSection
 
EndSection
 +
 
Section "Screen"
 
Section "Screen"
Identifier      "screen1"
+
        Identifier      "screen1"
Device          "ati1"
+
        Device          "ati1"
Monitor        "Fujitsu1"
+
        Monitor        "Fujitsu1"
DefaultDepth    24
+
        DefaultDepth    24
SubSection "Display"
+
        SubSection "Display"
Depth  24
+
                Depth  24
Modes  "1280x1024"
+
                Modes  "1280x1024"
EndSubSection
+
        EndSubSection
 
EndSection
 
EndSection
 
Section "ServerLayout"
 
Section "ServerLayout"
Identifier "Multihead"
+
        Identifier "Multihead"
Screen  "screen0"
+
        Screen  "screen0"
Screen  "screen1" RightOf "screen0"
+
        Screen  "screen1" RightOf "screen0"
InputDevice    "mouse1" "CorePointer"
+
        InputDevice    "mouse1" "CorePointer"
InputDevice    "keyboard1" "CoreKeyboard"
+
        InputDevice    "keyboard1" "CoreKeyboard"
Option "Xinerama"
+
        Option "Xinerama"
 
EndSection
 
EndSection
 
</nowiki></pre>
 
</nowiki></pre>
第188行: 第199行:
 
Option "MonitorLayout" "CRT, CRT+LFP"
 
Option "MonitorLayout" "CRT, CRT+LFP"
 
EndSection
 
EndSection
 +
 
Section "Device"
 
Section "Device"
 
Identifier "Intel-VGA"
 
Identifier "Intel-VGA"
第195行: 第207行:
 
Option "MonitorLayout" "CRT, CRT+LFP"
 
Option "MonitorLayout" "CRT, CRT+LFP"
 
EndSection
 
EndSection
 +
 
Section "Monitor"
 
Section "Monitor"
 
Identifier "LCD"
 
Identifier "LCD"
第201行: 第214行:
 
VertRefresh 43-60
 
VertRefresh 43-60
 
EndSection
 
EndSection
 +
 
Section "Monitor"
 
Section "Monitor"
 
Identifier "CRT"
 
Identifier "CRT"
第207行: 第221行:
 
VertRefresh 43-60
 
VertRefresh 43-60
 
EndSection
 
EndSection
 +
 
Section "Screen"
 
Section "Screen"
 
Identifier "LCD-Screen"
 
Identifier "LCD-Screen"
第221行: 第236行:
 
EndSubSection
 
EndSubSection
 
EndSection
 
EndSection
 +
 
Section "Screen"
 
Section "Screen"
 
Identifier "CRT-Screen"
 
Identifier "CRT-Screen"
第235行: 第251行:
 
EndSubSection
 
EndSubSection
 
EndSection
 
EndSection
 +
 +
 
Section "ServerLayout"
 
Section "ServerLayout"
 
Identifier "Multihead"
 
Identifier "Multihead"

2007年12月6日 (四) 11:05的版本

Xinerama (multiple monitors)

This is a nascent wiki entry, that will be updated & refactored as more information becomes available.

For now see the following forum threads / pages :

It is advisable to install the graphics card's binary driver before configuring dual monitors. See BinaryDriverHowto.

Nvidia

Quick and dirty guide to using nVidia TwinView (two outputs on one card, a single desktop split across two monitors. 3d/video stuff works seamlessly across both). The first thing to check is how many outputs your card has. Most of them tend to have a 15pin VGA output (the one your monitor is probably on) and a larger white DVI connector. The ones with this DVI connector usually come with an adapter that converts it to a 15pin VGA socket - if you have this then you are ready for dualhead :) Once you have two monitors hooked up, the magic all happens in the X config file (which will be /etc/X11/xorg.conf (/etc/X11/Xorg.conf) or /etc/X11/XF'86Config-4 depending on which version you are running). It is all contained in the Device section. Here is mine:

 
 Section "Device"
         Identifier  "Videocard0"
         Driver      "nvidia"
         VendorName  "Videocard vendor"
         BoardName   "NVIDIA GeForce FX5900XT"
         Option      "TwinView"                 "true"
         Option      "RenderAccel"              "true"
         Option      "UseEdidFreqs"             "true"
         Option      "MetaModes"                "1600x1200,1600x1200;1280x1024,1280x1024;1024x768,NULL;800x600,800x600;640x480,640x480"
         Option      "SecondMonitorHorizSync"   "30-110"
         Option      "SecondMonitorVertRefresh" "50-160"
 EndSection

The most important is the "TwinView" one, which enables the dualhead support. "UseEdidFreqs" means to probe the monitors for the resolutions they support (more on that in a moment). The "MetaModes" is where the configuration really lies - this tells the driver how you want the displays configured. The first entry will be the default and each entry is separated by a semicolon (";"). The first entry in mine therefore is "1600x1200,1600x1200" which means that both monitors should be in a 1600x1200 screenmode, making the total X display 3200x1200. Same principle for 1280x1024,1280x1024. The next one is slightly different, "1024x768,NULL" means that the second monitor will display nothing, so this mode is a true 1024x768 mode on the first monitor only (I use this one for playing games so they don't cross the monitor boundary). Beyond that, the "SecondMonitor" options are because my second monitor doesn't support EDID frequency lookups, so I have to tell the driver its refresh rates. The only other thing you need to change then is to tell X's "Screen" section about these sizes. Here is mine:

 
 Section "Screen"
         Identifier   "Screen0"
         Device       "Videocard0"
         Monitor      "Monitor0"
         DefaultDepth 24
         SubSection "Display"
           Viewport   0 0
           Depth      24
           Modes      "3200x1200" "2560x1024" "1024x768" "1600x600" "1280x480"
         EndSubSection
 EndSection

The "Modes" line being the important one here, you can see that it tells X the sizes the displays will be once the nvidia driver has set the monitors up with the metamodes above. That should pretty much be it, just check you're not loading the Xinerama module in the config file, nvidia's driver provides its own xinerama extension. I strongly recommend reading the README included with nvidia's driver (also available in the Linux driver section on www.nvidia.com) as it contains a lot more information about twinview that might be relevant to your situation. If you got a problem with the order of your screens, which one is left and which on is the right one. you can declare 2 Devices

Section "Device"
	Identifier	"Device[0]"
	Driver		"nvidia"
	Screen		0
	VendorName	"Nvidia"
	BusID		"PCI:1:0:0"
	Option		"RenderAccel"	"true"
	Option		"UseEdidFreqs"	"true"

EndSection


Section "Device"
	Identifier	"Device[1]"
	Driver		"nvidia"
	Screen		1
	VendorName	"Nvidia"
	BusID		"PCI:1:0:0"
	Option		"RenderAccel"	"true"
	Option		"UseEdidFreqs"	"true"

EndSection

Then you have to declare also 2 screens for every Device, and also 2 Monitors

Section "Monitor"
	Identifier	"TFT Monitor"
	Option		"DPMS"
	VertRefresh	43-60
EndSection

Section "Monitor"
	Identifier	"CRT Monitor"
	Option		"DPMS"
	HorizSync	28-130
	VertRefresh	43-100
EndSection

Section "Screen"
	Identifier	"Default Screen[0]"
	Device		"Device[0]"
	Monitor		"CRT Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes		"1600x1200" "1280x1024"
	EndSubSection

Section "Screen"
	Identifier	"Default Screen[1]"
	Device		"Device[1]"
	Monitor		"TFT Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes		 "1280x1024"
	EndSubSection
EndSection

After that you have to join the two screens to one Desktop in the Server Layout

Section "ServerLayout"
        Identifier      "Xinerama"
        Screen          0 "Default Screen[0]" 0 0
        Screen          1 "Default Screen[1]" LeftOf "Default Screen[0]"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice     "stylus" "SendCoreEvents"
	InputDevice     "cursor" "SendCoreEvents"
	InputDevice     "eraser" "SendCoreEvents"
	Option		"Xinerama"	"on"
EndSection

The screen 1 describes the Order of the screens. So you can also write RightOf instead of LeftOf. The Xinerama Option brings both screens to gather to one big screen.

ATI

For users with an ati radeon card i found a xorg.conf which worked for me:

Section "Monitor"
        Identifier "Fujitsu0"
        Option  "DPMS"
EndSection
Section "Monitor"
        Identifier "Fujitsu1"
        Option  "DPMS"
EndSection

Section "Device"
        Identifier      "ati0"
        Driver          "radeon"
        BusID           "PCI:1:0:0"
        Screen          0
EndSection

Section "Device"
        Identifier      "ati1"
        Driver          "radeon"
        BusID           "PCI:1:0:0"
        Screen          1
EndSection

Section "Screen"
        Identifier      "screen0"
        Device          "ati0"
        Monitor         "Fujitsu0"
        DefaultDepth    24
        SubSection "Display"
                Depth   24
                Modes   "1280x1024"
        EndSubSection
EndSection

Section "Screen"
        Identifier      "screen1"
        Device          "ati1"
        Monitor         "Fujitsu1"
        DefaultDepth    24
        SubSection "Display"
                Depth   24
                Modes   "1280x1024"
        EndSubSection
EndSection
Section "ServerLayout"
        Identifier "Multihead"
        Screen  "screen0"
        Screen  "screen1" RightOf "screen0"
        InputDevice     "mouse1" "CorePointer"
        InputDevice     "keyboard1" "CoreKeyboard"
        Option "Xinerama"
EndSection

found at: http://forums.gentoo.org/viewtopic-t-105588-highlight-ati+radeon+mobility+7500.html Hope this helps: Here is a link to a xorg.conf (wish I could claim it) that lays out multiple X servers. You will need to modify it to your situation (mouse, keyboard, monitors, TV) One server for twinview, one for separate monitors, and one for each monitor (as a single monitor). You should be able to adapt it to do just about whatever you need. Read it carefully it is well commented. http://darkshed.net/files/rcs/misc/xorg.conf

Intel integrated graphics adapters

For everyone annoyed looking for solutions beside the two main brands, here's where i found help:

  1. install i810switch (a tool to switch on/off your laptops LCD and external VGA adapter)

2. read the man-pages of i810 for further info and options 3. the most important lines in your xorg.conf:

Section "Device"
#	Identifier	"Intel Corporation 82852/855GM Integrated Graphics Device"
	Identifier	"Intel-LCD"
	Driver		"i810"
	BusID		"PCI:0:2:0"
	Option "MonitorLayout" "CRT, CRT+LFP"
EndSection
 
Section "Device"
	Identifier	"Intel-VGA"
	Driver		"i810"
	BusID		"PCI:0:2:0"
	Screen		1
	Option "MonitorLayout" "CRT, CRT+LFP"
EndSection
 
Section "Monitor"
	Identifier	"LCD"
	Option		"DPMS"
	HorizSync	28-51
	VertRefresh	43-60
EndSection
 
Section "Monitor"
	Identifier	"CRT"
	Option		"DPMS"
	HorizSync	28-51
	VertRefresh	43-60
EndSection
 
Section "Screen"
	Identifier	"LCD-Screen"
	Device		"Intel-LCD"
	Monitor		"LCD"
	DefaultDepth	24
	SubSection "Display"
		Depth		16
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1024x768"
	EndSubSection
EndSection
 
Section "Screen"
	Identifier	"CRT-Screen"
	Device		"Intel-VGA"
	Monitor		"CRT"
	DefaultDepth	24
	SubSection "Display"
		Depth		16
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1024x768"
	EndSubSection
EndSection
 
 
Section "ServerLayout"
	Identifier	"Multihead"
	Screen		0 "LCD-Screen"
	Screen		1 "CRT-Screen" RightOf "LCD-Screen"
	Option "Xinerama" "on"
	Option "Clone" "off"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice     "stylus" "SendCoreEvents"
	InputDevice     "cursor" "SendCoreEvents"
	InputDevice     "eraser" "SendCoreEvents"
	InputDevice	"Synaptics Touchpad"
EndSection

Actually I don't know which screen is which, but it works! AND you will have to change settings to the screens to fit your monitors, resolutions and stuff. Found at http://www.wahlau.org/ubuntu_hoary_thinkpad_t43_and_xorg_dual_head_display The most important lines are the MonitorLayout lines in the device-section. Further info about that command is found in your mentioned i810 manpage. Thanks to Jazon, fritsch and jott in #kubuntu!

Single Screen (for games)

This section needs work. Please contribute. If you have a game that runs full screen and doesn't work well with Xinerama, you can do the following. Make a separate xorg.conf that only uses one monitor, i.e. it works with the game. Call it /etc/X11/xorg.conf.single. Now go to a console (Ctrl-Alt-F1) and login. First you must setuid root the X server, because it runs into permissions problems otherwise.

sudo chmod a+s /usr/bin/X /usr/bin/Xorg

Now you should be able to run your game with startx and your single screen xorg.conf.

startx /path/to/the/game -- :1 -config xorg.conf.single

Tips:

  • startx must be run from the console, not from within an X session.
  • startx needs an absolute path to the program.
  • Everything before '--' is executed as a command after the server is running. Everything after '--' gets passed to the server.
  • ':1' is the display name. It must be unique (default is ':0').
  • startx (or more accurately, the X server), searches /etc/X11/ for the file you specify with the -config option. For more details, run man Xorg.