# **********************************************************************
# Files section.  This allows default font and rgb paths to be set
# **********************************************************************

Section "Files"

    # The location of the RGB colour database.
    RgbPath "/usr/lib/X11/rgb"

    # Set the search path for fonts.
    FontPath	"/usr/share/fonts/misc/"
    FontPath	"/usr/share/fonts/75dpi/:unscaled"
    FontPath	"/usr/share/fonts/100dpi/:unscaled"
    FontPath	"/usr/share/fonts/Type1/"
    FontPath    "/usr/share/fonts/TTF/"
    FontPath	"/usr/share/fonts/CID/"
    FontPath	"/usr/share/fonts/Speedo/"
    FontPath	"/usr/share/fonts/75dpi/"
    FontPath	"/usr/share/fonts/100dpi/"

    # The module search path.  The default path is shown here.
    ModulePath	"/usr/lib/modules"

EndSection

# ***************************
# ServerFlags - Server flags
# ***************************
Section "ServerFlags"

    # Set the screen saver time to be 2 minutes.
    Option "blank time" "2"

    # Set the power down times for the monitor to be huge.
    Option "standby time" "20"
    Option "suspend time" "30"
    Option "off time"     "60"

EndSection

# **********************************************************************
# Module section -- this is an optional section which is used to specify
# which run-time loadable modules to load when the X server starts up.
# **********************************************************************
Section "Module"

    # This loads the double buffer extension module.
    Load "dbe"

    # This loads the miscellaneous extensions module, and disables
    # initialisation of the XFree86-DGA extension within that module.
    SubSection "extmod"
        Option "omit xfree86-dga"
    EndSubSection

    # This loads the Type1 and FreeType font modules.
    Load "type1"
    Load "freetype"
    
    # This loads the GLX modules for OpenGL rendering.
    Load "glx"

    # This loads the DRI module for direct rendering infra-structure.
    Load "dri"

EndSection

# ***************************************
# InputDevice - Input device description
# ***************************************
Section "InputDevice"
	
    # Keyboard with standard protocol (default but included for completeness).
    # Allow all keyboard LED's to be user-controlled with xset, and set the
    # layout and auto-repeat.
    Identifier "Keyboard1"
    Driver     "keyboard"
    Option     "Protocol"   "Standard"
    Option     "AutoRepeat" "500 30"
    Option     "Xleds"      "1 2 3"

    Option     "XkbModel"   "pc105"
    Option     "XkbLayout"  "gb"

EndSection

Section "InputDevice"

    Identifier	"Mouse1"
    Driver	"mouse"
    Option      "Protocol" "PS/2"
    Option      "Device"   "/dev/input/mice"

EndSection

# ************************************
# Device - Graphics device description
# ************************************
# Standard VGA device.
#Section "Device"

#    Identifier "Standard VGA"
#    VendorName "Unknown"
#    BoardName  "Unknown"
#    Driver     "vga"

#EndSection

Section "Device"

    Identifier "Via VGA"
    Driver     "via"
    #Option     "ActiveDevice" "CRT,TV" 
    Option     "EnableAGPDMA" "true" 
    BusID      "PCI:1:0:0"

EndSection

Section "Device"

    Identifier "Via S-Video"
    Driver     "via"
    VendorName "Via"
    BoardName  "cle266"
    Option     "PciRetry"     "true"
    Option     "TVType"       "PAL"
    Option     "TVOutput"     "S-Video"
    Option     "EnableAGPDMA" "true" 
    #Option     "ActiveDevice" "CRT,TV" 
    BusID      "PCI:1:0:0"
    
EndSection

Section "Device"

    Identifier "Via RGB"
    Driver     "via"
    VendorName "Via"
    BoardName  "cle266"
    Option     "PciRetry"     "true"
    Option     "TVType"       "PAL"
    Option     "TVOutput"     "RGB"
    Option     "EnableAGPDMA" "true" 
    #Option     "ActiveDevice" "CRT,TV" 
    BusID      "PCI:1:0:0"

EndSection

# *******************************************
# VideoAdaptor - Xv video adaptor description
# *******************************************
# Lack of docs for this section.

# *****************************
# Monitor - Monitor description
# *****************************
Section "Monitor"

    Identifier	"Generic Monitor"

EndSection

Section "Monitor"

    Identifier   "MonitorTvRGB"
    VendorName   "tv"
    ModelName    "PAL TV"
    HorizSync    15.625
    VertRefresh  50.0
    ModeLine     "640x480"    12.5    640  650  700  800  480 490 492 625 -hsync -vsync interlace
    ModeLine     "720x576o"   14.0625 720  760  800  900  576  600  615  625 -hsync -vsync interlace
    ModeLine     "720x576"    14.0625 720  760  800  900  576  580  600  625 -hsync -vsync interlace
    ModeLine     "800x600"    16.25   800  820  950  1040 600  600  610  625 -hsync -vsync interlace
    ModeLine     "1024x576"   16.25   1024 1030 1035 1040 576  600  612  625 -hsync -vsync interlace
    ModeLine     "1024x576.1" 18.75   1024 1060 1160 1200 576  600  612  625 -hsync -vsync interlace

EndSection

Section "Monitor"

    Identifier  "MonitorTv"
    VendorName  "tv"
    ModelName   "TV-PAL"
    HorizSync   24.0 - 80.0
    VertRefresh 50.0 - 75.0
    Option	    "nodpms"
    Option	    "noddc"
    
    # Set for 4:3 display
    DisplaySize 300 225
    # Set for 16:9 display
    #DisplaySize 400 225
        
    # Refresh Rate 60Hz
    ModeLine "720x480"   26.7  720  736  808  896  480  481  484  497
    ModeLine "720x576"   32.7  720  744  816  912  576  577  580  597
    ModeLine "848x480"   31.5  848  864  952  1056 480  481  484  497
    ModeLine "856x480"   31.7  856  872  960  1064 480  481  484  497
    ModeLine "1024x512"  41.3  1024 1056 1160 1296 512  513  516  531
    ModeLine "1280x768"  80.1  1280 1344 1480 1680 768  769  772  795
    ModeLine "1440x1050" 126.2 1440 1536 1688 1936 1050 1051 1054 1087

    # Refresh Rate 75Hz
    #ModeLine "720x480"   34.9  720  752  824  928  480  481  484  502
    #ModeLine "720x576"   42.6  720  760  832  944  576  577  580  602
    #ModeLine "848x480"   41.0  848  880  968  1088 480  481  484  502
    #ModeLine "856x480"   41.3  856  888  976  1096 480  481  484  502
    #ModeLine "1024x512"  53.3  1024 1072 1176 1328 512  513  516  535
    #ModeLine "1280x768"  103.0 1280 1360 1496 1712 768  769  772  802
    #ModeLine "1440x1050" 160.0 1440 1536 1696 1952 1050 1051 1054 1096

    # Refresh Rate 85Hz
    #ModeLine "1280x768"  118.5 1280 1368 1504 1728 768  769  772  807
    #ModeLine "1440x1050" 184.5 1440 1544 1704 1968 1050 1051 1054 1103
    #ModeLine "848x480"   47.4  848  888  976  1104 480  481  484  505
    
EndSection

# *******************************
# Modes - Video mode descriptions
# *******************************
# Use built in set of VESA standard modes.

# *****************************
# Screen - Screen configuration
# *****************************
Section "Screen"

    Identifier   "Monitor Screen"
    Device       "Via VGA"
    Monitor      "Generic Monitor"
    DefaultDepth 16

    Subsection "Display"
        Depth    8
        Modes    "640x480" "800x600" 
        Virtual  640 480
        ViewPort 0 0
    EndSubsection
    Subsection "Display"
        Depth    16
        Modes    "640x480" "800x600" 
        Virtual  640 480
        ViewPort 0 0
    EndSubsection
    
EndSection

Section "Screen"

    Identifier   "S-Video Screen"
    Device       "Via S-Video"
    Monitor      "MonitorTv"
    DefaultDepth 24
    
    SubSection "Display"
        Viewport 0 0
        Depth    24
        Modes    "720x576Noscale"
        Virtual  720 576
    EndSubSection

    SubSection "Display"
        Depth    16
        #Modes    "720x576"
        Modes    "720x576Noscale"
        Virtual  720 576
        Viewport 0 0
    EndSubSection

EndSection

Section "Screen"

    Identifier   "RGB Screen"
    Device       "Via RGB"
    Monitor      "MonitorTv"
    DefaultDepth 32

    SubSection "Display"
        Viewport 0 0
        Depth    32
        Modes    "720x576Noscale"
        Virtual  720 576
    EndSubSection
    
    SubSection "Display"
        Viewport 0 0
        Depth    24
        Modes    "720x576Noscale"
        Virtual  720 576
    EndSubSection

    SubSection "Display"
        Depth    16
        #Modes    "720x576"
        Modes    "720x576Noscale"
        Virtual  720 576
    EndSubSection

EndSection
                                                                                
# *****************************
# ServerLayout - Overall layout
# *****************************
# Used to specify multiple screens and the layout of them, if required.
Section "ServerLayout"

    Identifier  "Simple Layout"
    #Screen      "Monitor Screen"
    Screen      "RGB Screen"
    #Screen      "S-Video Screen"
    InputDevice "Mouse1"    "CorePointer"
    InputDevice "Keyboard1" "CoreKeyboard"

EndSection

# ********************************
# DRI - DRI-specific configuration
# ********************************
Section "DRI"

    # Ensure that all users can take advantage of direct rendering.
    Group 0
    Mode  0666

EndSection

# **************************************
# Vendor - Vendor-specific configuration
# **************************************

# *******************
# Xorg specific stuff
# *******************
#Section "Extensions"

    # Allow composite offscreen drawing for transparency etc.
#    Option "Composite" "Enable"
    
#EndSection

