Stretching Your Desktop Onto a Second Monitor with the Millennium G400 Card

You've no doubt heard the computer-age observation that you can never be too rich, too thin, or have too much RAM or hard-drive space. It's true. Particularly the latter part. But in this age of rampant GUI (Graphical User Interface) usage, it overlooks yet another commodity of infinite desirability: virtual desktop space.

You’ve no doubt heard the computer-age observation that you can never be too rich, too thin, or have too much RAM or hard-drive space. It’s true. Particularly the latter part. But in this age of rampant GUI (Graphical User Interface) usage, it overlooks yet another commodity of infinite desirability: virtual desktop space.

The most obvious way to max out your virtual desktop is to use a big monitor and a high-end graphics board to run Linux at some phenomenal resolution, like 1920×1200. That’s not a perfect solution, though, for a few reasons, not the least of which is that you probably already have a serviceable monitor that you’d have to stick in a closet, sell, or give away.

A second approach is to use virtual screens, where your desktop is really much larger than your physical monitor and scrolls when your mouse reaches the screen edge. This is a solution that I find more annoying than helpful. Multiple virtual desktops, as supported by KDE and GNOME, are useful, in that they let you jump between full-size screens of desktop by clicking a button on their panel. But that doesn’t let you see more than one desktop at a time.

The best solution I’ve found so far is a dual-monitor configuration, something I’ve been playing around with since it required using a CGA or EGA card plus a monochrome adapter in the original IBM PC and PC/AT. Thanks to the synergy between hardware and software advances, there is at least one much better solution available to Linux users.

The hardware part of our dynamic duo comes from Matrox (http://www.matrox.com), which recently released a graphics board, the Millennium G400, that directly supports two monitors with a single card. The software portion is the dual-head version of Accelerated-X from Xi Graphics (http://www.xig.com), a company that makes several commercial X servers for Linux, Solaris, and FreeBSD.

Using these products you can get what the fans of multi-head computing call SLS (single logical screen) operation with KDE, GNOME, or any other graphical Linux desktop environment. In an SLS configuration you have one logical screen that just happens to be displayed with the help of more than one physical screen. This means you can grab objects with the mouse and move them from screen to screen, and resize windows and dialogs so they split across physical screens. Your desktop still fully supports virtual desktops, of course, but this way you get two screens per virtual desktop.

This configuration works quite well with both KDE and GNOME, largely because they don’t know it exists. The support for the dual screens is at a low enough level in the systems architecture that it’s “below” KDE, GNOME, and your X applications. All they know is that you have a single screen of a given size; they’re oblivious to the fact that you’re viewing it via two physical monitors.


Desktop G400
Larger Than Life: The Millennium G400.

I started my testing with a stock Red Hat 6.1 installation. The system, including X, was initially set up to use an ATI graphics board, not the Matrox G400, and a single 17-inch monitor. I felt that this would be pretty close to the configuration used by most readers who want to try this.

The components I used included a 32 MB Matrox G400 AGP board, a copy of Xi Graphics’ dual-head Accelerated-X server, some patches from their FTP site (explained below), and a pair of 17-inch monitors: a new Optiquest Q71 and my trusty ViewSonic 17PS.

Leading a Dual Existence

While running this configuration I found that it’s really much more like having a pair of desktops that you can effortlessly move between and see at the same time, than having a single, really wide desktop. The difference is that while you really do have just one desktop, the “break” between them caused by their being on different monitors is visually disruptive enough that you’ll seldom want to spread a single open window or dialog box across the two screens. (Notice the vertical gap in the middle of my desktop as shown in Figure One — that’s where the monitors meet.)

Desktop Whole Screen
Figure One: A desktop as big as Antarctica is easier to view when you have two monitors.

Desktop KDE DLG Placement
Figure Two: KDE’s manual window-placement setting.

I also suggest that if you use KDE you try experimenting with the manual window-placement policy. Open the KDE Control Center, go to “Window Behavior,” and select the “Manual” option, as shown in Figure Two. This option makes a newly opened window follow your mouse until you click to drop it in place. After that, you can still move it with the mouse, but it’s easier to place the window initially.

The greatest single benefit to using dual monitors in this way is the ability to keep a browser or document open and visible on one screen while simultaneously doing “real work” on the other. Just a few minutes of working like this on some projects might just be enough to convince you never to go back to a single screen. Consider yourself warned.

Virtual Features

While Accelerated-X provides reasonable support for dual-head usage under Linux, it’s worth remembering that the G400 card also has features that Accelerated-X doesn’t make available — things like support for different screen resolutions, refresh rates, and color depths between the two monitors. You can change these settings in Accelerated-X, of course, but that one configuration is used to drive both monitors, so you have to select values that represent a lowest common denominator for the monitors. (The G400 even includes an adapter that lets you use a television for one of the screens, at up to 1024×768 pixels and 32-bit color, a feature I didn’t try.) Xi Graphics assures me that if they see demand for individually configuring the monitors, they’ll add it in a future release.

The G400 will also mirror the same image to both monitors, do a hardware zoom of one area of the main screen on the secondary screen, and support combinations of conventional monitors, flat panels, and TV sets.

All the Myriad Ways

There are other ways to use more than one monitor under Linux, of course. Accelerated-X also supports separate X sessions (as opposed to single logical screens) with a pair of graphics boards other than the G400, as does the Metro-X Enhanced Server from Metro Link.

If you’re interested in these other possibilities, make sure you thoroughly research the Web sites of the software companies and also contact them to verify details. I found that their tech support and the claims on their Web sites aren’t always in sync. The actual support is usually ahead of what is claimed on the site, but it doesn’t hurt to be sure exactly which products and features are and aren’t supported before you start buying hardware.

Version 4.0 of XFree will add considerable support for multiple-head operation, including a better implementation for Xinerama, which provides SLS support. According to the XFree Project, Xinerama currently has some problems with window placement and resizing under all window managers that aren’t specifically aware of Xinerama. XFree says that these problems must be fixed within the individual window managers themselves. XFree86 4.0 is still in development as I write this. With any luck at all we’ll soon have a free (in all senses) X server that will give us yet another option for running multiple monitors under Linux.

Virtual Features

Dual-head Conversion: The Eight-step Method

Converting your desktop from a staid old single-monitor operation to a dual-head display is pretty straightforward.

1. Shut down Linux, power off, and unplug the system.

2. Disconnect the monitor from the old graphics board, then remove that board from the system.

3. Install the G400 graphics board and attach both monitors to it.

4. Boot the system into command-line mode. If your system normally boots into a graphical login, you can override this by entering linux 3 at the LILO prompt to start the linux kernel in runlevel 3, which is command-line mode. If you use a kernel with a name other than linux , substitute it as needed.

5. Install Accelerated-X, using their provided script.

6. Add the patches to Accelerated-X to add G400 support. As I write this, the current version of Accelerated-X is 5.0.3, but even that needs a patch to work with the G400. If you have 5.0.0, 5.0.1, or 5.0.2, you can get patches from Xi Graphics’ FTP site to bring your copy up to 5.0.3 first, and then apply the G400 patch. Start looking for patches at ftp://ftp.xig.com/pub/updates/accelx/multihead/. The patch that brings 5.0.0 up to 5.0.1 is in the file MX-binarypatch-5.0.1.tar.gz, the one that takes you from 5.0.1 to 5.0.2 is X-binarypatch-5.0.2.tar.gz, and so on. If you’re starting with 5.0.0, as I did, you have to apply three patches to get to 5.0.3, and then at least one more to add G400 dual-head support, which is in the file M5003.003.tar.gz. I used the brute-force approach and applied all the patches from the site that applied to 5.0.0, even the ones that I didn’t think I needed, and everything worked fine. This isn’t as much trouble as it sounds; Xi Graphics has .txt files in the FTP directories that explain what each patch does, how to apply it, and what its prerequisites are.

7. Run the copy of Xsetup that Accelerated-X installed. (Just entering Xsetup from the command line should work.) This is a full-screen text-mode program that you use to tell Accelerated-X things like which graphics board and monitor you have and what resolution and number of colors you wish to use. You’ll see an entry in the list of graphics boards for the G400 in dual-head mode. If you’ve set up X more than once or twice before, this will be no problem and will take just a few minutes. You’ll notice that you can’t provide individual settings for the two monitors.

When configuring the X server, make sure that you turn on the “Energystar/ DPMS” (Display Power Management Services) on the main screen of Xsetup. if you don’t, then when you start KDE it will display a dialog box that says, “Sorry, your X11 Server lacks DPMS Support.”

8. Once you’ve set and saved your configuration with Xsetup, the startx command should do the trick, and you’ll be treated to the sight of both monitors springing to life. If you normally use a graphical login, it will also work with both monitors. See Figure One for a screen shot of my system running the G400 and Accelerated-X on a pair of 1024×768 physical screens.

Lou Grinzo is a technical writer and consultant living in upstate NY. He can be reached at lgrinzo@stny.irun.com.

Comments are closed.