Dual Monitors Thinkpad T60p with Mini Dock

I've wanted to get dual monitor support working for some time, and I was pretty sure that my hardware would support it. I have a Thinkpad T60p with a Mini Dock. I bought my T60p almost two years ago in a retail store (as opposed to directly from Lenovo), so it has some non-standard hardware, such as the ATI FireGL video cards.

  • First, you must have the docking station for this to work. The docking station has a VGA output and a DVI output. Attach one monitor to each of the outputs.
  • You need the right drivers. I had problems with my video card when I bought the system almost two years ago. If I recall correctly, I had to download and compile a non-production version of some driver. I was never able to get this to work with the dual monitors. If you have an ATI or NVIDIA card, the easiest thing to do is let
    envyng install the vendor's native drivers. I use gnome, so I got the gtk version; if you use KDE, get envyng-qt.


    $ sudo apt-get install envyng-gtk

    You'll find the Envy program in your menu's under Applications / System Tools. Run EnvyNG. Select ATI or NVIDIA, then install the driver.

  • Using Xorg RandR 1.2 as a guide, create a modern xorg.conf file.


    $ sudo dpkg-reconfigure -phigh xserver-xorg

  • Add the Display Virtual section as shown below. The coordinates in the Virtual line are the horizontal and vertical size of your virtual desktop Assuming that you want two equally sized desktops side-by-side (and I strongly suggest this configuration... unequally sized desktops are disorienting). The maximum resolution of my T60p video card is 1680x1050. So, my virtual desktop uses the same height, and twice the width.


    Section "Screen"
    Identifier "Default Screen"
    Monitor "Configured Monitor"
    Device "Configured Video Device"
    + SubSection "Display"
    + Depth 24
    + Virtual 3360 1050
    + EndSubSection
    EndSection

    You'll need to restart X Windows. You can reboot now, but I prefer to use CTRL-ALT-BACKSPACE to just restart X and re-login.

  • Still following Xorg RandR 1.2, use xrandr to discover your attached monitors. My two attached monitors are called VGA-0 and DVI-0. Yours might just be VGA and DVI. My laptops internal monitor is called LVDS.

    Now that you know the displays, you can use xrandr to enable or disable them.

    I created a simple shell batch file to enable dual monitor support. You could create a similar script and put it in your /etc/init.d directory, but since this is a mobile laptop, that isn't always connected to the external monitors, I choose to just type a command when I want the dual monitors.


    #~!/bin/sh
    xrandr -q | grep VGA-0 > /dev/null 2>&1
    if [ $? -eq 0 ]; then
    xrandr --output LVDS --off
    xrandr --output DVI-0 --mode 1680x1050 --auto --output VGA-0 --mode 1680x1050 --auto --left-of DVI-0
    fi

    Run the shell script and you should now have two desktops!. You probably have a different video card than me. So you may need to play with the Virtual desktop size and the resolution in the shell script, to find what works best for you.

  • My desktop panels we're on the wrong desktop. If this happens to you too, simply drag them from one desktop to the other.
  • Lastly, my desktop background was set for a single monitor and stretched awkwardly. To solve this, using gimp I created a new jpg file that was exactly the same size as my virtual desktop (3360x1050), with two 1680x1050 images side-by-side. I choose to use the same image, but you can use two different images and have two different backgrounds.

    I manually switched the desktop by right-clicking on the desktop, adding the new image as a background, then selecting it. Once the image is added once, I'm sure that there's a way to automate this in the script, but I haven't done that yet.

And there it is! If this doesn't help anyone else, at least I've documented what I did, so I'll be able to do it again.