Extended Display on the MacBook (with xorg.conf) : Ubuntu 8.04

By | 2008/04/28

I’ve blogged in the past about setting up extended display on the MacBook (second gen), but I thought I’d update the post for Ubuntu 8.04.  I notice there are some small differences, which are likely caused by the updates to Xorg.  I’ll post my steps and my xorg.conf file below.

Extended Display on the MacBook

First, I tried to use the new Screen Resolution tool but it did not detect either monitor properly.  It does detect the MacBook display when it is the only display, but when my external monitor is plugged in everything gets screwed up.

I had to do things by hand using xrandr, and I had to add three lines to my xorg.conf file.  There isn’t much to it, but not as straight-forward as it could be with the graphical tools.

  1. The first step is to figure out the sum of both resolutions.  ie; 1280×800 + 1440×900 = 2720 x 1700.  Take the resolutions from your MacBook (which should be 1280×800) and add it to the resolution of your external monitor.  Make note of the result.
  2. Update your xorg.conf file to include the new, combined, resolution (example below)
  3. Restart X (logout & login or ctrl-alt-bkspace)
  4. xrandr –output VGA –auto
  5. xrandr –output VGA –above LVDS

Here is a copy of my xorg.conf file.  It is default except for the three additional lines:

# xorg.conf (X.Org 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 xorg.conf manual page.
# (Type "man 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 “InputDevice”
Identifier    “Generic Keyboard”
Driver        “kbd”
Option        “XkbRules”    “xorg”
Option        “XkbModel”    “pc105”
Option        “XkbLayout”    “us”
Option        “XkbOptions”    “lv3:ralt_switch”

Section “InputDevice”
Identifier    “Configured Mouse”
Driver        “mouse”
Option        “CorePointer”

Section “InputDevice”
Identifier    “Synaptics Touchpad”
Driver        “synaptics”
Option        “SendCoreEvents”    “true”
Option        “Device”        “/dev/psaux”
Option        “Protocol”        “auto-dev”
Option        “HorizEdgeScroll”    “0”

Section “Device”
Identifier    “Configured Video Device”

Section “Monitor”
Identifier    “Configured Monitor”

Section “Screen”
Identifier    “Default Screen”
Monitor        “Configured Monitor”
Device        “Configured Video Device”

# added SubSection “Display” until EndSubSection
SubSection “Display”
Virtual 2720 1700


Section “ServerLayout”
Identifier    “Default Layout”
Screen        “Default Screen”
InputDevice    “Synaptics Touchpad”

2 thoughts on “Extended Display on the MacBook (with xorg.conf) : Ubuntu 8.04

  1. Red Five

    I’m not sure you need to have your virtual size set quite that large. I think you only have to set VIRTUAL to the largest single-screen dimension that is NOT the direction you are stacking the screens. For instance, using your screens above, 1280×800 + 1440×900 would equal EITHER 2720×900 if stacked side-by-side, or 1440×1700 if stacked vertically, as you did above. Unless I totally misunderstand the VIRTUAL parameter…

  2. Pedro Varela Saraiva

    Thanks very much! It works perfectly with my setup. I’m using an external monitor side by side with my laptop. I only have one question: what is the best way to make it persistent every time I login?

Comments are closed.