Wednesday, April 04, 2007

Dual Headed MacBook (Ubuntu)

I'm ashamed to say that although I've been using X since about 1995 (Slackware something or other) I have never tried to get it to work with two monitors. Since I find myself using Linux more lately on my MacBook it was time to get it working. Caveat: the trackpad is kind of flaky so I only recommend using Linux on the MacBooks if you are using and external keypad and mouse. There may be workaround but I haven't tried them and I only boot into Ubuntu like when I'm analyzing a 200-300MB dump in Ethereal or something.

Fortunately the Ubuntu Macbook wiki community documentation provides a solid page on how to Install Ubuntu (edgy) on Core 2 Duo MacBooks, it required a bit of tweaking and gdm [re]starting to get it working.

I created a wiki page for it containing the complete config (see the attachments link on the bottom if you want to download it) but the key step was to append the following to the existing xorg.conf file


Section "Device"
Identifier "MonitorLayout Device"
Driver "i810"
BusID "PCI:0:2:0"
Option "MonitorLayout" "NONE,CRT+LFP"
EndSection

Section "Screen"
Identifier "MonitorLayout Screen"
Device "MonitorLayout Device"
#Monitor "Color LCD"
Monitor "Generic Monitor"

DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x800"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "MonitorLayout Layout"
Screen "MonitorLayout Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
EndSection

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

Section "Screen"
Identifier "Clone Screen"
Device "Clone Device"
#Monitor "Color LCD"
Monitor "Generic Monitor"

DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x800"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Clone Layout"
Screen "Clone Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
EndSection

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

Section "Device"
Identifier "Xinerama Device (2)"
Driver "i810"
BusID "PCI:0:2:0"
Screen 1
Option "MonitorLayout" "CRT,LFP"
EndSection

Section "Screen"
Identifier "Xinerama Screen"
Device "Xinerama Device"
Monitor "Generic Monitor"

#Monitor "Color LCD"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x800"
EndSubSection
EndSection

Section "Screen"
Identifier "Xinerama Screen (2)"
Device "Xinerama Device (2)"
Monitor "Generic Monitor"
#Monitor "Color LCD"
DefaultDepth 24
SubSection "Display"
Depth 24
Modes "1280x1024"
EndSubSection
EndSection

Section "ServerLayout"
Identifier "Xinerama Layout"
Screen "Xinerama Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"
# RightOf LeftOf Above Below
Screen "Xinerama Screen (2)" RightOf "Xinerama Screen"
Option "Xinerama"
EndSection

Section "ServerFlags"
# Option "DefaultServerLayout" "Default Layout"
# Option "DefaultServerLayout" "MonitorLayout Layout"
# Option "DefaultServerLayout" "Clone Layout"
Option "DefaultServerLayout" "Xinerama Layout"
EndSection

No comments: