Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old February 14th, 2007   #1
featherking
Gee! These Aren't Roasted!
 
featherking's Avatar
 
Join Date: May 2006
Location: Salt Lake City
Beans: 210
Ubuntu 6.10 Edgy
How To: Svideo / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945

How To: Svideo(cloned) / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945 (i810 driver)

*The basic purpose of this is to enable your Svideo-out and also your VGA-out ports on your computer*
I have used this successfully on 32bit Feisty using my i945(i810 driver)
We know it works on the i945, and the i915 for sure; however, i suspect it will work with all i810 driver-using chipsets
Others have successfully used it in Kubuntu,Dapper Drake, Edgy Eft, and even Archlinux

I have a little script that i use to switch inbetween the different xorgs that we will set up.

STEP ONE
run this to create the script:
Code:
sudo gedit /usr/bin/switchmon
credit goes to groggyboy for his modification of my original script, it is now very automated and very nice!!
then paste the following code into the open gedit window:
*note* This script, by default, assumes you are running beryl in gnome. If you are running beryl in KDE, comment out the gnome line and uncomment the KDE line. If you dont run beryl at all, comment out both lines. The reason is - beryl does not work properly with the Xorg file and will crash everytime if it isnt disabled. I have bolded the a few of the lines as an example of where to look. These will have to be edited for every xorg if you do run KDE or no beryl at all.*/note*
Code:
#!/bin/sh
#
cmd=${0##*/}                              # Command's basename
msg="\n\tUsage: $cmd [1|2|3|4|5]\n\t\t1 = Single Monitor\n\t\t2 = SVideo Dual Monitor\n\t\t3 = Svideo Clone\n\t\t4 = VGA Dual Monitor\n\t\t5 = VGA Clone Desktop"

if [ $# -lt 1 ]; then
	echo $msg
	exit 0
fi 
if [ $1 = "4" ]; then
	echo -e "\nChanging to VGA Dual Monitor mode"
	# The following two lines are important only if you use Beryl.
	# Uncomment the appropriate line for your DE.  Comment both out if you don't use Beryl.
	mv ~/.config/autostart/beryl-manager.desktop ~/.config/beryl-manager.off # <-GNOME
	#mv ~/.kde/Autostart/beryl-manager.desktop ~/.kde/beryl-manager.off # <-KDE
	sudo cp /etc/X11/xorg.conf.dual /etc/X11/xorg.conf
	sudo pkill Xorg
	echo
	exit 2
fi
if [ $1 = "5" ]; then
	echo -e "\nChanging to VGA Cloned Desktop mode"
	# The following two lines are important only if you use Beryl.
	# Uncomment the appropriate line for your DE.  Comment both out if you don't use Beryl.
	mv ~/.config/autostart/beryl-manager.desktop ~/.config/beryl-manager.off # <-GNOME
	#mv ~/.kde/Autostart/beryl-manager.desktop ~/.kde/beryl-manager.off # <-KDE
	sudo cp /etc/X11/xorg.conf.clone /etc/X11/xorg.conf
	sudo pkill Xorg
	echo
	exit 2
fi
if [ $1 = "3" ]; then
	echo -e "\nChanging to S-Video(Clone) mode"
	# The following two lines are important only if you use Beryl.
	# Uncomment the appropriate line for your DE.  Comment both out if you don't use Beryl.
	mv ~/.config/autostart/beryl-manager.desktop ~/.config/beryl-manager.off # <-GNOME
	#mv ~/.kde/Autostart/beryl-manager.desktop ~/.kde/beryl-manager.off # <-KDE
	sudo cp /etc/X11/xorg.conf.sclone /etc/X11/xorg.conf
	sudo pkill Xorg
	echo
	exit 2
fi
if [ $1 = "2" ]; then
	echo -e "\nChanging to S-Video(Dual) mode"
	# The following two lines are important only if you use Beryl.
	# Uncomment the appropriate line for your DE.  Comment both out if you don't use Beryl.
	mv ~/.config/autostart/beryl-manager.desktop ~/.config/beryl-manager.off # <-GNOME
	#mv ~/.kde/Autostart/beryl-manager.desktop ~/.kde/beryl-manager.off # <-KDE
	sudo cp /etc/X11/xorg.conf.svideo /etc/X11/xorg.conf
	sudo pkill Xorg
	echo
	exit 2
elif [ $1 = "1" ]; then
	echo -e "\nChanging to Single Monitor mode"
	# The following two lines are important only if you use Beryl.
	# Uncomment the appropriate line for your DE.  Comment out both if you don't use Beryl.
	mv ~/.config/beryl-manager.off ~/.config/autostart/beryl-manager.desktop # <-GNOME
	#mv ~/.kde/beryl-manager.off ~/.kde/Autostart/beryl-manager.desktop # <-KDE
	sudo cp /etc/X11/xorg.conf.single /etc/X11/xorg.conf
	sudo pkill Xorg
	echo
	exit 1
else
	echo "Invalid Number" $msg
	exit 0
fi
then save and exit. we need to make that file executable so it can do its job:
Code:
sudo chmod +x /usr/bin/switchmon
Now we need to create the different xorg.conf files that we will switch between
*note* You will probably have to edit the resolution values in these files to match whatever you are
trying to get, i just use my laptop so im limited to 1280x800 but some people might have bigger monitors or whatever*/note*

STEP TWO

We will copy the xorg.conf to a different named file so we can switch back to it when not using svideo:
Code:
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.single
Now we create the svideo dual monitor version of the xorg:
Code:
sudo gedit /etc/X11/xorg.conf.svideo
Paste the following into that window:
Code:
# /etc/X11/xorg.conf (xorg 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 /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
	FontPath	"/usr/share/X11/fonts/misc"
	FontPath	"/usr/share/X11/fonts/cyrillic"
	FontPath	"/usr/share/X11/fonts/100dpi/:unscaled"
	FontPath	"/usr/share/X11/fonts/75dpi/:unscaled"
	FontPath	"/usr/share/X11/fonts/Type1"
	FontPath	"/usr/share/X11/fonts/100dpi"
	FontPath	"/usr/share/X11/fonts/75dpi"
	# path to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load	"bitmap"
	#Load 	"GLcore"
	Load	"ddc"
	Load	"dbe"
	#Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"type1"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc104"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ExplorerPS/2"
	Option		"ZAxisMapping"		"4 5"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option		"HorizScrollDelta"	"0"
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "stylus"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "stylus"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "eraser"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "eraser"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "cursor"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "cursor"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "Device"
	Identifier "LCD"
	Driver "i810"
	Option "MonitorLayout"	"TV,LFP"
	Screen 0
	BusID "PCI:0:2:0"
EndSection

Section "Device"
	Identifier "TV"
	Driver "i810"
	Option "MonitorLayout"	"TV,LFP"
	Option "TVStandard"	"NTSC"
	Option "TVOutFormat"	"SVIDEO" # "COMPOSITE"
	Option "ConnectedMonitor"	"TV"
	Screen 1
	BusID "PCI:0:2:0"
EndSection

Section "Monitor"
	Identifier	"LCD"
	Option		"DPMS"
	HorizSync	30 - 81
	VertRefresh	56 - 76
EndSection

Section "Monitor"
	Identifier	"TV"
	HorizSync	30-50
	VertRefresh	60
EndSection

Section "Screen"
	Identifier	"LCD"
	Device		"LCD"
	Monitor		"LCD"
	DefaultDepth	24
	SubSection "Display"
		Depth		1
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		4
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		8
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		15
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		16
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"800x600" "640x480"
	EndSubSection
EndSection

Section "Screen"
	Identifier	"TV"
	Device		"TV"
	Monitor		"TV"
	DefaultDepth	24

	SubSection "Display"
		Depth	24
		Modes	"800x600" "640x480"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"LCDandTV"
	Screen		0 "LCD"
	Screen		1 "TV" RightOf "LCD"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice	"Synaptics Touchpad"
#	Option 		"AIGLX" "true"
EndSection

Section "ServerFlags"
	Option		"DefaultServerLayout" "LCDandTV"
EndSection
Now save and close the file.

This creates the svideo xorg that will clone your two screens:
Code:
sudo gedit /etc/X11/xorg.conf.sclone
paste the following into that window:
*note* You may want to copy only from the "Section 'Device'" line and below depending on your hardware, if you have a different mouse or something just make a copy of your current xorg.conf and save it as xorg.conf.svideo and then replace from the Device line below in your file with what ive posted here */note*
Code:
# /etc/X11/xorg.conf (xorg 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 /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
	FontPath	"/usr/share/X11/fonts/misc"
	FontPath	"/usr/share/X11/fonts/cyrillic"
	FontPath	"/usr/share/X11/fonts/100dpi/:unscaled"
	FontPath	"/usr/share/X11/fonts/75dpi/:unscaled"
	FontPath	"/usr/share/X11/fonts/Type1"
	FontPath	"/usr/share/X11/fonts/100dpi"
	FontPath	"/usr/share/X11/fonts/75dpi"
	# path to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load	"bitmap"
	#Load 	"GLcore"
	Load	"ddc"
	Load	"dbe"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"type1"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc104"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ExplorerPS/2"
	Option		"ZAxisMapping"		"4 5"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option		"HorizScrollDelta"	"0"
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "stylus"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "stylus"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "eraser"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "eraser"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "cursor"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "cursor"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "Device"
	Identifier "SVIDEO"
	Driver "i810"
	Option "MonitorLayout"	"TV,LFP"
	Option "FlipPrimary" "True"
	Option "TVStandard"	"NTSC"
	Option "TVOutFormat"	"SVIDEO"
	Option "ConnectedMonitor"	"TV"
	Option "Clone" "True"
	BusID "PCI:0:2:0"
EndSection

Section "Monitor"
	Identifier	"LCD"
	Option		"DPMS"
	HorizSync	30 - 81
	VertRefresh	56 - 76
EndSection

Section "Monitor"
	Identifier	"TV"
	HorizSync	30-50
	VertRefresh	60
EndSection

Section "Screen"
	Identifier	"TV"
	Device		"SVIDEO"
	Monitor		"TV"
	DefaultDepth	24

	SubSection "Display"
		Depth	24
		Modes	"800x600" "640x480"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"LCDandTV"
	Screen		"TV"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice	"Synaptics Touchpad"
	Option 		"AIGLX" "true"
EndSection

Section "ServerFlags"
	Option		"DefaultServerLayout" "LCDandTV"
EndSection
then save and close the file

Now we create another xorg file for using a cloned desktop (useful for connecting to a projector):
Code:
sudo gedit /etc/X11/xorg.conf.clone
Again, paste the following (and again from the device line and below if you want):
Code:
# /etc/X11/xorg.conf (xorg 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 /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
	FontPath	"/usr/share/X11/fonts/misc"
	FontPath	"/usr/share/X11/fonts/cyrillic"
	FontPath	"/usr/share/X11/fonts/100dpi/:unscaled"
	FontPath	"/usr/share/X11/fonts/75dpi/:unscaled"
	FontPath	"/usr/share/X11/fonts/Type1"
	FontPath	"/usr/share/X11/fonts/100dpi"
	FontPath	"/usr/share/X11/fonts/75dpi"
	# path to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load	"bitmap"
	Load	"ddc"
	Load	"dri"
	Load    "dbe"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"type1"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc104"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ExplorerPS/2"
	Option		"ZAxisMapping"		"4 5"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option		"HorizScrollDelta"	"0"
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "stylus"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "stylus"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "eraser"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "eraser"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "cursor"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "cursor"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "Device"
	Identifier	"Intel"
	Driver		"i810"
	Option    "MonitorLayout" "CRT,LFP"
	Option    "Clone" "true"
	Option    "DevicePresence" "true"
	Option		"UseFBDev"		"true"
	BusID		"PCI:0:2:0"
	BusID		"PCI:0:2:0"
EndSection

Section "Monitor"
	Identifier	"Generic Monitor"
	Option		"DPMS"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"Intel"
	Monitor		"Generic Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		1
		Modes		"1280x800" "1024x768" "800x600"
	EndSubSection
	SubSection "Display"
		Depth		4
		Modes		"1280x800" "1024x768" "800x600"
	EndSubSection
	SubSection "Display"
		Depth		8
		Modes		"1280x800" "1024x768" "800x600"
	EndSubSection
	SubSection "Display"
		Depth		15
		Modes		"1280x800" "1024x768" "800x600"
	EndSubSection
	SubSection "Display"
		Depth		16
		Modes		"1280x800" "1024x768" "800x600"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1280x800" "1024x768" "800x600"
	EndSubSection
EndSection

Section "ServerLayout"
	Option 		"AIGLX" "true"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice     "stylus" "SendCoreEvents"
	InputDevice     "cursor" "SendCoreEvents"
	InputDevice     "eraser" "SendCoreEvents"
	InputDevice	"Synaptics Touchpad"
EndSection

Section "DRI"
	Mode	0666
EndSection

Section "Extensions"
	Option		"Composite" "Enable"
EndSection
then save and close the file

Now we create an xorg for using dual monitors as one desktop(using xinerama):
Code:
sudo gedit /etc/X11/xorg.conf.dual
Again, paste the following:
Code:
# /etc/X11/xorg.conf (xorg 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 /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
	FontPath	"/usr/share/X11/fonts/misc"
	FontPath	"/usr/share/X11/fonts/cyrillic"
	FontPath	"/usr/share/X11/fonts/100dpi/:unscaled"
	FontPath	"/usr/share/X11/fonts/75dpi/:unscaled"
	FontPath	"/usr/share/X11/fonts/Type1"
	FontPath	"/usr/share/X11/fonts/100dpi"
	FontPath	"/usr/share/X11/fonts/75dpi"
	# path to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load	"bitmap"
	#Load 	"GLcore"
	Load	"ddc"
	Load	"dbe"
	#Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"type1"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc104"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ExplorerPS/2"
	Option		"ZAxisMapping"		"4 5"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"auto-dev"
	Option		"HorizScrollDelta"	"0"
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "stylus"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "stylus"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "eraser"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "eraser"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "InputDevice"
  Driver        "wacom"
  Identifier    "cursor"
  Option        "Device"        "/dev/wacom"          # Change to 
                                                      # /dev/input/event
                                                      # for USB
  Option        "Type"          "cursor"
  Option        "ForceDevice"   "ISDV4"               # Tablet PC ONLY
EndSection

Section "Device"
	Identifier "LCD"
	Driver "i810"
	Option "MonitorLayout"	"CRT,LFP"
	Option "DDCMode" "True"
	Screen 0
	BusID "PCI:0:2:0"
EndSection

Section "Device"
	Identifier "CRT"
	Driver "i810"
	Option "MonitorLayout"	"CRT,LFP"
	Option "DDCMode" "True"
	Screen 1
	BusID "PCI:0:2:0"
EndSection

Section "Monitor"
	Identifier	"LCD"
	Option		"DPMS"
	HorizSync	30 - 81
	VertRefresh	56 - 76
EndSection

Section "Monitor"
	Identifier	"CRT"
	Option		"DPMS"
	HorizSync	30 - 81
	VertRefresh	56 - 76
EndSection

Section "Screen"
	Identifier	"LCD"
	Device		"LCD"
	Monitor		"LCD"
	DefaultDepth	24
	SubSection "Display"
		Depth		1
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		4
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		8
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		15
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		16
		Modes		"1024x768"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1280x800" "1024x768" "800x600" "640x480"
	EndSubSection
EndSection

Section "Screen"
	Identifier	"CRT"
	Device		"CRT"
	Monitor		"CRT"
	DefaultDepth	24

	SubSection "Display"
		Depth	24
		Modes	"1024x768" "800x600" "640x480"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"LCDandCRT"
	Screen		0 "LCD"
	Screen		1 "CRT" RightOf "LCD"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice	"Synaptics Touchpad"
	Option		"Xinerama" "true"
#	Option 		"AIGLX" "true"
EndSection

Section "ServerFlags"
	Option		"DefaultServerLayout" "LCDandCRT"
EndSection

#Section "DRI"
#	Mode	0666
#EndSection

#Section "Extensions"
#	Option		"Composite" "Enable"
#EndSection
save the file and close

STEP THREE
Now we should have 5 different xorg.conf files:
xorg.conf.single
xorg.conf.dual
xorg.conf.clone
xorg.conf.svideo
xorg.conf.sclone

The script we created at the beginning will switch between these, the xorg.conf.single is the file that you were currently using when you started. To switch between them its very simple:
from the terminal run
Code:
switchmon
And it displays the script usage parameters, for example running:
Code:
switchmon 2
will close beryl and swap out your current xorg.conf with the svideo xorg.conf and then restart X

*note1*Also, sometimes after switching between two many xorg right in a row (i.e. running switchmon 1, then restart x, then switchmon 2, then restart x, then switchmon 4, then restart x, etc) for me sometimes X would just give an error about not being able to start, in these cases i could only get back into X by rebooting, just FYI */note1*

*note2* If something goes horribly wrong and you cant boot into X at all, just run 'switchmon 1' this will restore your original single monitor xorg.conf and you can try ctrl+alt+backspace or just reboot after that and you should be back in business (this has helped me many times) */note2*

*note3* if you have an issue about not being able to drag images to certain parts of your dual screen, try running (credit goes to Veloce for the fix):
Code:
sudo rm -r ./.gconf/desktop/gnome/screen
*/note3*

EXTRA - Create Gnome Launcher
Rather than open the terminal to run the 'switchmon' script everytime you need to change you xorg, it is much easier to create a launcher. You could create a launcher to run any switchmon you want. For example 'switchmon 1' or 'switchmon 4'. The launcher I created basically gives all the 'switchmon' configurations in one window. However you could substitute my command with any 'switchmon' like I said.

To start, right-click on the desktop and hit 'Create Launcher'. This brings up a window with a few options. The 'Name' and 'Comment' boxes are what show up when you hover the mouse over the new launcher. I would suggest typing
Code:
SwitchMon
in the 'Name' box and

Code:
Switch between Svideo and VGA output
In the 'Comment' box.

Next, in the 'Command' box paste the following, or if you know you will always want to run 'switchmon 2' then replace the 'Command' box with whatever you will be running. The following is the command I use:
Code:
xterm -e /bin/bash -c "switchmon; sudo -s"
*note* This merely shows you what switchmon can do and leaves you at a terminal prompt. You will still have to type 'switchmon 2', for example, to run the script */note*

For the icon you can click the button that says 'no icon' and choose one that you like the one I use is found here:
Code:
/usr/share/icons/gnome/48x48/apps/gdm.png


ISSUES WITH BLUE VIDEO ON OUTPUT IN CLONE MODE


Here are the fixes for MPlayer, KMPlayer, totem-gstreamer, and totem-xine. (have not figured out a fix for VLC yet)
some of this was taken from a gandalfn tutorial that I used ages ago:

-> if you are using MPlayer or KMPlayer :
launch Mplayer and go to 'Preferences' > 'Video' and from the available drivers select 'X11 (XImage/SHM)'

-> if you have totem-gstreamer :
launch gstreamer-properties and select on default video playback “XWindow (NoXv)” in video tab.

-> if you have totem-xine :
edit ~/.gnome2/totem_config and find this line:
Code:
#video.driver:auto
and replace it with
Code:
video.driver:xshm
Hopefully this helps someone, im no Xorg expert so i will try to answer any problems that will probably arise but this works for me after many days of hunting obscure settings from the forums.. Please let me know if it works/doesnt and maybe i have a typo somewhere.

Good luck

-The King
__________________
How to Svideo and More on your i945 Chipset
Dell E1405, Intel Core Duo 1.6 GHZ, 512 DDR2, Primary OS - Hardy RC / Secondary OS- XP Home

Last edited by featherking; March 13th, 2008 at 11:38 AM..
featherking is offline   Reply With Quote
Old February 20th, 2007   #2
SonicTheHedgehog
5 Cups of Ubuntu
 
Join Date: Sep 2006
My beans are hidden!
Kubuntu 7.04 Feisty Fawn
Re: How To: Svideo / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945

Does this work with the VGA-out port?
SonicTheHedgehog is offline   Reply With Quote
Old February 20th, 2007   #3
dmcdante
Spilled the Beans
 
Join Date: Oct 2006
Beans: 13
Send a message via ICQ to dmcdante Send a message via AIM to dmcdante Send a message via MSN to dmcdante Send a message via Yahoo to dmcdante Send a message via Skype™ to dmcdante
Re: How To: Svideo / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945

thanks so much, very good work.
it's people like you that make linux what it actually is.
biggest thanks.

greets, dante
dmcdante is offline   Reply With Quote
Old February 20th, 2007   #4
featherking
Gee! These Aren't Roasted!
 
featherking's Avatar
 
Join Date: May 2006
Location: Salt Lake City
Beans: 210
Ubuntu 6.10 Edgy
Re: How To: Svideo / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945

@SonicTheHedgehog
yes simply attach another monitor and if you have followed the tutorial run 'switchmon #' replace number with whatever xorg you are trying to run, then restart x (ctrl+alt+backspace)

@dmcdante
thanks im glad it works for you
__________________
How to Svideo and More on your i945 Chipset
Dell E1405, Intel Core Duo 1.6 GHZ, 512 DDR2, Primary OS - Hardy RC / Secondary OS- XP Home
featherking is offline   Reply With Quote
Old February 20th, 2007   #5
TecnoVM64
Just Give Me the Beans!
 
TecnoVM64's Avatar
 
Join Date: Nov 2005
Location: Valencia, Venezuela
Beans: 44
Kubuntu 6.06
Send a message via AIM to TecnoVM64 Send a message via MSN to TecnoVM64 Send a message via Skype™ to TecnoVM64
Re: How To: Svideo / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945

Thanks dude! Finally a howto that actually worked on my laptop with an Intel 915
I tried s-video and dual and both worked with almost no modification at all (and I'm using arch linux, not ubuntu)
TecnoVM64 is offline   Reply With Quote
Old February 20th, 2007   #6
featherking
Gee! These Aren't Roasted!
 
featherking's Avatar
 
Join Date: May 2006
Location: Salt Lake City
Beans: 210
Ubuntu 6.10 Edgy
Re: How To: Svideo / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945

@TecnoVM64
Thats great to hear! Most TVs wont go higher than 800 x 600 on an svideo connection so you really shouldnt need to modify that file much, but as i said, if you have a seperate monitor/projector with a huge native resolution you could easily modify that in its appropriate xorg, again, congratulations!
__________________
How to Svideo and More on your i945 Chipset
Dell E1405, Intel Core Duo 1.6 GHZ, 512 DDR2, Primary OS - Hardy RC / Secondary OS- XP Home
featherking is offline   Reply With Quote
Old February 21st, 2007   #7
groggyboy
Ubuntu Extra Shot
 
groggyboy's Avatar
 
Join Date: Mar 2006
Location: Winnipeg, Canada
Beans: 363
Ubuntu Intrepid Ibex (testing)
Re: How To: Svideo / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945

this is exciting. being unable to use my laptop's s-video in ubuntu was one of the final things preventing me from wiping windows from my box. if what TecnoVM64 says is true, and this does work with the i915... too bad its so hackish. but whatever, restarting my X session and killing beryl is a hell of a lot easier than rebooting into windows just to watch a movie!

that said, it's really late in my part of the world right now. i'll have to test this in the morning. i'll get back with an update then!

now if only i could get all my favourite games to play nicely with linux...
groggyboy is offline   Reply With Quote
Old February 21st, 2007   #8
featherking
Gee! These Aren't Roasted!
 
featherking's Avatar
 
Join Date: May 2006
Location: Salt Lake City
Beans: 210
Ubuntu 6.10 Edgy
Re: How To: Svideo / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945

@groggyboy
I know exactly what you mean, i wanted to put youtube videos up on the screen for the whole family to enjoy, and i could never get it to work. So one day i actually got kind of close to making it work so i kept digging and finally did get it to work! Then i wanted also to use a projector, etc etc.. But i agree i wish there were an easier way.. I suspect though that this will work with any intel board using the i810 driver (and alot of them do)
__________________
How to Svideo and More on your i945 Chipset
Dell E1405, Intel Core Duo 1.6 GHZ, 512 DDR2, Primary OS - Hardy RC / Secondary OS- XP Home
featherking is offline   Reply With Quote
Old February 21st, 2007   #9
groggyboy
Ubuntu Extra Shot
 
groggyboy's Avatar
 
Join Date: Mar 2006
Location: Winnipeg, Canada
Beans: 363
Ubuntu Intrepid Ibex (testing)
Re: How To: Svideo / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945

update: s-video is a success (i915 on Ubuntu) - i haven't tried either of the dual monitor setups because I don't have another monitor to test them on.

thanks a bunch!

to other people wanting to try this out: it is rather hackish, and not for the faint of heart. even the tiniest typo or missing line in your xorg.conf file can (and will) prevent X from loading. i forgot to add an "endSection" line to the s-video xorg file, and it caused an error (easily fixed from the command line though).

now if only these xorg.conf setups were hotswappable...
groggyboy is offline   Reply With Quote
Old February 21st, 2007   #10
featherking
Gee! These Aren't Roasted!
 
featherking's Avatar
 
Join Date: May 2006
Location: Salt Lake City
Beans: 210
Ubuntu 6.10 Edgy
Re: How To: Svideo / Dual Monitor(xinerama) / Dual Monitor(cloned desktop) on i945

@groggyboy
good to hear! i had thought about trying to create a script better than my 'switchmon' terminal script. My thought was to just click a shortcut and have it - switch to metacity from beryl, switch to the proper xorg file, and then restart x. All by double clicking a link. But that may be a project for another day..
__________________
How to Svideo and More on your i945 Chipset
Dell E1405, Intel Core Duo 1.6 GHZ, 512 DDR2, Primary OS - Hardy RC / Secondary OS- XP Home
featherking is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:04 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry