# XF86Config-4 (XFree86 X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the XF86Config-4 manual page.
# (Type "man XF86Config-4" at the shell prompt.)
#
# This file is automatically updated on xserver-xfree86 package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xfree86
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following commands as root:
#
#   cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.custom
#   md5sum /etc/X11/XF86Config-4 > /var/lib/xfree86/XF86Config-4.md5sum
#   dpkg-reconfigure xserver-xfree86

Section "Files"
	FontPath	"unix/:7100"			# local font server
	# if the local font server has problems, we can fall back on these
	FontPath	"/usr/lib/X11/fonts/misc"
	FontPath	"/usr/lib/X11/fonts/cyrillic"
	FontPath	"/usr/lib/X11/fonts/100dpi/:unscaled"
	FontPath	"/usr/lib/X11/fonts/75dpi/:unscaled"
	FontPath	"/usr/lib/X11/fonts/Type1"
	FontPath	"/usr/lib/X11/fonts/CID"
	FontPath	"/usr/lib/X11/fonts/Speedo"
	FontPath	"/usr/lib/X11/fonts/100dpi"
	FontPath	"/usr/lib/X11/fonts/75dpi"
EndSection

# Comment out some modules - functionality is provided by nvidia
Section "Module"
#	Load	"GLcore"
	Load	"synaptics"
	Load	"bitmap"
	Load	"dbe"
	Load	"ddc"
#	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"record"
#	Load	"speedo"
	Load	"type1"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"keyboard"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xfree86"
	Option		"XkbModel"	"pc104"
	Option		"XkbLayout"	"us"
EndSection

# These parameters obtained from a mailing list post somewhere...
Section "InputDevice"
	Identifier	"Alps Touchpad"
	Driver		"synaptics"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/event2"
	Option		"Protocol"		"event"
	Option		"LeftEdge"		"60"
	Option		"RightEdge"		"830"
	Option		"TopEdge"		"70"
	Option		"BottomEdge"		"650"
	Option		"FingerLow"		"25"
	Option		"FingerHigh"		"30"
	Option		"MaxTapTime"		"180"
	Option		"MaxTapMove"		"110"
	Option		"EmulateMidButtonTime"	"75"
	Option		"SHMConfig"		"on"
	Option		"VertScrollDelta"	"50"
	Option		"HorizScrollDelta"	"50"
	Option		"MinSpeed"		"0.2"
	Option		"MaxSpeed"		"0.5"
	Option		"AccelFactor"		"0.01"
	Option		"EdgeMotionSpeed"	"40"
	Option		"UpDownScrolling"	"1"
	Option		"TouchpadOff"	"0"
EndSection

Section "InputDevice"
     Identifier "Bluetooth_mouse"
     Driver "mouse"
     Option "Protocol" "ExplorerPS/2"
     Option "Device" "/dev/input/mice"
     Option "ZAxisMapping" "4 5"
     Option "Buttons" "5"
     Option "Emulate3Buttons" "false"
EndSection 

#Section "InputDevice"
#	Identifier	"Bluetooth_mouse"
#	Driver		"mouse"
#	Option		"SendCoreEvents"	"true"
#	Option		"Device"		"/dev/input/event4"
#	Option		"Protocol"		"ImPS/2"
#	Option		"Emulate3Buttons"	"true"
#	Option		"ZAxisMapping"		"4 5"
#EndSection


#Section "InputDevice"
#        Identifier      "Mouse2"
#        Driver          "mouse"
#        Option          "SendCoreEvents"        "true"
#        Option          "Device"                "/dev/input/event4"
#        Option          "Protocol"              "ImPS/2"
#        Option          "Emulate3Buttons"       "true"
#        Option          "ZAxisMapping"          "4 5"
#EndSection

#Section "InputDevice"
#        Identifier      "Mouse3"
#        Driver          "mouse"
#        Option          "SendCoreEvents"        "true"
#       Option          "Device"                "/dev/input/mouse3"
#        Option          "Protocol"              "ImPS/2"
#        Option          "Emulate3Buttons"       "true"
#        Option          "ZAxisMapping"          "4 5"
#EndSection
							

# This section is only used for non-twinview layout
Section "Modes"
	# Here is the optimal mode: 1280x800 @ 60.0Hz
	Identifier "16:10"
	# 1280x800 @ 60.00Hz (GTF) hsync: 49.68kHz; pclk: 83.46MHz
	ModeLine "1200x800" 83.5 1280 1344 1480 1680 800 801 804 828
EndSection

# Twinview setup
# The external monitor is configured to pan to the full resolution of
# the internal LCD.
Section "Device"
	Identifier	"NVidia GeForce4 440 Go 64M Twin"
	Driver		"nvidia"
	Option		"NvAgp"			"3"
	Option		"NoLogo"		"0"
	Option		"UseEdidFreqs"		"1"
	Option		"FlatPanelProperties"	"Scaling = aspect-scaled"
	Option		"TwinView"		"1"
	Option		"TwinViewOrientation"	"Clone"
	Option		"SecondMonitorHorizSync"	"30-90"
	Option		"SecondMonitorVertRefresh"	"50-75"
	Option		"MetaModes"		"1024x768 @1280x800,1280x800 @1280x800"
EndSection

# Non-twinview setup
Section "Device"
	Identifier	"NVidia GeForce4 440 Go 64M"
	Driver		"nvidia"
	Option		"NvAgp"			"1"
	Option		"NoLogo"		"0"
	Option		"UseEdidFreqs"		"1"
	Option		"FlatPanelProperties"	"Scaling = aspect-scaled"
EndSection

# This monitor is only needed in the non-twinview setup
Section "Monitor"
	Identifier	"WXGA LCD"
	UseModes	"16:10"
	HorizSync	30-90
	VertRefresh	50-75
	Option		"UseEdidFreqs"		"1"
	Option		"FlatPanelProperties"	"Scaling = aspect-scaled"
EndSection

# In twinview, the external monitor is the primary and the laptop
# LCD is the secondary.  The modeline here is not needed for the
# external monitor, but gets passed to the nvidia driver, which 
# needs it for the internal LCD
Section "Monitor"
	Identifier	"External"
	ModeLine "1024x768" 83.5 1280 1344 1480 1680 800 801 804 828
	Option		"UseEdidFreqs"		"1"
EndSection

Section "Screen"
	Identifier	"External Screen"
	Device		"NVidia GeForce4 440 Go 64M Twin"
	Monitor		"External"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes		"1280x1024" "1024x768" "800x600" "640x480"
	Virtual 1024 768
	EndSubSection
EndSection

# This screen is only used in the non-twinview layout
Section "Screen"
	Identifier	"WXGA Screen"
	Device		"NVidia GeForce4 440 Go 64M"
	Monitor		"WXGA LCD"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
		Modes		"1024x768"
	Virtual 1024 768
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"WXGA Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Alps Touchpad"
	InputDevice	"Bluetooth_mouse"
#	InputDevice	"Mouse2"
#	InputDevice	"Mouse3"
EndSection

Section "ServerLayout"
	Identifier	"twinview"
	Screen		"External Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Alps Touchpad"
	InputDevice	"Bluetooth_mouse"
#	InputDevice	"Mouse2"
#	InputDevice	"Mouse3"
EndSection

Section "DRI"
	Mode	0666
EndSection
