Dual Monitor on Ubuntu 7.04 (Feisty Fawn) – nc2400 with Intel 945GM

xorg logoOne of the good things about being in a big consulting company is that you get these "once every one/two years" laptop upgrades. So my lucky upgrade day was yesterday, and my friend Dell D400 was upgraded to HP nc2400. So I decided to change my course a little, and use Ubuntu on a company laptop (instead of XP). I talked to the company people, they did not mind, which was great! The only problem is, when you get a new Windows XP laptop (upgrade), there are certain people that set it up for you, and you just pick it up and go to the client. Well, in my case I had to get up to speed very quickly myself. And of course one of majors problems with Ubuntu Feisty (as with most Linux distros) it does not have any tooling to deal with dual (laptop/LCD) monitors. So it was a fun time experimenting with "xorg.config". It took me quite some time, but I DID GET IT WORKING! And just want to share with everybody what I came with, since none of the Ubuntu forums, and none of what Google (with their new Web 2.0) told me did NOT work.

So here we go… Checking what graphic (video) my new nc2400 has:

user@host:~$ lspci
...
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)<br />
...

Ok, so I’ve got "Intel 945GM" – cool. Notice that there are two VGA/Display controllers, one is on 0:2:0, and another one is on 0:2:1 (those numbers are BusIDs by the way). Nevertheless, I used only one BusID, which is the first one 0:2:0 to get it working.

I also have 1280×800 laptop screen resolution, which means I need to get 915resolution

apt-get install 915resolution

Now, my External Monitor has 1280×1024 @ 60 Hz by specs. Let’s see it is supported by 915resolution:

user@host:~$ sudo 915resolution -l
Password:
Intel 800/900 Series VBIOS Hack : version 0.5.2
 
Chipset: 945GM
BIOS: TYPE 1
Mode Table Offset: $C0000 + $269
Mode Table Entries: 36
 
Mode 30 : 640x480, 8 bits/pixel
Mode 32 : 800x600, 8 bits/pixel
Mode 34 : 1024x768, 8 bits/pixel
Mode 38 : 1280x800, 24 bits/pixel
Mode 3c : 1920x1440, 8 bits/pixel
Mode 41 : 640x480, 16 bits/pixel
Mode 43 : 800x600, 16 bits/pixel
Mode 45 : 1024x768, 16 bits/pixel
Mode 49 : 1280x800, 16 bits/pixel
Mode 4d : 1920x1440, 16 bits/pixel
Mode 50 : 640x480, 32 bits/pixel
Mode 52 : 800x600, 32 bits/pixel
Mode 54 : 1024x768, 32 bits/pixel
Mode 58 : 1280x800, 32 bits/pixel
Mode 5c : 1920x1440, 32 bits/pixel

Seems like I do not have 1280×1024 as one of the supported modes. Hmmm. Ok, then I need to explicitly ask for it by modifying this file, to look like this:

user@host:~$ cat /etc/default/915resolution
#
# 915resolution default
#
# find free modes by  /usr/sbin/915resolution -l
# and set it to MODE or set to 'MODE=auto'
#
# With 'auto' detection, the panel-size will be fetched from the VBE
# BIOS if possible and the highest-numbered mode in each bit-depth
# will be overwritten with the detected panel-size.
MODE=3a
#
# and set resolutions for the mode.
# e.g. use XRESO=1024 and YRESO=768
 
XRESO=1280
YRESO=1024
 
# We can also set the pixel mode.
# e.g. use BIT=32
# Please note that this is optional,
# you can also leave this value blank.
BIT=24

Ok. No I still need to patch laptop LCD to 1280×800, therefore im going to write  a one liner script that is going to do that on startup (how-to). Here is that one line:

# Set the laptop monitor resolution
# Add it to 915Resolution supported modes
915resolution 38 1280 800 24

Did, resolution, did the patching, is it now time for an "xorg.conf"? Ok, then, here it is (working too) :)

# /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 xorg.conf(5) 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 "Files"
        FontPath        "/usr/share/fonts/X11/misc"
        FontPath        "/usr/share/fonts/X11/cyrillic"
        FontPath        "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath        "/usr/share/fonts/X11/Type1"
        FontPath        "/usr/share/fonts/X11/100dpi"
        FontPath        "/usr/share/fonts/X11/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"      "pc105"
        Option          "XkbLayout"     "us"
EndSection
 
Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device"                "/dev/input/mice"
        Option          "Protocol"              "ImPS/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/input/wacom"
        Option          "Type"          "stylus"
        Option          "ForceDevice"   "ISDV4"         # Tablet PC ONLY
EndSection
 
Section "InputDevice"
        Driver          "wacom"
        Identifier      "eraser"
        Option          "Device"        "/dev/input/wacom"
        Option          "Type"          "eraser"
        Option          "ForceDevice"   "ISDV4"         # Tablet PC ONLY
EndSection
 
Section "InputDevice"
        Driver          "wacom"
        Identifier      "cursor"
        Option          "Device"        "/dev/input/wacom"
        Option          "Type"          "cursor"
        Option          "ForceDevice"   "ISDV4"         # Tablet PC ONLY
EndSection
 
Section "Device"
        Identifier      "0 Intel 945GM"
        Driver          "i810"
        BusID           "PCI:0:2:0"
        Screen      0
        Option          "MonitorLayout" "CRT,LFP"
        Option          "DRI" "false"
    # I don't think these next lines are actually required.
    #Option          "BackingStore" "true"
    #Option          "DevicePresence" "on"
    #Option          "DisplayInfo" "FALSE"
    #Option          "DRI" "true"
    #Option                       "CacheLines" "1024"
EndSection
 
Section "Device"
        Identifier      "1 Intel 945GM"
        Driver          "i810"
        BusID           "PCI:0:2:0"
        Screen      1
        Option          "MonitorLayout" "CRT,LFP"
        Option          "DRI" "true"
    # I don't think these next lines are actually required.
    #Option          "BackingStore" "true"
    #Option          "DevicePresence" "on"
    #Option          "DisplayInfo" "FALSE"
    #Option          "DRI" "true"
    #Option                       "CacheLines" "1024"
EndSection
 
Section "Monitor"
        Identifier      "0 nc2400 Monitor"
        Option          "DPMS"
        Option          "DPMS"
#       HorizSync       28-75
#       VertRefresh     43-100
EndSection
 
Section "Monitor"
        Identifier         "1 nc2400 Monitor"
    HorizSync      30 - 83
    VertRefresh    56 - 76
    Option         "DPMS"
        Modeline       "1280x1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
EndSection
 
Section "Screen"
        Identifier          "0 Screen"
        Device              "0 Intel 945GM"
        Monitor             "0 nc2400 Monitor"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                Modes           "1280x800"
        EndSubSection
EndSection
 
Section "Screen"
        Identifier          "1 Screen"
        Device              "1 Intel 945GM"
        Monitor             "1 nc2400 Monitor"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                Modes           "1280x1024@60"
        EndSubSection
EndSection
 
Section "ServerLayout"
        Identifier      "Default Layout"
    Screen      0 "0 Screen"
    Screen      1 "1 Screen" RightOf "0 Screen"
        Option          "Xinerama" "on"
        Option          "Clone" "off"
        InputDevice     "Generic Keyboard"
        InputDevice     "Configured Mouse"
        InputDevice     "stylus"        "SendCoreEvents"
        InputDevice     "cursor"        "SendCoreEvents"
        InputDevice     "eraser"        "SendCoreEvents"
        InputDevice     "Synaptics Touchpad"
EndSection
 
Section "DRI"
        Mode    0666
EndSection

You may notice "Modeline "1280×1024@60" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync", well I just got it from the same place you would get it, yea..that’s right, I got it from Google.

Remember, no matter what a general opinion is (linux follows "install without restart" philosophy), you have to restart. And not just /etc/init.d/gdm restart, but a FULL system restart,

Ok, so now you should see two beautiful screens – one is your laptop, and the other one is your external monitor which is now a separate screen. Congrats!

If you have any questions – shoot, I killed so much time figuring out all these details, why should you?

60 comments

  1. Thanks! That seems great, at least the coverage. will check and post if I get any luck.
    I am trying to get it done for the last 3+ hours. :(

  2. Hey, it is me again. How do I create a start up script with that 915resolution thingy?
    Thx

  3. Hey Maink,

    You can follow instructions here

    good luck

  4. Oh… found it in the article, nevermind. Thx

  5. Yeaaaaa!! Thank you soo much – it did work indeed! :)

  6. Thank you. I’ve spent a week trying to get an extended monitor working to no avail. I’ve read dozens of posts on the other sites and none of them worked. Upgrading to the latest Intel 945 driver (not the i810 one) may lead you down a dead end path, as I have discovered.

    Lattitude D520
    Intel 945GM chipset

    Sincerely,

    Tom Johnson

  7. Great blog… i learned a lot. Thank you for sharing!
    One question: how can i configure 2 LCDs, one 1280×1024 and other widescreen 1400×900 in “extended” mode?
    Nothing that i tried so far seems to work… i can get the two monitors working but can’t change resolution and both are clone.
    I would like to use one for movies (WS) and one for other tasks..

    Thank you!

  8. i wasted so many hours to configure dual monitors but didn’t work. I did most of the things you did except the configuration of the 915resolution file.
    So, we need to introduce the resolutions of NOT ONLY laptop’s screen resolution (which was 1280×800) BUT ALSO external screen’s resolution?
    I’ll give it a try.. I hope it works..

  9. Victor,

    I am glad you learned something new – that is great to hear, honestly :) I hope that you used this knowledge and it worked for you.

    Unfortunately I do not have an answer to your “two LCD” question, since this “configuration” tasks are performed 50% by my hands and only other 50% goes to my brain activity.

    But let me clarify – do you have a workstation with two LCDs or a laptop with two external LCDs? If it is a workstation with two external LCDs and you can get them both to work, then in a “ServerLayout” section turn on Xinerama, and turn off Clone as follows:

    Section "ServerLayout"
            Identifier      "Victors Layout"
            Screen          0 "0 Screen"
            Screen          1 "1 Screen" RightOf "0 Screen"
            Option          "Xinerama" "on"
            Option          "Clone" "off"
             .....    ...        ......
    EndSection
    

    Give it a try see what happens. Also what card are you using? If you are using Intel, get 915Resolution and patch it with both of your LCD’s resolutions (similar to what I explained above, but just add another resolution, if it is not already supported by 915Resolution)

    Have fun,
    Toly

  10. what about tv-out ?

  11. You are doing everyone who tries to use these instructions a MASSIVE disservice by not explaining that “LFP” stands for “Local Flat Panel”.

    I near went out of my mind trying to figure out which resolution/refresh settings I was sending to each monitor until I finally found a link showing what “LFP” means. Once you know that, you can control what’s happening with each output. If you don’t tell people that, you’re leaving a critical acronym in there that’s specific to the Intel driver family versus generic to the industry the way “CRT” is…that’s really, really annoying.

    Also: have you tried these instructions with the new “intel” driver and matching Synaptic package? It eliminates the need for 915resolution but I haven’t been able to get it working with two screens.

  12. Hi Jim,

    Thank you for pointing out what LFP is.

    As per Intel: “Suppose you have a laptop that contains the Mobile Intel® 945GM Express Chipset and has two displays: the internal flat panel display (also referred to as Local Flat Panel or LFP)…”

    However there is no MASSIVE disservice, not even a TINY disservice, because services are not what is provided here – I am just sharing my knowledge with everybody who may need it. For acronyms there is an excellent website google that will answer most of your acronym’s questions.

    I have tried the latest Intel’s driver, and still need 915Resolution to archive “dual” result with correct resolution.

  13. Andrew Borthwick

    Thanks for the posting–it’s really helpful.

    Am I right that the highlevel steps are:

    1–install 915resolution
    2–edit /etc/default/915resolution file if a resolution is not listed in 915resolution -l
    3–Write one-liner script and install it as per http://ubuntu.wordpress.com/2005/09/07/adding-a-startup-script-to-be-run-at-bootup/
    4. Edit xorg.com

    Two areas were unclear to me:
    1. Is there a step betwen lines 2 and 3 to get 915resolution to pick up the edited /etc/default/915resolution?
    2. Could you supply any pointers on editing xorg.conf? I’m unclear on which sections you need to update. Were they the “Device”, “Monitor”, and “Screen” sections? To what extent should the parameters that you put down carry over with a 1280 x 800 laptop and 1680 x 1050 monitor? Do I just Google 1280×800@60 to get my modeline and otherwise follow your xorg.conf?

    Thanks,
    Andrew Borthwick

  14. Hey Andrew,

    1. Is there a step betwen lines 2 and 3 to get 915resolution to pick up the edited /etc/default/915resolution?

      - 915resolution always reads “/etc/default/915resolution” before it starts, so the answer is simple – “(re)start it” :)

    2. Could you supply any pointers on editing xorg.conf? I’m unclear on which sections you need to update. Were they the “Device”, “Monitor”, and “Screen” sections? To what extent should the parameters that you put down carry over with a 1280 x 800 laptop and 1680 x 1050 monitor? Do I just Google 1280×800@60 to get my modeline and otherwise follow your xorg.conf?

      - Just look at your xorg.conf, and compare it to mine. I have changed sections DEVICE(S), MONITOR(S), SCREEN(2) and SERVERLAYOUT.
      - Yes, just google the modeline for your 1680 x 1050 monitor, for LFP (your laptop internal monitor) you do not have to provide a modeline – it is “native”. Look closely to my xorg.conf – I only need modeline for my external monitor.

    have fun ;)

  15. Oh my god. it worked all perfectly, thanks man!… Now I just need to find out how to get Beryl working properly..

  16. First off I’d like to thank you this seems solid but I have 2 questions:

    1) For some reason when I reboot the changes I made are ok but the resolution on my laptop is not 1280×800.. but after doing this command “sudo 915resolution 38 1280 800 24″ in the shell then hitting “ctrl alt bksp” everything appears normal. I did add the link to start it up as you said and made the permissions right but it doesnt automagically boot into 1280×800.

    2) Is there away to make an exact copy of my laptop screen on my other monitor? I turned cloning on but it is like a whole new desktop.

    Again thanks!

  17. Hey Devin,

    1. Make sure that you have 915Resolution in “/etc/init.d”:

        user@host:/etc/init.d$ ll 915resolution
        -rwxr-xr-x 1 root root 3075 2007-02-12 02:40 915resolution

    2. There is. I am not sure about the whole screen, but I usually take an application snapshot by pressing ALT key along with keys that trigger a snapshot to be taken. So for my case it would be ['FN' + 'ALT' + 'PRT SC'] – it will take a snapshot of an active window in any of workspaces or monitors.

    Good luck! ;)

  18. Yes the 915 file is there but inside it I saw
    [code]
    if [ ! -x "$VBETOOL" ] || ! panelsize=`$VBETOOL vbefp panelsize` ; then
    echo "*** Your 915resolution was not automatically configured! ***"
    echo "Please read /usr/share/doc/915resolution/README.Debian then define"
    echo "MODE, XRESO, and YRESO manually in /etc/default/915resolution ."
    echo "For now a default will be set, which might be inappropiate."
    XRESO=1024
    YRESO=800
    fi
    [/code]

    which I am going to change to

    [code]
    if [ ! -x "$VBETOOL" ] || ! panelsize=`$VBETOOL vbefp panelsize` ; then
    echo "*** Your 915resolution was not automatically configured! ***"
    echo "Please read /usr/share/doc/915resolution/README.Debian then define"
    echo "MODE, XRESO, and YRESO manually in /etc/default/915resolution ."
    echo "For now a default will be set, which might be inappropiate."
    XRESO=1280
    YRESO=800
    fi
    [/code]

    Hopefully this fixes it :D

  19. Hey Devin,

    Here is my 915resolution in “/etc/init.d”

    #! /bin/sh
    ### BEGIN INIT INFO
    # Provides:          915resolution
    # Required-Start:    $syslog
    # Required-Stop:     $syslog
    # Should-Start:      $local_fs
    # Should-Stop:       $local_fs
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: Set the resolution for special chipset
    # Description:       The right resolution mode will be set and given
    #                    to the X server
    ### END INIT INFO
     
    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    PROG=/usr/sbin/915resolution
    NAME=915resolution
    DESC=915resolution
    VBETOOL=/usr/sbin/vbetool
     
    test -x $PROG || exit 0
     
    # Include 915resolution defaults if available
    if [ -f /etc/default/915resolution ] ; then
            . /etc/default/915resolution
    fi
     
    wrong_chipset()
    {
            echo "Wrong chipset detected. 915resolution only works with Intel 800/900 series graphic chipsets."
            exit 0
    }
     
    $PROG -l >/dev/null 2>&1 || wrong_chipset
     
    if [ "$MODE" = auto -a \! -x "$VBETOOL" ] || [ "$MODE" != auto -a \( -z "$MODE" -o -z "$XRESO" -o -z "$YRESO" \) ] ; then
       echo "*** Your 915resolution hasn't been configured! ***"
       echo "Please read /usr/share/doc/915resolution/README.Debian and define"
       echo "MODE, XRESO, and YRESO."
       exit 0
    fi
     
    auto_select_modes()
    {
        if [ ! -x "$VBETOOL" ] || ! panelsize=`$VBETOOL vbefp panelsize` ; then
            echo "*** Your 915resolution was not automatically configured! ***"
            echo "Please read /usr/share/doc/915resolution/README.Debian then define"
            echo "MODE, XRESO, and YRESO manually in /etc/default/915resolution ."
            echo "For now a default will be set, which might be inappropiate."
            XRESO=1024
            YRESO=768
        fi
     
        # If the native panel-size is already in the BIOS mode list, we
        # don't have to do anything, yippee!
        bios_list=`$PROG -l`
        if echo "$bios_list" | grep -q "^Mode .* $panelsize" ; then
            #echo 'Correct panel-size is already listed, skipping'
            return
        fi
     
        # For want of a better approach to selecting modelines for stealing;...
        # this expression grabs us the highest *numbered* mode in each
        # bit-depth that the BIOS already lists.
        #
        # An argument for using the highest mode-number, rather than the
        # highest resolution is that if we've already reprogrammed the
        # mode to be a lower resolution it will no longer be the highest.
        # If this has changed over a suspend cycle, that consequences
        # might not be so good.  -Paul Sladen
        target_modes=`echo "$bios_list" | awk '/^Mode [^T]/{sub(",","",$4); print $5,$4,$2}' | tac | sort -n -u | cut -d' ' -f3`
     
        for m in $target_modes ; do
            # The 'tr' converts '1024x768' -> '1024' '768'
            # and the bitdepth is missed off because we have one of each depth
            $PROG $m $(echo $panelsize | tr x ' ')
        done
    }
     
    set -e
     
    case "$1" in
      start|restart|force-reload)
            echo -n "Starting $DESC: "
            if [ "$MODE" = "auto" ] ; then
                auto_select_modes
            else
                $PROG $MODE $XRESO $YRESO $BIT
            fi
            echo "$NAME."
            ;;
      stop)
            #echo -n "Stopping $DESC: "
            #echo "$NAME."
            ;;
      *)
            N=/etc/init.d/$NAME
            # echo "Usage: $N start" >&2
            echo "Usage: $N start" >&2
            exit 1
            ;;
    esac
     
    exit 0

    Lines that deserve attention:

    # Include 915resolution defaults if available
    if [ -f /etc/default/915resolution ] ; then
            . /etc/default/915resolution
    fi

    which means that if you have /etc/defaults/915resolution config, it will read only that
    Here is my config:

    #
    # 915resolution default
    #
    # find free modes by  /usr/sbin/915resolution -l
    # and set it to MODE or set to 'MODE=auto'
    #
    # With 'auto' detection, the panel-size will be fetched from the VBE
    # BIOS if possible and the highest-numbered mode in each bit-depth
    # will be overwritten with the detected panel-size.
    MODE=auto
    #
    # and set resolutions for the mode.
    # e.g. use XRESO=1024 and YRESO=768
    XRESO=
    YRESO=
    #
    # We can also set the pixel mode.
    # e.g. use BIT=32
    # Please note that this is optional,
    # you can also leave this value blank.
    BIT=
    

    So do all experiments in the config above.

    Good Luck! ;)

  20. Thanks, your system was the only one that worked after hours of trying :-( Good I will tell people to get your explanation to solve their problem.

  21. thanks, working now!

    -devin

  22. Does anyone have working direct rendering?

    sonium@marvin:~$ glxinfo | grep direct
    direct rendering: No
    OpenGL renderer string: Mesa GLX Indirect

  23. Great, thanks! This worked. Now any suggestions for making the external CRT the primary monitor (menubar, etc)? I tried swapping CRT and LFP in the Options MonitorLayout line but that just kept it from working at all. I can’t find anything else in the xorg.conf that indicates which is the flat panel and which the external display…

  24. Hi,
    Thanks for your post. It works perfectly for my laptop and a 19″ LCD monitor. But at work I have a 17″ CRT monitor and the resolution is 1024×786. The same setting still works but the font on my 17″ is too small. I try to replace 1280×1024 to 1024×786 but it doesn’t work. Any suggestion?
    Thanks,

  25. This was really helpful. Following your steps I got the resolution of my HP Pavillion dv6000 to 1280X800 but when trying to get my external Samsung SyncMaster731n set up as an extended monitor all I get is a black screen. Your configuration is not far from mine so I am stumped, Here is my xorg.conf and 915resolution files for Ubuntu 7.04: Any help would be great, Thanks!

    # /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 xorg.conf(5) 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 “Files”
    FontPath “/usr/share/fonts/X11/misc”
    FontPath “/usr/share/fonts/X11/cyrillic”
    FontPath “/usr/share/fonts/X11/100dpi/:unscaled”
    FontPath “/usr/share/fonts/X11/75dpi/:unscaled”
    FontPath “/usr/share/fonts/X11/Type1″
    FontPath “/usr/share/fonts/X11/100dpi”
    FontPath “/usr/share/fonts/X11/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” “pc105″
    Option “XkbLayout” “us”
    EndSection

    Section “InputDevice”
    Identifier “Configured Mouse”
    Driver “mouse”
    Option “CorePointer”
    Option “Device” “/dev/input/mice”
    Option “Protocol” “ImPS/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/input/wacom”
    Option “Type” “stylus”
    Option “ForceDevice” “ISDV4″ # Tablet PC ONLY
    EndSection

    Section “InputDevice”
    Driver “wacom”
    Identifier “eraser”
    Option “Device” “/dev/input/wacom”
    Option “Type” “eraser”
    Option “ForceDevice” “ISDV4″ # Tablet PC ONLY
    EndSection

    Section “InputDevice”
    Driver “wacom”
    Identifier “cursor”
    Option “Device” “/dev/input/wacom”
    Option “Type” “cursor”
    Option “ForceDevice” “ISDV4″ # Tablet PC ONLY
    EndSection

    Section “Device”
    Identifier “Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller”
    Driver “i810″
    BusID “PCI:0:2:0″
    Screen 0
    Option “MonitorLayout” “CRT,LFP”
    Option “DRI” “false”
    EndSection

    Section “Device”
    Identifier “Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller”
    Driver “i810″
    BusID “PCI:0:2:0″
    Screen 1
    Option “Display” “CRT”
    Option “MonitorLayout” “CRT,LFP”
    Option “DRI” “true”
    EndSection

    Section “Monitor”
    Identifier “0 dv6000 Monitor”
    Option “DPMS”
    HorizSync 28-64
    VertRefresh 43-60
    EndSection

    Section “Monitor”
    Identifier “1 SyncMas731n Monitor”
    Option “DPMS”
    HorizSync 30-83
    VertRefresh 56-76
    Modeline “1280×1024@60″ 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync
    EndSection

    Section “Screen”
    Identifier “0 Screen”
    Device “Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller”
    Monitor “0 dv6000 Monitor”
    DefaultDepth 16
    SubSection “Display”
    Depth 16
    Modes “1280×800″
    EndSubSection
    EndSection

    Section “Screen”
    Identifier “1 Screen”
    Device “Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller”
    Monitor “1 SyncMas731n Monitor”
    DefaultDepth 16
    SubSection “Display”
    Depth 16
    Modes “1280×1024″
    EndSubSection
    EndSection

    Section “ServerLayout”
    Identifier “Default Layout”
    Screen 0 “0 Screen”
    Screen 1 “1 Screen” RightOf “0 Screen”
    Option “Xinerama” “on”
    Option “Clone” “off”
    InputDevice “Generic Keyboard”
    InputDevice “Configured Mouse”
    InputDevice “stylus” “SendCoreEvents”
    InputDevice “cursor” “SendCoreEvents”
    InputDevice “eraser” “SendCoreEvents”
    InputDevice “Synaptics Touchpad”
    EndSection

    Section “DRI”
    Mode 0666
    EndSection

    Here is my 915resolution file:

    #
    # 915resolution default
    #
    # find free modes by /usr/sbin/915resolution -l
    # and set it to MODE or set to ‘MODE=auto’
    #
    # With ‘auto’ detection, the panel-size will be fetched from the VBE
    # BIOS if possible and the highest-numbered mode in each bit-depth
    # will be overwritten with the detected panel-size.
    MODE=auto
    #
    # and set resolutions for the mode.
    # e.g. use XRESO=1024 and YRESO=768
    XRESO=
    YRESO=
    #
    # We can also set the pixel mode.
    # e.g. use BIT=32
    # Please note that this is optional,
    # you can also leave this value blank.
    BIT=

  26. Oh God, I have spent 6 hours just to extend my monitors. In contrast, I just need 6 seconds in Windows to extend my monitor with just a few clicks. I did all the procedure everywhere include yours but all not working. But finally I copied your configuration starting from the Device until the end, and finally it works. So happy….

  27. Harihara Vinayakaram

    This was a brilliant piece of documentation. I got this running on my Samsung 226CW . The only issue I faced was this . The first time I ran the 915confiugration -l it did not list the 1680×1050 mode and so I added it in the default . This resulted in a black screen. I checked again and this time I found that the mode is listed. So I just removed the values from the default and tried .

    Thanks a lot for this again

    Regards
    Hari

  28. I found your website after about 3 hours of unsuccessfully trying to setup dual screen with my laptop (a Gateway mt6840) and a CRT monitor. I had already did the 915resolution part and configured xorg.conf until it looked right but it still wouldn’t work. I was about to give up when I though “Hey, maybe I could just blindly copy and paste the relevant parts from this guy’s xorg.conf into mine to see what happens”. Surprisingly, it suddenly worked right away, with no modifications at all! Thanks a lot for posting this! You saved my life ;)

  29. Worked like a charm!

    Now I too have to figure out how to make Berly+Compiz work again…I am sacrificing my eye candy for more monitor space ;)

    If anyone knows has any hints, let me know…otherwise it’s back to the books.

    Mike

  30. I posted my dilemma here if anyone has any insight

    http://ubuntuforums.org/showthread.php?t=652714

  31. Sir, you are officially a legend!

    Had this laptop (Dell Inspiron 6400) 6 months now and have failed miserably to get multiple monitors working. I stumbled across your page today and got my second screen working within six minutes!

    Thank you :-)

  32. Thanks a lot!!!

    I got it working thanks to your HOWTO!

    Also, for those that have previously been using the Intel driver, I have been unsuccessful getting said driver to work with the way this HOWTO explains. So, you need to use the i810 driver. The problem is, unless you “apt-get install xserver-xorg-video-i810″ (this is Ubuntu Feisty), it will actually use the intel driver even if you specify the i810 driver (they intel driver must create a symlink or something). Once you run that apt-get, you should have it working!

    Thanks again to Toly for this HOWTO!

    PS: While I have this working and in all its awesomeness, I do find my external LCD to be a bit hard on the eyes (tad blurry). I’m not sure if it’s because I’m used to the laptop LCD or what. It’s a KTC 7005L external LCD which does 1280×1024 @ 75Hz max. The monitor is far from the best of brands so it might be just that. I’ve changed the xorg.conf settings for this monitor to the right vert/horiz sync rates but it still displays a little blurry. Any ideas?

  33. Just thought I’d write back and say .. I think it’s the monitor :-) I, unfortunately, also have Vista on this Laptop and I set it up to use the external LCD as an extended desktop and it looks just as blurry as it does on Linux (which isn’t actually blurry, it’s just not as sharp as the laptop LCD).

    This is awesome!!

  34. Oh my… you just saved me a lot of work. I have a customer asking about Dual Monitor on Ubuntu powered laptop, and I wasn’t sure where to turn.

    Thank you for the excellent how to and the time you must have put into this.

    Again thanks for sharing,

    Bob

  35. WOW, man, you’re a genius! Thank you so much!

  36. This has really been an exhilarating experience. I cannot thank you enough for this.

    I am using Mepis 6.5 on a Lenovo Y300 laptop. I think a lot of Mepis users would like to be able to do this. While I am happy to put this on the Mepis Wiki I would really think the credit is yours and would appreciate your doing it.

    In more general terms, it would be nice to be able to give a description that makes sense of the logic of the xorg.conf

    Thanks once again.

    samar

  37. That is ok – you can go ahead and put it on “Mepis Wiki”, and if you want to give me a credit, just post a link on the wiki to here :)

  38. That would be cool – thanks Samar :)

  39. I wrote an article on dual monitors using xrandr. It only involves changing 1 line in your xorg.conf.

    http://navetz.com/v/132/Simple-dual-monitor-setup-with-XrandR-in-Ubuntu-Linux

    If anyone is interested

  40. Hi Stevan,

    Thank you for sharing your article.

    – Toly

  41. jeffrey stalder

    Damn, good article. Had to fiddle around with somewhat. Changed RightOf to LeftOf and that had some strange effects on the resolution. But, when i changed both resolutions to 1280×800 everything started working nicely. Only question i have is that my background image gets streched over the 2 monitors, and i would like to have the same background on both.. but i guess that this aint possible. Please let me know if Better in this case really is the enemy of good (edison’s law)

    Thanks again. Jeffrey

  42. does this post only work with the intel 945 chipset?

tell me something...
  1. (required)
  2. (valid email - optional)
  3. Captcha
  4. (required)