Tales From The Geek Side

The geeky musings of Greg Rowe.

Dual Head with Intel i915GM on Linux

September 25th, 2008 by greg

It’s been a long time since I’ve run a Linux machine in a multi-head setup.  Much to my surprise (and delight) a lot has changed.  Unfortunately there’s still a lot of information out there on setting things up the old way but not a lot on setting things up the new way.

The old way is specifying Devices and Screens and using Xinerama and using directives like RightOf and LeftOf in your xorg.conf.  The new way moves all of this stuff out of xorg.conf and shifts the responsibility to xrandr which will configure screens and devices at runtime and can do so completely dynamically.

So the basic steps are just to get xorg up and running, which should work by default, tweak your xorg.conf slightly, and then run xrandr at the beginning of your X session to configure your displays to your liking.

The tweak to xorg.conf, at least for the i915, is to add the keyword Virtual to the Display Subsection of the Screen section.  Don’t worry, I’ll include my entire xorg.conf so you can see what I’m struggling to say in a clear way.  When you do this you must also remove the Modes lines.  This sets up a display window that the X server will use to place your output.  Don’t worry, it does it in a smart way.  You can have different resolutions on each display and it will be displayed correctly.  You need to specify a virtual size that is large enough to hold all of your displays.  In my case one display is 1280×1024 and the other is 1400×1050.  The virtual display is 2680×1050 (with a side-by-side setup).  Unfortunately the i915 driver disables DRI if either dimension exceeds 2048.  I hope this is a hardware limitation and not a software limitation.

The final step is to run xrandr to configure your displays.  I use the following command to setup an external monitor on the DVI output running to the left of my laptop display. I run this out of the Startup Programs under System/Preferences/Sessions.

/usr/bin/xrandr --output TMDS-1 --left-of LVDS

Here is my xorg.conf (scrollbar at the bottom):

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

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

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc104"
	Option		"XkbLayout"	"us"
# Make capslock become another control key
	Option  "XkbOptions"    "ctrl:nocaps"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	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 "Device"
	Identifier	"intel0"
	Driver		"i810"
	BusID		"PCI:0:2:0"
EndSection

Section "Monitor"
	Identifier	"Internal Monitor"
	Option		"DPMS"
EndSection

Section "Screen"
	Identifier	"Internal Screen"
	Device		"intel0"
	Monitor		"Internal Monitor"
	DefaultDepth	24
	SubSection "Display"
		Depth		24
# This is required to get the proper size for one display of 1280x1024 and another of 1400x1050
		Virtual		2680 1050
	EndSubSection
EndSection

Section "ServerLayout"

	Identifier	"Default Layout"
	Screen 	"Internal Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice	"Synaptics Touchpad"
EndSection

References:

http://bgoglin.livejournal.com/9846.html

This entry was posted on Thursday, September 25th, 2008 at 7:52 am and is filed under Misc. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply