特殊:Badtitle/NS100:XineramaHowTo:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Oneleaf留言 | 贡献
新页面: {{From|https://help.ubuntu.com/community/XineramaHowTo}} {{Languages|UbuntuHelp:XineramaHowTo}} == Xinerama (multiple monitors) == {|border="1" cellspacing="0" | This is a nascent wiki...
 
Oneleaf留言 | 贡献
无编辑摘要
第18行: 第18行:
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 :)
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/XF86Config-4 depending on which version you are running). It is all contained in the Device section.  
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:
Here is mine:
第301行: 第301行:


Thanks to Jazon, fritsch and jott in #kubuntu!
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 <code><nowiki>/etc/X11/xorg.conf.single</nowiki></code>.  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. 
<pre><nowiki>
sudo chmod a+s /usr/bin/X /usr/bin/Xorg
</nowiki></pre>
Now you should be able to run your game with <code><nowiki>startx</nowiki></code> and your single screen xorg.conf.
<pre><nowiki>
startx /path/to/the/game -- :1 -config xorg.conf.single
</nowiki></pre>
Tips:
* <code><nowiki>startx</nowiki></code> must be run from the console, not from within an X session.
* <code><nowiki>startx</nowiki></code> 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').
* <code><nowiki>startx</nowiki></code> (or more accurately, the X server), searches /etc/X11/ for the file you specify with the -config option.  For more details, run <code><nowiki>man Xorg</nowiki></code>.


----
----

2007年11月21日 (三) 17:19的版本

{{#ifexist: :XineramaHowTo/zh | | {{#ifexist: XineramaHowTo/zh | | {{#ifeq: {{#titleparts:XineramaHowTo|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:XineramaHowTo|1|-1|}} | zh | | }}


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:

  • install i810switch (a tool to switch on/off your laptops LCD and external VGA adapter)
  • read the man-pages of i810 for further info and options
  • 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.