Matt's Musings

September 23, 2005

Dual-Head on an IBM T42 laptop

Filed under: Linux — matt @ 2:40 pm NZST

I have an IBM T42 laptop for work. This week I ordered an IBM Minidock so that I could attach an external LCD monitor, keyboard and mouse to the laptop to provide a nicer work environment seeing as I use it for 8 hours every day of the week. I ordered the setup from Ascent at 11am on Wednesday and after being told there was a two week lead time sat back to wait. 10am Thursday morning the courier turned up with the entire order! I was impressed.

Getting the laptop to work nicely with an external monitor took a little bit of work. I’m currently running Ubuntu Breezy. Breezy supports all the hardware in the laptop very well, however it hasn’t yet gained polish in dealing with configurations where you are coming and and out of the dock regularly. This is further complicated by the fact the the Minidock is actually a “dumb” dock and doesn’t generate ACPI dock events when the laptop is docked/undocked. The default setup configures X.org to use the ati driver. While this works fine the graphics card is better supported by the radeon driver, a one line change to the X.org configuration file.

I tried three different configurations to get the dual-head setup working nicely.

  1. radeon driver using the MergedFB feature
  2. radeon driver using xinerama
  3. fglrx driver

The fglrx configuration utility couldn’t generate a configuration file that would work with Breezy, I suspect this is because Breezy has changed the Font Paths and fglrx config still tries to look in the old locations. I dropped the Files section from a working X.org configuration into the fglrx generated configuration which enabled X to start. The performance was terrible however, the second display didn’t work at all, and the Laptop’s built in LCD was flickering badly. Oh, and to get it to even this point I had to rmmod intel_agp and agpgart so that the fglrx driver could use its internal agpgart support. I gave up on fglrx very quickly. Proprietary code that seems to work half as well as the open source alternatives.

Next I tried the radeon driver using the MergedFB feature. This provides a single framebuffer across the two screens and seemed to work OK. The Laptop’s internal LCD always comes up as the primary monitor, this leads Gnome to place the panel and task list on it. I couldn’t find a way to change this. The merged framebuffer is the combined dimensions of the two screens (1400×1050 and 1280×1024), ie, 2450×1050. This leads to the second screen (external LCD) - which I want to use as my primary desktop scrolling up and down. Very annoying.

I finally settled on Xinerama as my preferred setup. This gives me two desktops, with the laptop still as the primary. However Gnome lets me create additional panels on the external LCD. I duplicated the menu list and taskbar from the primary display onto the external LCD. The only drawback I’ve found so far is that I only seem to be able to have one notification area. Even if I start an application like Gaim from the second screen it still adds itself to the notification area on the first screen.

A very bad quality (cellphone) photo of my new work desktop setup:

You can grab the X.org configuration I used from here.

The whole setup is a bit of hack, but I think it’s about the best I’m going to get for now and it works :).

2 Comments

  1. Nice article.

    As a side comment, you can disable ati agpgart with the line
    Option “UseInternalAGPGART” “no”

    So far Ive read that even so fglrx is not able to do different resolutions/refresh rates on the monitors and will stick to the same for both, which is so far what I confirmed ..

    Currently I’m trying to get a dual head on a compaq NX7010 with replicator port (VGA DVI-D & TV, using VGA) plugged to a Sanyo PLV-Z3 projector to actually spit 720p. works fine with win (although had to tweak the output with powerstrip).
    Tried the fglrx on dual head with lots of trouble but gonna try again soon with the xinerama extensions and config tips found here.

    -Shin-

    Comment by Shin — January 11, 2006 @ 4:37 pm

  2. I’ve had dual screen working on a compaq( has ATI 200M GPU ), Ubuntu Hoary, and found your site while trying to get dual-head AND dual-user working. If it’ll help, here’s my xorg.conf file.

    PS: Oh, I think the trick is in the

    # File: xorg.conf
    # File generated by fglrxconfig (C) ATI Research, a substitute for xf86config.

    # Note by ATI: the below copyright notice is there for servicing possibly
    # pending third party rights on the file format and the instance of this file.
    #
    # Copyright (c) 1999 by The XFree86 Project, Inc.
    #
    # Permission is hereby granted, free of charge, to any person obtaining a
    # copy of this software and associated documentation files (the “Software”),
    # to deal in the Software without restriction, including without limitation
    # the rights to use, copy, modify, merge, publish, distribute, sublicense,
    # and/or sell copies of the Software, and to permit persons to whom the
    # Software is furnished to do so, subject to the following conditions:
    #
    # The above copyright notice and this permission notice shall be included in
    # all copies or substantial portions of the Software.
    #
    # THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
    # THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    # WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
    # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    # SOFTWARE.
    #
    # Except as contained in this notice, the name of the XFree86 Project shall
    # not be used in advertising or otherwise to promote the sale, use or other
    # dealings in this Software without prior written authorization from the
    # XFree86 Project.
    #

    # **********************************************************************
    # Refer to the XF86Config(4/5) man page for details about the format of
    # this file.
    # **********************************************************************

    # **********************************************************************
    # DRI Section
    # **********************************************************************
    Section “dri”
    # Access to OpenGL ICD is allowed for all users:
    Mode 0666
    # Access to OpenGL ICD is restricted to a specific user group:
    # Group 100 # users
    # Mode 0660
    EndSection

    # **********************************************************************
    # Module section — this section is used to specify
    # which dynamically loadable modules to load.
    # **********************************************************************
    #
    Section “Module”

    # This loads the DBE extension module.

    Load “dbe” # Double buffer extension

    # This loads the miscellaneous extensions module, and disables
    # initialisation of the XFree86-DGA extension within that module.
    SubSection “extmod”
    Option “omit xfree86-dga” # don’t initialise the DGA extension
    EndSubSection

    # This loads the Type1 and FreeType font modules
    Load “type1″
    Load “freetype”

    # This loads the GLX module
    Load “glx” # libglx.a
    Load “dri” # libdri.a

    EndSection

    # **********************************************************************
    # Files section. This allows default font and rgb paths to be set
    # **********************************************************************

    Section “Files”

    # The location of the RGB database. Note, this is the name of the
    # file minus the extension (like “.txt” or “.db”). There is normally
    # no need to change the default.

    RgbPath “/usr/X11R6/lib/X11/rgb”

    # Multiple FontPath entries are allowed (which are concatenated together),
    # as well as specifying multiple comma-separated entries in one FontPath
    # command (or a combination of both methods)
    #
    # If you don’t have a floating point coprocessor and emacs, Mosaic or other
    # programs take long to start up, try moving the Type1 and Speedo directory
    # to the end of this list (or comment them out).
    #

    # FontPath “/usr/X11R6/lib/X11/fonts/local/”
    FontPath “/usr/X11R6/lib/X11/fonts/misc/”
    FontPath “/usr/X11R6/lib/X11/fonts/75dpi/:unscaled”
    FontPath “/usr/X11R6/lib/X11/fonts/100dpi/:unscaled”
    FontPath “/usr/X11R6/lib/X11/fonts/Type1/”
    # FontPath “/usr/X11R6/lib/X11/fonts/Speedo/”
    FontPath “/usr/X11R6/lib/X11/fonts/75dpi/”
    FontPath “/usr/X11R6/lib/X11/fonts/100dpi/”

    # The module search path. The default path is shown here.

    # ModulePath “/usr/X11R6/lib/modules”

    EndSection

    # **********************************************************************
    # Server flags section.
    # **********************************************************************

    Section “ServerFlags”

    # Uncomment this to cause a core dump at the spot where a signal is
    # received. This may leave the console in an unusable state, but may
    # provide a better stack trace in the core dump to aid in debugging

    # Option “NoTrapSignals”

    # Uncomment this to disable the server abort sequence
    # This allows clients to receive this key event.

    # Option “DontZap”

    # Uncomment this to disable the / mode switching
    # sequences. This allows clients to receive these key events.

    # Option “Dont Zoom”

    # Uncomment this to disable tuning with the xvidtune client. With
    # it the client can still run and fetch card and monitor attributes,
    # but it will not be allowed to change them. If it tries it will
    # receive a protocol error.

    # Option “DisableVidModeExtension”

    # Uncomment this to enable the use of a non-local xvidtune client.

    # Option “AllowNonLocalXvidtune”

    # Uncomment this to disable dynamically modifying the input device
    # (mouse and keyboard) settings.

    # Option “DisableModInDev”

    # Uncomment this to enable the use of a non-local client to
    # change the keyboard or mouse settings (currently only xset).

    # Option “AllowNonLocalModInDev”

    EndSection

    # **********************************************************************
    # Input devices
    # **********************************************************************

    # **********************************************************************
    # Core keyboard’s InputDevice section
    # **********************************************************************

    Section “InputDevice”
    Identifier “Generic Keyboard”
    Driver “keyboard”
    Option “CoreKeyboard”
    Option “XkbRules” “xorg”
    Option “XkbModel” “pc104″
    Option “XkbLayout” “us”
    EndSection
    Section “InputDevice”

    Identifier “Keyboard1″
    Driver “kbd”
    # For most OSs the protocol can be omitted (it defaults to “Standard”).
    # When using XQUEUE (only for SVR3 and SVR4, but not Solaris),
    # uncomment the following line.

    # Option “Protocol” “Xqueue”

    Option “AutoRepeat” “500 30″

    # Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
    # Option “Xleds” “1 2 3″

    # Option “LeftAlt” “Meta”
    # Option “RightAlt” “ModeShift”

    # To customise the XKB settings to suit your keyboard, modify the
    # lines below (which are the defaults). For example, for a non-U.S.
    # keyboard, you will probably want to use:
    # Option “XkbModel” “pc102″
    # If you have a US Microsoft Natural keyboard, you can use:
    # Option “XkbModel” “microsoft”
    #
    # Then to change the language, change the Layout setting.
    # For example, a german layout can be obtained with:
    # Option “XkbLayout” “de”
    # or:
    # Option “XkbLayout” “de”
    # Option “XkbVariant” “nodeadkeys”
    #
    # If you’d like to switch the positions of your capslock and
    # control keys, use:
    # Option “XkbOptions” “ctrl:swapcaps”

    # These are the default XKB settings for XFree86
    # Option “XkbRules” “xfree86″
    # Option “XkbModel” “pc101″
    # Option “XkbLayout” “us”
    # Option “XkbVariant” “”
    # Option “XkbOptions” “”

    # Option “XkbDisable”

    Option “XkbRules” “xfree86″
    Option “XkbModel” “pc104″
    Option “XkbLayout” “us”

    EndSection

    # **********************************************************************
    # Core Pointer’s InputDevice section
    # **********************************************************************

    Section “InputDevice”
    Identifier “Configured Mouse”
    Driver “mouse”
    Option “CorePointer”
    Option “Device” “/dev/input/mouse1″
    Option “Protocol” “ImPS/2″
    Option “Emulate3Buttons” “true”
    Option “ZAxisMapping” “4 5″
    EndSection
    Section “InputDevice”
    Driver “synaptics”
    Identifier “Synaptics TouchpadNEW”
    Option “SendCoreEvents” “true”
    #Option “Device” “/dev/input/event0″
    Option “Device” “/dev/psaux”
    Option “Protocol” “auto-dev”
    #Option “Protocol” “event”
    Option “LeftEdge” “60″
    Option “RightEdge” “830″
    Option “TopEdge” “70″
    Option “BottomEdge” “650″
    Option “FingerLow” “25″
    Option “FingerHigh” “30″
    Option “MaxTapTime” “180″
    Option “MaxTapMove” “110″
    Option “EmulateMidButtonTime” “75″
    Option “VertScrollDelta” “50″
    Option “HorizScrollDelta” “50″
    Option “MinSpeed” “0.5″
    Option “MaxSpeed” “0.6″
    Option “AccelFactor” “0.01″
    Option “EdgeMotionSpeed” “40″
    Option “UpDownScrolling” “1″
    Option “TouchpadOff” “0″
    Option “Emulate3Buttons”
    Option “EmulateWheel” “on”
    Option “EmulateWheelButtons” “2″
    Option “ZAxisMapping” “4 5″
    Option “YAxisMapping” “4 5″
    EndSection
    Section “InputDevice”
    Identifier “Synaptics Touchpad”
    Driver “synaptics”
    Option “SendCoreEvents” “true”
    #djl Option “Device” “/dev/psaux”
    Option “Device” “/dev/input/mouse0″
    Option “Protocol” “auto-dev”
    Option “VertScrollDelta” “100″
    Option “HorizScrollDelta” “0″
    Option “LeftEdge” “1700″
    Option “RightEdge” “5300″
    Option “TopEdge” “1700″
    Option “BottomEdge” “4200″
    Option “FingerLow” “30″ #”25″
    Option “FingerHigh” “40″ #”30″
    #Option “MaxTapTime” “300″ #”180″
    #Option “MaxTapMove” “150″ #”220″
    Option “MaxTapMove” “110″ #new
    Option “MinSpeed” “0.06″
    Option “MaxSpeed” “0.12″
    # Option “MinSpeed” “0.09″
    # Option “MaxSpeed” “0.18″
    Option “AccelFactor” “0.01″ #new
    #Option “AccelFactor” “0.0015″
    Option “UpDownScrolling” “1″ #new
    Option “EdgeMotionSpeed” “40″ #new
    Option “TouchpadOff” “0″ #new
    # Option “EmulateMidButtonTime” “75″ #new
    # shmconfig: disables touchpad while typing
    Option “SHMConfig” “1″ #”on”
    # Option “ZAxisMapping” “4 5″
    # Option “Emulate3Buttons” “true”
    # Option “Emulate3Timeout” “100″
    # circularscolling: works like iPod
    # Option “CircularScrolling” “1″

    EndSection

    Section “InputDevice”

    # Identifier and driver

    Identifier “Mouse1″
    Driver “mouse”
    Option “Protocol” “ImPS/2″
    Option “ZAxisMapping” “4 5″
    Option “Device” “/dev/input/mice”

    # When using XQUEUE, comment out the above two lines, and uncomment
    # the following line.

    # Option “Protocol” “Xqueue”

    # Baudrate and SampleRate are only for some Logitech mice. In
    # almost every case these lines should be omitted.

    # Option “BaudRate” “9600″
    # Option “SampleRate” “150″

    # Emulate3Buttons is an option for 2-button Microsoft mice
    # Emulate3Timeout is the timeout in milliseconds (default is 50ms)

    # Option “Emulate3Buttons”
    # Option “Emulate3Timeout” “50″

    # ChordMiddle is an option for some 3-button Logitech mice

    # Option “ChordMiddle”

    EndSection

    # **********************************************************************
    # Monitor section
    # **********************************************************************

    # Any number of monitor sections may be present

    Section “Monitor”
    Identifier “Monitor0″
    HorizSync 31.5 - 60.0
    VertRefresh 60 - 85
    Option “DPMS”
    EndSection

    Section “Monitor”
    Identifier “Monitor1″
    HorizSync 31.5 - 60.0
    VertRefresh 60 - 85
    Option “DPMS”
    EndSection

    # **********************************************************************
    # Graphics device section
    # **********************************************************************

    # Any number of graphics device sections may be present

    # Standard VGA Device:

    Section “Device”
    Identifier “Standard VGA”
    VendorName “Unknown”
    BoardName “Unknown”

    # The chipset line is optional in most cases. It can be used to override
    # the driver’s chipset detection, and should not normally be specified.

    # Chipset “generic”

    # The Driver line must be present. When using run-time loadable driver
    # modules, this line instructs the server to load the specified driver
    # module. Even when not using loadable driver modules, this line
    # indicates which driver should interpret the information in this section.

    Driver “vga”
    # The BusID line is used to specify which of possibly multiple devices
    # this section is intended for. When this line isn’t present, a device
    # section can only match up with the primary video device. For PCI
    # devices a line like the following could be used. This line should not
    # normally be included unless there is more than one video device
    # installed.

    # BusID “PCI:0:10:0″

    # VideoRam 256

    # Clocks 25.2 28.3

    EndSection

    # === ATI device section ===

    Section “Device”
    Identifier “ATI Graphics Adapter 0″
    Driver “fglrx”
    Option “NoInt10″ “Yes”
    # ### generic DRI settings ###
    # === disable PnP Monitor ===
    #Option “NoDDC”
    # === disable/enable XAA/DRI ===
    Option “no_accel” “no”
    Option “no_dri” “no”
    # === misc DRI settings ===
    Option “mtrr” “off” # disable DRI mtrr mapper, driver has its own code for mtrr
    # ### FireGL DDX driver module specific settings ###
    # === Screen Management ===
    # Option “DesktopSetup” “0×00000200″ #horizontal LCD=primary
    # Option “DesktopSetup” “0×00000201″ #horizontal LCD=secondary
    # Option “DesktopSetup” “0×00000300″ #virtical LCD=primary
    Option “DesktopSetup” “0×00000301″ #virtical LCD=secondary
    # Option “DesktopSetup” “0×00000100″ #clone
    # Option “DesktopSetup” “0×00000000″ #single
    # Option “DesktopSetup” “0×00000000″
    Option “MonitorLayout” “LVDS, CRT”
    # Option “ForceMonitors” “AUTO, tv”
    # Option “ForceMonitors” “lvds, tv”
    Option “ForceMonitors” “LVDS, NONE”
    Option “IgnoreEDID” “off”
    Option “HSync2″ “31.5 - 60.0″
    Option “VRefresh2″ “60 - 85″
    Option “ScreenOverlap” “0″
    # === TV-out Management ===
    Option “NoTV” “no”
    Option “TVStandard” “NTSC-M”
    Option “TVHSizeAdj” “0″
    Option “TVVSizeAdj” “0″
    Option “TVHPosAdj” “0″
    Option “TVVPosAdj” “0″
    Option “TVHStartAdj” “0″
    Option “TVColorAdj” “0″
    Option “GammaCorrectionI” “0×06419064″
    Option “GammaCorrectionII” “0×00000000″
    # === OpenGL specific profiles/settings ===
    Option “Capabilities” “0×00000000″
    # === Video Overlay for the Xv extension ===
    Option “VideoOverlay” “on”
    # === OpenGL Overlay ===
    # Note: When OpenGL Overlay is enabled, Video Overlay
    # will be disabled automatically
    Option “OpenGLOverlay” “off”
    # === Center Mode (Laptops only) ===
    Option “CenterMode” “off”
    # === Pseudo Color Visuals (8-bit visuals) ===
    Option “PseudoColorVisuals” “off”
    # === QBS Management ===
    Option “Stereo” “off”
    Option “StereoSyncEnable” “1″
    # === FSAA Management ===
    Option “FSAAEnable” “no”
    Option “FSAAScale” “1″
    Option “FSAADisableGamma” “no”
    Option “FSAACustomizeMSPos” “no”
    Option “FSAAMSPosX0″ “0.000000″
    Option “FSAAMSPosY0″ “0.000000″
    Option “FSAAMSPosX1″ “0.000000″
    Option “FSAAMSPosY1″ “0.000000″
    Option “FSAAMSPosX2″ “0.000000″
    Option “FSAAMSPosY2″ “0.000000″
    Option “FSAAMSPosX3″ “0.000000″
    Option “FSAAMSPosY3″ “0.000000″
    Option “FSAAMSPosX4″ “0.000000″
    Option “FSAAMSPosY4″ “0.000000″
    Option “FSAAMSPosX5″ “0.000000″
    Option “FSAAMSPosY5″ “0.000000″
    # === Misc Options ===
    Option “UseFastTLS” “1″ #”0″ is default 1=on 2=off
    Option “BlockSignalsOnLock” “on”
    Option “UseInternalAGPGART” “yes”
    Option “ForceGenericCPU” “no”
    # BusID “PCI:1:5:0″ # no device found at config time
    Screen 0
    EndSection

    Section “Device”
    Identifier “ATI Graphics Adapter 1″
    Driver “fglrx”
    Option “NoInt10″ “Yes”
    # Option “DesktopSetup” “0×00000000″#Don’t change this for dualhead
    # Option “MonitorLayout” “NONE, CRT”
    # Option “ForceMonitors” “NONE, CRT”
    # === FSAA Management ===
    # If you have no FSAA options on your second Device, then by default you won’t have FSAA
    # on the second head.
    Option “FSAAEnable” “no” # Disable FSAA on second head
    Option “FSAAScale” “1″ # Disable FSAA on second head
    Option “FSAADisableGamma” “no”
    Option “FSAACustomizeMSPos” “no”
    Option “FSAAMSPosX0″ “0.000000″
    Option “FSAAMSPosY0″ “0.000000″
    Option “FSAAMSPosX1″ “0.000000″
    Option “FSAAMSPosY1″ “0.000000″
    Option “FSAAMSPosX2″ “0.000000″
    Option “FSAAMSPosY2″ “0.000000″
    Option “FSAAMSPosX3″ “0.000000″
    Option “FSAAMSPosY3″ “0.000000″
    Option “FSAAMSPosX4″ “0.000000″
    Option “FSAAMSPosY4″ “0.000000″
    Option “FSAAMSPosX5″ “0.000000″
    Option “FSAAMSPosY5″ “0.000000″
    # === Misc Options ===
    Option “EnablePrivateBackZ” “yes” # Enable on both heads for FSAA
    # BusID “PCI:1:5:0″ # no device found at config time
    Screen 1 # This refers to second head
    EndSection

    # **********************************************************************
    # Screen sections
    # **********************************************************************

    # Any number of screen sections may be present. Each describes
    # the configuration of a single screen. A single specific screen section
    # may be specified from the X server command line with the “-screen”
    # option.
    Section “Screen”
    Identifier “Screen0″ #Identify screen
    Device “ATI Graphics Adapter 0″ # Device to use
    Monitor “Monitor0″ # Monitor description it will use
    DefaultDepth 24
    #Option “backingstore”

    Subsection “Display”
    Depth 24
    Modes “1024×768″ “800×600″ “640×480″ # First resolution is the default
    ViewPort 0 0 # initial origin if mode is smaller than desktop
    # Virtual 1280 1024
    EndSubsection
    EndSection

    Section “Screen”
    Identifier “Screen1″
    Device “ATI Graphics Adapter 1″ # Device to use
    Monitor “Monitor1″ # Monitor description it will use
    DefaultDepth 24
    #Option “backingstore”

    Subsection “Display”
    Depth 24
    Modes “1024×768″ “800×600″ “640×480″ #
    # Modes “800×600″ “640×480″ # First resolution is the default
    ViewPort 0 0 # initial origin if mode is smaller than desktop
    # Virtual 1280 1024
    EndSubsection
    EndSection

    # **********************************************************************
    # ServerLayout sections.
    # **********************************************************************
    Section “ServerLayout”
    Identifier “Layout0″
    Screen “Screen0″
    Screen “Screen1″ Above “Screen0″ # physical location of second screen
    # Screen “Screen1″ LeftOf “Screen0″ # physical location of second screen
    #rem InputDevice “Mouse1″ “CorePointer”
    #rem InputDevice “Keyboard1″ “CoreKeyboard”
    InputDevice “Generic Keyboard”
    InputDevice “Configured Mouse”
    InputDevice “Synaptics Touchpad”
    Option “SingleCard” “True”
    EndSection
    Section “ServerLayout”
    Identifier “Layout1″
    Screen “Screen0″
    InputDevice “Generic Keyboard” “CoreKeyboard”
    InputDevice “Synaptics Touchpad” “CorePointer”
    Option “SingleCard” “True”
    EndSection
    Section “ServerLayout”
    Identifier “Layout2″
    Screen “Screen1″
    InputDevice “Generic Keyboard” “CoreKeyboard”
    InputDevice “Configured Mouse” “CorePointer”
    Option “SingleCard” “True”
    EndSection

    Comment by Doug — March 2, 2006 @ 2:54 pm

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress