X configuration file Xorg. conf Analysis
Reproduced in: http://blog.csdn.net/comcat/archive/2007/04/02/1549658.aspx
Author: zhuangzhi Lingyun's csdn blog
The configuration of X is actually to generate the file/etc/X11/Xorg. conf.
The following sections are usually configured:
A. The display information is written in this section.
Section "Monitor"
Identifier "monitor0"
Vendorname "VSC"
Modelname "vsc1609"
Horizsync 30-70
Vertrefresh 50-160
Modeline "..." ---------> specifies the display mode of the monitor, which is very important.
...
Modeline "..."
Endsection
Modeline can be directly generated using ddcxinfo-knoppix. (Detect your graphics card and display)
You can also use GTF to directly calculate standard VESA mode lines. For example:
GTF 1024 768 85
Generate:
#1024x768 @ 85.00Hz (GTF) hsync: 68.60 kHz; pclk: 94.39 MHz
Modeline "1024x768_85.00" 94.39 1024 1088 1200 1376 768 769-hsync + vsync
To become a master, you can refer to the following for manual fine-tuning:
Http://www.tldp.org/HOWTO/XFree86-Video-Timings-HOWTO/
Http://man.chinaunix.net/linux/how/XFree86-Video-Timings-HOWTO.html
Eric S. Raymond, author.
B. Write the video card information in this section.
Section "device"
Identifier "card0"
Vendorname "Intel"
Boardname "Intel Corporation 82845g/Gl/Ge chipset integrated graphics device"
Driver "i810"
Busid "pci: 0: 2: 0"
Endseciton
PS: a pci peripheral is described by the busid (8bit): DeviceID (5bit): functionid (3bit. The Xorg. conf file must be in decimal format.
Generally, the bus number of the video card of the PCI interface is 0, and that of the video card of the AGP interface is 1.
A single video card can have no busid.
All drivers used by X are installed in/usr/x11r6/lib/modules/Drivers/. The official driver is also used.
(Note: The driver of the latest Xorg version is located in/usr/lib/Xorg/modules/Drivers /)
For example, after the official NVIDIA driver is installed, the nvidia_drv.o file will be placed in the preceding directory. In this section, specify:
Driver "NVIDIA" (the drive provided by X is NV, and the corresponding file is nv_drv.so)
C. A video card and a display form a screen, which is described in section "screen.
Section "screen"
Identifier "screen0"
Device "card0"
Monitor "monitor0"
Defaultdepth 24
Subsection "display"
Depth 24
Modes "1024x768" "800x600" "640x480"
Endsubsection
...
Endsection
If there is another video card, and it is connected to a display, a section "screen" is added.
Section "screen"
Identifier "screen1"
Device "card1"
Monitor "monitor1"
Defaultdepth 24
Subsection "display"
Depth 24
Modes "1024x768" "800x600" "640x480"
Endsubsection
...
Endsection
D. If there are two independent video card monitors, You need to organize multiple screens in section "serverlayout.
Section "serverlayout"
Identifier "multihead layout"
Screen 0 "screen0" 0 768
Screen 1 "screen1" 0 0
...
Option "xinerama" "on" -------------------> extended desktop, off is an individual Desktop
Endsection
PS: other commonly used options:
Option "dontzap" blocking <Ctrl> + <alt> + <backspace>
Option "dontvtswitch" shields <Ctrl> + <alt> + <FN> console Switching
For more options, see the man manual of Xorg. conf.
Xf86config description
Each section of a file is composed of the following parts:
Section "sectionname"
Sectionentry
...
Endsection
Sectionname includes:
Files file path name
Serverflags server flag
Module dynamic module Loading
Inputdevice input device description
Device graphical device description
Videoadaptor XV video card description
Monitor description
Modes video mode description
Screen Configuration
Serverlayout comprehensive Cascade
Specific Configurations of DRI
Vendor-specific configuration
For the purpose of backward compatibility, although the following items have been abolished, the configuration file can still be identified. The new inputdevice item should be used in the new configuration file.
Keyboard keyboard Configuration
Pointer pointer/mouse Configuration
The old xinput section has been abolished.
Serverlayout is at the highest level. The input and output devices they are bound to are used in this section. The input device is described by inputdevice,
The output device usually consists of multiple independent components. Multiple components form the screen section. Each screen section binds the Graphics Board and monitor together.
The display card is described in the device section and the monitor section.
Rgbpath "path"
Path of the RGB color database. The default value is/usr/x11r6/lib/X11/RGB.
Option "allowmouseopenfail" "Boolean"
The X server is allowed to start even if the mouse device cannot be turned on/initialized.
1) the master node of layout includes mouse/keyboard and Screen
Section "serverlayout"
Identifier "layout0"
Screen "screen0"
# Screen "screen1" below "screen0"
Inputdevice "mouse0" "corepointer"
Inputdevice "keyboard0" "corekeyboard"
Endsection
2) extended support
Section "serverflags"
Option "xinerama" "on" conflicts with dri
Endsection
3) define the mouse
The master device number can be found in/proc/devices. Each physical device is controlled by the device driver.
A device number is assigned.
Section "inputdevice"
Identifier "mouse0"
Driver "Mouse"
Option "protocol" "imps/2" (Key description)
Option "zaxismapping" "4 5"
Option "device" "/dev/input/mice" (for PS/2 interfaces)
Endsection
Emulate3buttons: whether to simulate a 3-Key mouse
4) define the font
Ection "Files"
Rgbpath "/usr/x11r6/lib/X11/RGB"
Fontpath "/usr/x11r6/lib/X11/fonts/local /"
Fontpath "/usr/x11r6/lib/X11/fonts/MISC /"
Fontpath "/usr/x11r6/lib/X11/fonts/75 DPI/: unscaled"
Fontpath "/usr/x11r6/lib/X11/fonts/100 dpi/: unscaled"
Fontpath "/usr/x11r6/lib/X11/fonts/type1 /"
Fontpath "/usr/x11r6/lib/X11/fonts/Speedo /"
Fontpath "/usr/x11r6/lib/X11/fonts/75 dpi /"
Fontpath "/usr/x11r6/lib/X11/fonts/100 dpi /"
# Fontpath "UNIX //: 7100"
Endsection
5) define the video card
Section "device"
Identifier "videocard0"
Option "maid" 0x00000000"
Driver "fglrx" (Drivers/usr/x11r6/lib/modules/drivers)
Vendorname "ATI"
Boardname & quot; ATI radeon 7000 & quot"
Busid "pci: 1: 0: 0" (obtained from lspci and scanpci-V)
Screen0
Endsection
6) define ddcprobe (Display)
Section "Monitor"
Identifier "monitor0"
Vendorname "Sony"
Modelname "Sony CPD-G520"
Horizsync 30.0-121.0 update rate (horizontal display)
Vertrefresh 48.0-160.0 update rate (longitudinal display-resolution)
Option "dpms"
Endsection
7) additional modules
Section "module"
Load "DBE"
Load "extmod"
Load "fbdevhw"
Load "Glx"
Load "record"
Load "FreeType"
Load "type1"
# Load "dri"
Endsection
Users of DRI
# Section "dri"
# Group 10
# Mode 0666
# Endsection
Define Association
Section "screen"
Identifier "screen1"
Device "videocard0" defines the video card
Monitor "monitor1" Display
Defaultdepth 24 color depth
Subsection "display"
Viewport 0 0 virtual screen
Depth 24
Modes "1024x768" Screen Resolution
Endsubsection
Endsection
Videoram mem
This option specifies the number of RAM for the graphics card, in KB. X service programs will automatically detect the display card, so this field must not be specified. '
I am using cent OS Linux, and the display chip on the motherboard is Intel 852gm. I have no problem setting dual-Display Under XP, however, in Linux, the/etc/X11/Xorg is modified. after the conf content, no signal is output on the TV, and the CRT can be displayed normally.
After my research, I finally solved the problem for your reference.
Log on as the root user in the graphic interface and modify the/etc/X11/Xorg. conf file. The following figure shows the modified content.
Section "serverlayout"
Identifier "multihead layout"
Screen 0 "screen0" leftof "screen1"
Screen 1 "screen1" 0 0
Inputdevice "mouse0" "corepointer"
Inputdevice "keyboard0" "corekeyboard"
Option "xinerama" "on"
Option "monitorlayout" "anystr"
Option "clone" "off"
Endsection
Section "Files"
Rgbpath "/usr/x11r6/lib/X11/RGB"
Fontpath "UNIX/: 7100"
Endsection
Section "module"
Load "DBE"
Load "extmod"
Load "fbdevhw"
Load "Glx"
Load "record"
Load "FreeType"
Load "type1"
Load "dri"
Endsection
Section "inputdevice"
Identifier "keyboard0"
Driver "KBD"
Option "xkbmodel" "pc105"
Option "xkblayout" "us"
Endsection
Section "inputdevice"
Identifier "mouse0"
Driver "Mouse"
Option "protocol" "imps/2"
Option "device" "/dev/input/mice"
Option "zaxismapping" "4 5"
Option "emulate3buttons" "yes"
Endsection
Section "Monitor"
Identifier "monitor0"
Vendorname "monitor vendor"
Modelname "syncmaster"
Displaysize 320 240
Horizsync 30.0-71.0
Vertrefresh 50.0-160.0
Option "dpms"
Option "monitorlayout" "CRT, TV"
Endsection
Section "Monitor"
Identifier "monitor1"
Vendorname "monitor vendor"
Modelname "LCD Panel 800x600"
Horizsync 31.5-37.9
Vertrefresh 40.0-70.0
Option "metamodes" "800x600"
Option "tvoutformat" "composite"
Option "tvstandard" "NTSC-M"
Option "connectedmonitor" "TV"
Option "dpms"
Option "monitorlayout" "CRT, TV"
Endsection
Section "device"
Identifier "videocard0"
Driver "i810"
Vendorname "videocard vendor"
Boardname "Intel 852"
Endsection
Section "device"
Identifier "videocard1"
Driver "i810"
Vendorname "videocard vendor"
Boardname "Intel 852"
Busid "pci: 0: 2: 0"
Screen 1
Endsection
Section "screen"
Identifier "screen0"
Device "videocard0"
Monitor "monitor0"
Defaultdepth 24
Subsection "display"
Viewport 0 0
Depth 16
Modes "800x600" "640x480"
Endsubsection
Subsection "display"
Viewport 0 0
Depth 24
Modes "800x600" "640x480"
Endsubsection
Endsection
Section "screen"
Identifier "screen1"
Device "videocard1"
Monitor "monitor1"
Defaultdepth 24
Subsection "display"
Viewport 0 0
Depth 24
Modes "800x600"
Endsubsection
Endsection
Section "dri"
Group 0
Mode 0666
Endsection
Dual-screen Configuration
I still don't know whether the i915 video card can use mergedfb. I used xinerama only when I tried the dual-display. However, dri is prohibited when xinerama is used, as a result, hardware acceleration and 3D effects such as aiglx and xgl cannot be used. The main configurations are in the/etc/X11/Xorg. conf file. The key part is in the device section:
Option "mergedfb" "true"
Another part is in the screen section:
Subsection "display" Depth 24 Virtual 1560 1024 Endsubsection
Subsection "display" Depth 24 Modes "1400x1050 1280x1024x1024" Endsubsection
Add a virtual desktop size definition. Generally, the virtual desktop is the sum of the resolutions of the two monitors. My Xorg. conf configuration:
Section "Files" FontPath "/usr/share/fonts/X11/misc" FontPath "/usr/share/fonts/X11/cyrillic" FontPath "/usr/share/fonts/X11/100dpi/:unscaled" FontPath "/usr/share/fonts/X11/75dpi/:unscaled" FontPath "/usr/share/fonts/X11/Type1" FontPath "/usr/share/fonts/X11/100dpi" FontPath "/usr/share/fonts/X11/75dpi" # path to defoma fonts FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" EndSection
Section "module" Load "I2C" Load "bitmap" Load "DDC" Load "dri" Load "extmod" Load "FreeType" Load "Glx" Load "int10" Load "VBE" Endsection
Section "inputdevice" Identifier "generic keyboard" Driver "KBD" Option "corekeyboard" Option "xkbrules" "Xorg" Option "xkbmodel" "pc105" Option "xkblayout" "us" Endsection
Section "inputdevice" Identifier "configured mouse" Driver "Mouse" Option "corepointer" Option "device" "/dev/input/mice" Option "protocol" "imps/2" Option "zaxismapping" "4 5" Option "emulate3buttons" "true" Endsection
Section "inputdevice" Driver "wacom" Identifier "stylus" Option "device" "/dev/input/wacom" Option "type" "stylus" Option "forcedevice" "isdv4" # Tablet PC only Endsection
Section "inputdevice" Driver "wacom" Identifier "eraser" Option "device" "/dev/input/wacom" Option "type" "eraser" Option "forcedevice" "isdv4" # Tablet PC only Endsection
Section "inputdevice" Driver "wacom" Identifier "cursor" Option "device" "/dev/input/wacom" Option "type" "cursor" Option "forcedevice" "isdv4" # Tablet PC only Endsection
Section "device" Identifier "Intel Corporation mobile 915gm/GMS/910gml express graphics controller" Driver "i810" Busid "pci: 0: 2: 0" Videoram 131072 # Screen 0 Option "no2048limit" "true" Option "dri" "true" Option "mergedfb" "true" Option "ddcmode" "true" Option "monitorlayout" "CRT, LFP" Option "secondposition" "leftof" Option "metamodes" "1024x768-1280x1024 1024x768" Option "mergednonrectangular" "ture" Option "xaanooffscreenpixmaps" "true" Option "mergedxinerama" "true" Option "crt2hsync" "30-82" Option "crt2vrefresh" "50-85" Endsection
Section "Monitor" Identifier "generic monitor" Option "dpms" Horizsync 28-51 Vertrefresh 43-60 Endsection
Section "screen" Identifier "default screen" Device "Intel Corporation mobile 915gm/GMS/910gml express graphics controller" Monitor "generic monitor" Defaultdepth 24 Subsection "display" Depth 24 Virtual 2048 1024 Endsubsection Subsection "display" Depth 24 Modes "1280x1024" "1024x768" Endsubsection Endsection
Section "serverlayout" Identifier "mergedfb" Screen 0 "default screen" 0 0 Inputdevice "generic keyboard" Inputdevice "configured mouse" Inputdevice "stylus" "sendcoreevents" Inputdevice "cursor" "sendcoreevents" Inputdevice "eraser" "sendcoreevents" Endsection
Section "dri" Mode 0666 Endsection
The depressing thing is that the no2048limit parameter does not work. I don't know why. As a result, I can only use the width of 2048, and there will be overlap between the two screens. In addition, I first saw an xserver-Xorg-video-intel package in the library. This version was updated and installed in a confused manner. As a result, it was not completed for a long time, or finally restored to the xserver-xorg-video-i810 to get it done, have not figured out what the relationship between the two packages. Refer: 1 http://dri.freedesktop.org/wiki/MergedFB 2 http://ubuntuforums.org/showthread.php? T = 221174 |