# Xorg configuration file for OLPC

Section "ServerLayout"
	Identifier  "Default Layout"
	Screen      0  "Screen0" 0 0
        InputDevice "stylus"  "SendCoreEvents"
        InputDevice "eraser"  "SendCoreEvents"
        InputDevice "cursor"  "SendCoreEvents"
        InputDevice "pad"
EndSection

#Section "ServerFlags"
	#Option "AllowEmptyInput" "yes"
#EndSection

Section "Module"
	SubSection "extmod"
		Option "omit XFree86-DGA"
		#Option "omit XFree86-Misc" # needed by 'xset m'
		Option "omit MIT-SUNDRY-NONSTANDARD"
		Option "omit TOG-CUP"
		Option "omit Extended-Visual-Information"
	EndSubSection
	Load  "freetype"
	Load  "evdev"
	# Load "record" # Mostly a debugging tool
EndSection

Section "Extensions"
	Option  "XTEST" "Disable" # Mostly a debugging tool
	#Option  "SECURITY" "Disable" # CRASH!
	Option  "XC-APPGROUP" "Disable"
	Option  "XINERAMA" "Disable"
EndSection

Section "Monitor"
	Identifier  "Monitor0"
	HorizSync   30-67
	VertRefresh 48-52 
	DisplaySize 152 114
	Mode "1200x900"
		DotClock 57.275
		HTimings 1200 1208 1216 1240
		VTimings 900 905 908 912
		Flags    "-HSync" "-VSync"
	EndMode
EndSection

Section "Device"
	Identifier  "Videocard0"
	Driver      "amd"
	VendorName  "Advanced Micro Devices, Inc."
	BoardName   "AMD Geode GX/LX"

	Option     "AccelMethod" "EXA"
	Option     "NoCompression" "true"

	# work-around for dlo#9590
	Option     "PanelGeometry" "1200x900"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Videocard0"
	Monitor    "Monitor0"
	DefaultDepth 16
	SubSection "Display"
		Depth   16
		Modes   "1200x900"
		#bernie: this kludge fixes http://dev.laptop.org/ticket/9590
		Virtual	1200 900
	EndSubSection
EndSection
Section "InputDevice"
        Identifier "fake"
        Driver     "void"
EndSection

Section "InputDevice"
        Identifier "ATKbd"
        Driver     "evdev"

        Option  "Name"  "AT Translated Set 2 keyboard"
        Option  "evBits"    "+1"
        Option  "keyBits"   "~1-255 ~352-511"
        Option  "Pass"      "2"
EndSection
Section "InputDevice"
        Identifier "Keyboard"
        Driver     "evdev"

        Option  "evBits"    "+1"
        Option  "keyBits"   "~1-115 ~117-255"
        Option  "Pass"      "3"
EndSection

Section "InputDevice"
        Identifier "Mouse"
        Driver     "evdev"

        Option  "evBits"    "+1-2"
        Option  "keyBits"   "~272-287"
        Option  "Pass"      "3"
EndSection
Section "InputDevice"
        Identifier "GS"
        Driver     "evdev"

        Option  "Name" "OLPC ALPS GlideSensor"
        Option  "evBits"    "+1 +3"
        Option  "keyBits"   "~272-287"
        Option  "absBits"   "~0-2 ~24"
        Option  "Pass"      "2"
        Option  "Mode"      "Relative"
EndSection
Section "InputDevice"
  Driver        "wacom"
  Identifier    "stylus"
  Option        "Device"        "/dev/input/wacom"    # USB ONLY
  Option        "Type"          "stylus"
  Option        "USB"           "on"                  # USB ONLY
  Option        "PressCurve"    "0,0,100,100"
  Option        "Supress"       "60"
EndSection
Section "InputDevice"
  Driver        "wacom"
  Identifier    "eraser"
  Option        "Device"        "/dev/input/wacom"    # USB ONLY
  Option        "Type"          "eraser"
  Option        "USB"           "on"                  # USB ONLY
  Option        "Supress"       "60"
EndSection
Section "InputDevice"
  Driver        "wacom"
  Identifier    "cursor"
  Option        "Device"        "/dev/input/wacom"    # USB ONLY
  Option        "Type"          "cursor"
  Option        "Mode"          "relative"
  Option        "USB"           "on"                  # USB ONLY
  Option        "Supress"       "60"
EndSection

# This section is for Intuos3, CintiqV5, Graphire4, or Bamboo without touch
Section "InputDevice"
  Driver        "wacom"
  Identifier    "pad"
  Option        "Device"        "/dev/input/wacom"    # USB ONLY
  Option        "ButtonsOnly"   "on"
  Option        "Buttons9"      "2"
  Option        "Buttons10"     "3"
  Option        "Type"          "pad"
  Option        "USB"           "on"                  # USB ONLY
  Option        "Supress"       "60"
EndSection

# This section is for USB Bamboo with touch
Section "InputDevice"
  Driver        "wacom"
  Identifier    "pad"
  Option        "Device"        "/dev/input/wacom-touch"    # USB ONLY
  Option        "Type"          "pad"
  Option        "USB"           "on"                  # USB ONLY
EndSection
