Redhat linux 双显示器设置( dual monitor )

来源:互联网 发布:如何提高软件质量 编辑:程序博客网 时间:2024/06/05 07:10

 

 Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "Videocard vendor"
BoardName "NVIDIA Quadro 4 (generic)"
Option "TwinView" "true"

上面这些基本上就可以解决问题了,如解决不了再看以下的部分。

 

Dual Headed Systems:

To use multiple monitors on a single Linux system use one of the following options:

A dual headed graphics card with a single X-Window desktop. (preferred option)
i.e. NVidia Quadro Pro or ATI Radion Pro 9800.
orXinerama: Two graphics cards and let X span the two desktops.

This tutorial covers the use of NVidia and ATI furnished graphics drivers for dual headed systems as well as Xinerama. This requires the use of a dual headed grahics card, two graphics card or a splitter DVI or SVGA Y-cable from a single digital high-res 2xDVI output.

X-Windows X Server Configuration File:

The X server is the software which runs on your desktop and can connect to client programs to reder their displays. (yes it is opposite of what many find to be intuitive.)

X-Windows Configuration file:

Red Hat Enterprise 4/Fedora Core: /etc/X11/xorg.confRed Hat Enterprise 3 (older systems): /etc/X11/XF86ConfigCreating the default configuration file:/usr/X11R6/bin/X -configure
This creates $PWD/xorg.conf.new (or: $PWD/XF86Config.new) Red Hat GUI configuration tool: RHEL4, FC 2/3: /usr/bin/system-config-displayRed Hat 8.0/9.0, RHEL3: redhat-config-xfree86Generic XFree86.org configuration tool: /usr/X11R6/bin/xf86config

Installing Graphics Drivers for Dual Headed Systems:

Distributions of Linux will install simple open source drivers for even the most complex of graphics cards. To get full support for 3-D rotation and manipulation, 3-D shading, GLX, DRI, and two monitors, one needs to download the graphics drivers from the manufacturer.

NVidia configuration:(i.e. Quadro Pro)

The default open source NVidia driver installed by Fedora, Red Hat and SuSE is "nv" or "vesa" which is ok for simple 2-D graphics. If you want to take advantage of the full power of your graphics card, download and install the 3-D driver ("nvidia") from NVidia.com.

Download the NVidia drivers from http://www.nvidia.com/object/unix.htmlInstall in console mode: Enter a console window: ctrl + alt + F1Login as root and suspend graphics mode: init 3or boot to init level 3. See theYoLinux "init process" tutorial. Run the NVidia installer in the console window: sh NVIDIA-Linux-x86-1.0-8756-pkg1.run -q
Add the directive --kernel-source-path /usr/src/linux-xxxxx if required to explicitly state the Linux kernel source path. Return to graphics mode, init level 5: init 5Edit X11 config file /etc/X11/xorg.conf (or for older systems: /etc/X11/XF86Config) as described below.
Although the NVidia directions do not reference manual configuration by editing the X-Windows config file, I have found it necessary to take advantage of both monitors. Edit the "Monitor" section as described below in the "Wide Screen Pitfalls" section below. [Potential Pitfall]: Ubuntu - If the NVidia installer does not work, try using "linux-restricted-modules": apt-get install nvidia-glx
For more info see the NVidia Binary Driver Howto

[Potential Pitfall]: Ubuntu - NVidia installer complains about missing file /usr/src/linux-source-2.6.15/include/linux/version.h "No such file or directory". Solution:

cd /usr/srctar xjvf linux-source-2.6.XX.tar.bz2ln -s linux-source-2.6.XX linuxcd linuxcp /boot/config-`uname -r` .configmake oldconfigmake include/linux/version.h

[Potential Pitfall]: (NVidia Quadro4 980XGL) If booting with one monitor, the graphics card will not generate a video signal for the second monitor. (Makes sense, it's not there.) One must boot with both monitors if the graphics card is to generate a video signal for both.

[Potential Pitfall]: SuSE NVidia Installer HOWTO instructions (http://www.suse.de/~sndirsch/nvidia-installer-HOWTO.html) are flawed. It suggests using the configuration program "sax2" to configure the NVidia driver. I did not find that this worked. Modify the X11 configuration file manually using this tutorial.

[Potential Pitfall]: (NVidia Quadro4 980XGL) SuSE 9.3: Yast will show options for configuring two monitors but the default open source drivers do not support two monitors.

[Potential Pitfall]: (NVidia Quadro4 980XGL) If one monitor remains black but the other is working this could be due to the definition of the "ConnectedMonitor". If you are using both the analog and digital ports of the monitor, the correct definition MUST be specified. If you connect using analog connectors but specify a digital flat panel display (or vice versa), the screen will be black.
Valid definitions for ConnectedMonitor are:

CRT: Analog Cathode Ray Tube (using VGA cables/connector) FPD: Digital Flat Panel Display (using DVI cables/connector) DPMS: Digital Power Management Savings for Energy Star compliant monitors.
See: Section "Device": Section "Device"
Identifier "Videocard0"
Driver "nvidia"
VendorName "Videocard vendor"
BoardName "NVIDIA Quadro 4 (generic)"
Option "TwinView" "true"
Option "TwinViewOrientation" "RightOf"
Option "SecondMonitorHorizSync" "31-81"
Option "SecondMonitorVertRefresh" "55-85"
Option "MetaModes" "1280x1024,1280x1024; 1024x768,1024x768"
Option "ConnectedMonitor" "FPD,FPD" EndSection A mix of monitors may specify: Option "ConnectedMonitor" "FPD,CRT" if the second monitor is an analog connection. This often occurs when two computers are connected to the same monitor, necessitating the use of both the analog and digital connections to the monitor.
Using digital flat panel monitors with digital connections and specifying "FPD" for both will also fix this problem.

For more info see the YoLinux Installation Tutorial: Installing NVidia Graphics card drivers

See: Section "Module":

Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
EndSection
Note: Remove "dri", "GLCore". Add "glx". Notes:The NVidia driver using "TwinView" allows X-Windows to view the two displays as a single screen. The config file xorg.conf needs to be edited to enable proper dual monitor use. The SuSE SaX2 configuration tool was not enough nor is the Red Hat configuration tool. Both displays share a single frame buffer. To disable one of the displays for a mode, use mode name NULL:
Option "MetaModes" "1600x1200, NULL; NULL, 1024x768"To create a panning area (bounding box) for the desktop (viewport):
Option "MetaModes" "1024x768 @1600x1200, 800x600 @1024x768"TwinViewOrientation options: RightOf LeftOf Above Below Clone The open source drivers "nv" and "vesa" do not support "TwinView". This is only supported using the nVidia driver "nvidia". Manual loading/unloading the kernel module: Unload: modprobe -r nvidiaLoad: modprobe nvidiaShow modules loaded by kernel: lsmodDVI: Digital Visual Interface. Transmits 24 bits/pixel for R, G and B. The timing almost matches the VGA analog signal. DVI sends whole frames with no compression. Dual link DVI video cards: (i.e. Quadro FX) The nVidia graphics cards with a single "dual link" DVI interface (also known as DVI-DL) are used for a single very high resolution screen or can be used to drive two analog monitors. The "dual link" DVI connector has many more pins than the traditional "single link" DVI connector. These graphics cards can use a "Y" connector from the single "dual link" DVI output to two analog VGA connectors to drive two monitors. The configuration is the same as the "TwinView" configuration detailed above except that one must specify: Option "ConnectedMonitor" "CRT,CRT"
For more information on DVI interfaces, see Wikipedia: DVI - Digital Visual Interface

NVidia commands: The NVidia driver installation comes with support commands.

nvidia-settings: /usr/bin/nvidia-settings --help : List command argumentsnvidia-settings -g : Show GLX settings for the X displaynvidia-xconfig: nvidia-xconfig --help : List command argumentsnvidia-xconfig -A : Advanced help about full functionality.nvidia-xconfig -t : Show X configuration file data in tree formatnvidia-installer: nvidia-installer -A : Print the installer command's "advanced" options.

Links:

NVidia Accelerated Linux Driver Set README and Installation Guide

ATI configuration:(i.e. Radeon 9800) Download the ATI drivers for X.Org fromhttp://ati.amd.com/support/driver.htmlRun installer: sh ati-driver-installer-8.22.5-i386.runChoose "Install Driver X.Org 6.8" "Custom Install" Dual monitor configuration:
/usr/X11R6/bin/aticonfig --dtop=horizontal --overlay-on=1
(Command placed here by installer in above step.)
(other options include: --initial=dual-head and --screen-layout=right)
Command line help: aticonfig -h
[Potential Pitfall]: SuSE users (9.3) - Do NOT use Yast to configure the system for dual monitor use!! Don't use SaX2 either!!! Only use aticonfigEdit /etc/X11/xorg.conf Section "Monitor"
Identifier "aticonfig Monitor 0"
DisplaySize 1000 400
EndSection
Note: The installer will add an application to the menu, "ATI Control". This will launch the "ATI Radion 9800 Control Panel" for dual monitor control and adjustment. It will also control TV out settings. Check for loaded module: Open Source: /sbin/lsmod | grep radeonATI driver: /sbin/lsmod | grep fglrx

Dual Monitor Support Using Xinerama:

A Xinerama configuration uses the native Xorg drivers to coordinate two graphics cards, controlling two monitors to display a single desktop. Do not use Xinerama with the proprietary driver configurations above (nVidia,ATI) as they contain the Xinerama capabilities within their drivers.

Identifying the graphics cards and PCI bus ID:

List PCI devices bus ID: Xorg -scanpci
or
XFree86 -scanpci
(Execute command at run level 3: init 3) Other PCI info commands: Xorg-probeonly
(Execute command at run level 3: init 3) lspci
lspci -vvx
(Note: 01:00.0 is stated as 1:0:0 in the configuration file.) cat /proc/pciSpecify the device and PCI bus ID for each card: Section "Device"
Identifier "Videocard0"
Driver "vesa"
BusID "PCI:0:9:0"
EndSection

Section "Device"
Identifier "Videocard1"
Driver "vesa"
BusID "PCI:1:0:0"
EndSection
AGP example: BusID "AGP:01:00:0"Note: If using a single graphics card with a single DVI-DL port to drive two monitors, only specify a single device. The "vesa" driver is the most basic driver and can work with any VESA compatible video card.

Specify the server "layout":

Section "ServerLayout"
Identifier "Default Layout"
Screen "Screen 0"
Screen "Screen 1" RightOf "Screen 0"
...
..
Option "Xinerama" "on" - Using /etc/X11/Xorg.conf Option "Clone" "off"EndSection

Configure older XF86Config X-server to use Xinerama:

Section "ServerFlags"
Option "Xinerama" "true"
EndSection

 

原创粉丝点击