Satissh S
Youngling
In the way of my life with linux, as everyone, i have faced a lot of troubles, but each trouble of mine proves to be a stepping stone to attaining a higher level of understanding of this wonderful operating system. I had to learn deep about X when i had to setup my cards and other x components working.
Editing the xfree86.conf or xorg.conf file to get one's graphics card working is one of the biggest hurdles for a linux newbie. Only if he could understand what he is doing, he could get rid of the fear that holds him back. The purpose of this article is just that
Basically the afore mentioned files address to three types of settings.
1. Global Settings - X Settings.
2. Device Specific Settings.
3. A structure Sectional layout that combines the above two.
The Structure :
The Xorg.conf (I will be referring only to this file whilst the same holds true for the other as well) is basically structured into different sections.
Like this,
Section Name used to identify the device /*Start of the Section**/
Device Name of The Device
Driver The driver that x loads to run the device
Option Different Options and parametres for the device
EndSection /*End of the Section **/
In addition to the above sections there are special sections or device specific settings that one can configure.
The Base Sections :
Here are a few basic sections that are found in the xorg.conf files and their functions.
1. ServerLayout:
Section ServerLayout /*Start of the Section**/
identifier Single head configuration or multi head configuration /*If you have multiple displays on different graphics cards multi head mode is used otherwise, Single head mode will be used**/
Screen 0 "screen0" 0 0 /* This Section identifies that a screen named screen0 is where x will run. In single mode configurations the screen is usually denoted as 0 0 whereas if in multihead mode, it'll be different and the identifier for the second screen would be screen1. **/
InputDevice Name of The Device /* Specifies the input defices and their identifiers eg:"Mouse0" and its parametre "core pointer" which it is set to*/
EndSection /*End of the Section **/
2. Screen Configuration :
Section Screen /*Start of the Section**/
Identifier "Screen0"
Device "Videocard 0" /* Refers to the Section Videocard **/
Monitor "Monitor 0" /* Refers to the Section Monitor **/
DefaultDepth <integer representing the bits of depth of color (eg: 16, 24)>
Subsection "Display" /* Section Within the Current Section **/
Depth <integer representing the bits of depth of color (eg: 16, 24)>
Modes < Different Resolutions For the above Depth >
EndSubSection /* Ends the Subsection **/
EndSection /*End of the Section **/
3. Mouse Configuration :
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option <options>
EndSection
The Options include,
1. Protocol to Specify your protocol such as "IMPS/2" or "PS/2" or "usb" as parametres to the protocol option.
2. Device to Specify where the Device is connected to, Such as "/dev/psaux" for PS/2 for Serial Mouse /dev/ttyS0 for COM1 Port.
3. ZAxisMapping to set wheel motion for a wheel mouse as "int int"- two integers specifing the motion of the wheel.
3. Keyboard Configuration :
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option <options>
EndSection
The Options Include,
1. XkbLayout to specify a keyboard layout an "us" or any other layout.
2. AutoRepeat to specify the number of times keys will be repeated as two options, <Delay time before a key that is held down starts repeating> <number of times the key is repeated per second>.
3. XkbModel Specifies the keyboard model such as pc101 , pc102 or microsoft .
4. Monitor Configurations :
Section "Monitor"
Identifier "Monitor0"
VendorName "<Monitor Vendor>"
ModelName <Model Name>
HorizSync <Horizontal refresh rates> /* Specify your horizontal refresh rates here **/
VertRefresh <vertical Refresh Rates /* Specify your vertical refresh rates here **/
Option "dpms" /* The DPMS option specifies whether you want to use the powersaving features of the monitor. It supports standby and suspend functions **/
EndSection
5. VideoCard Configurations :
Section "Device"
Identifier "VideoCard0"
Driver "<Name of the driver>" /* nv , vesa ,nvidia etc., **/
VendorName <Name of the Vendor> /* Name of the Card **/
BoardName <Name of the Board> /*Name of the board of the Card **/
EndSection
Note About Vesa Driver:
Vesa Stands for Video Electronics Standards Association (VESA). You can get your unsupported graphics card to work if you can specify vesa in the driver section and later install the appropriate driver and update the xorg.conf file.
6. Module Configurations :
When X Server Starts up it looks for the following section for knowing the modules it has to load.
Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "dri"
Load "freetype"
Load "type1"
Load "xtt"
Load "speedo"
EndSection
Explanation of Modules:
1. dbe:
Required for animations. Implements Double buffering for flicker free and smooth of animations.
2. extmod:
Loads module for performing common functions in X Server.
3. fbdevhw:
The Linux framebuffer module which is used to let x communicate with framebuffer device in linux.(/dev/fb0)
4. glx:
The glx extension connects the DRI 3D library and X.
the following command gives you information about glx and the fps at which xserver functions:-
#glxgears -info
5. record:
The record module adds record extension to capture events that are associated with recording and playback user actions.
6. dri:
Loads Direct Rendering Interface to provide accelerated 3d graphics. NOT SUPPORTED BY NVIDIA CARDS
7. freetype:
Loads the module that can handle TrueType (.ttf and .ttc) ,Type1 (.pfa and .pbf) and OpenType (.otf and .otc) Fonts
Additionally there can also be another section called DRI
Section "DRI"
Mode 0000 /* Specifies the mode in which DRI will run Eg: 0666 etc., **/
EndSection
The Above Mentioned are the prime sections of the xorg.conf file which can be edited to your preferences. Hope the above was useful
Any Corrections, Suggestions and tips will be gleefully acknowledged.
The Document is licensed under Free Document Licence and FSF.
Editing the xfree86.conf or xorg.conf file to get one's graphics card working is one of the biggest hurdles for a linux newbie. Only if he could understand what he is doing, he could get rid of the fear that holds him back. The purpose of this article is just that
Basically the afore mentioned files address to three types of settings.
1. Global Settings - X Settings.
2. Device Specific Settings.
3. A structure Sectional layout that combines the above two.
The Structure :
The Xorg.conf (I will be referring only to this file whilst the same holds true for the other as well) is basically structured into different sections.
Like this,
Section Name used to identify the device /*Start of the Section**/
Device Name of The Device
Driver The driver that x loads to run the device
Option Different Options and parametres for the device
EndSection /*End of the Section **/
In addition to the above sections there are special sections or device specific settings that one can configure.
The Base Sections :
Here are a few basic sections that are found in the xorg.conf files and their functions.
1. ServerLayout:
Section ServerLayout /*Start of the Section**/
identifier Single head configuration or multi head configuration /*If you have multiple displays on different graphics cards multi head mode is used otherwise, Single head mode will be used**/
Screen 0 "screen0" 0 0 /* This Section identifies that a screen named screen0 is where x will run. In single mode configurations the screen is usually denoted as 0 0 whereas if in multihead mode, it'll be different and the identifier for the second screen would be screen1. **/
InputDevice Name of The Device /* Specifies the input defices and their identifiers eg:"Mouse0" and its parametre "core pointer" which it is set to*/
EndSection /*End of the Section **/
2. Screen Configuration :
Section Screen /*Start of the Section**/
Identifier "Screen0"
Device "Videocard 0" /* Refers to the Section Videocard **/
Monitor "Monitor 0" /* Refers to the Section Monitor **/
DefaultDepth <integer representing the bits of depth of color (eg: 16, 24)>
Subsection "Display" /* Section Within the Current Section **/
Depth <integer representing the bits of depth of color (eg: 16, 24)>
Modes < Different Resolutions For the above Depth >
EndSubSection /* Ends the Subsection **/
EndSection /*End of the Section **/
3. Mouse Configuration :
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option <options>
EndSection
The Options include,
1. Protocol to Specify your protocol such as "IMPS/2" or "PS/2" or "usb" as parametres to the protocol option.
2. Device to Specify where the Device is connected to, Such as "/dev/psaux" for PS/2 for Serial Mouse /dev/ttyS0 for COM1 Port.
3. ZAxisMapping to set wheel motion for a wheel mouse as "int int"- two integers specifing the motion of the wheel.
3. Keyboard Configuration :
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option <options>
EndSection
The Options Include,
1. XkbLayout to specify a keyboard layout an "us" or any other layout.
2. AutoRepeat to specify the number of times keys will be repeated as two options, <Delay time before a key that is held down starts repeating> <number of times the key is repeated per second>.
3. XkbModel Specifies the keyboard model such as pc101 , pc102 or microsoft .
4. Monitor Configurations :
Section "Monitor"
Identifier "Monitor0"
VendorName "<Monitor Vendor>"
ModelName <Model Name>
HorizSync <Horizontal refresh rates> /* Specify your horizontal refresh rates here **/
VertRefresh <vertical Refresh Rates /* Specify your vertical refresh rates here **/
Option "dpms" /* The DPMS option specifies whether you want to use the powersaving features of the monitor. It supports standby and suspend functions **/
EndSection
5. VideoCard Configurations :
Section "Device"
Identifier "VideoCard0"
Driver "<Name of the driver>" /* nv , vesa ,nvidia etc., **/
VendorName <Name of the Vendor> /* Name of the Card **/
BoardName <Name of the Board> /*Name of the board of the Card **/
EndSection
Note About Vesa Driver:
Vesa Stands for Video Electronics Standards Association (VESA). You can get your unsupported graphics card to work if you can specify vesa in the driver section and later install the appropriate driver and update the xorg.conf file.
6. Module Configurations :
When X Server Starts up it looks for the following section for knowing the modules it has to load.
Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "dri"
Load "freetype"
Load "type1"
Load "xtt"
Load "speedo"
EndSection
Explanation of Modules:
1. dbe:
Required for animations. Implements Double buffering for flicker free and smooth of animations.
2. extmod:
Loads module for performing common functions in X Server.
3. fbdevhw:
The Linux framebuffer module which is used to let x communicate with framebuffer device in linux.(/dev/fb0)
4. glx:
The glx extension connects the DRI 3D library and X.
the following command gives you information about glx and the fps at which xserver functions:-
#glxgears -info
5. record:
The record module adds record extension to capture events that are associated with recording and playback user actions.
6. dri:
Loads Direct Rendering Interface to provide accelerated 3d graphics. NOT SUPPORTED BY NVIDIA CARDS
7. freetype:
Loads the module that can handle TrueType (.ttf and .ttc) ,Type1 (.pfa and .pbf) and OpenType (.otf and .otc) Fonts
Additionally there can also be another section called DRI
Section "DRI"
Mode 0000 /* Specifies the mode in which DRI will run Eg: 0666 etc., **/
EndSection
The Above Mentioned are the prime sections of the xorg.conf file which can be edited to your preferences. Hope the above was useful
Any Corrections, Suggestions and tips will be gleefully acknowledged.
The Document is licensed under Free Document Licence and FSF.