ZachSchneider [dot] com
  • Facebook
  • Google
  • Twitter
  • Home
  • About Me
  • Terms of Use
  • Archive
  • Sitemap
Home» Geek » Dual Monitor setup for Linux

Dual Monitor setup for Linux

Posted on July 11, 2008 by Zach in Geek, How to..., Linux, Software - No Comments

Prerequisites

In all likelihood, you are probably using either two PCI graphics cards or one AGP card and one PCI card. Either way, it is quite quick and easy to make a new xorg.conf or XF86Config for your new cards.

First, of course, make sure you are using a recent version of X for best results. I’m using X.org 6.7.0, and I’ve also had this working with XFree86 4.3.x. XFree86 4.2.x should also work, but I wouldn’t recommend anything older than that.

Now backup your existing X configuration – things could go wrong, or you might need it for reference later.

Disable X from starting at boot (rc-update del xdm default), shut down your computer, insert both graphics cards, and boot the computer back up again. The screen that your bios information shows up on is your “primary” monitor. If this is the wrong one, and you are using an AGP and a PCI graphics card, there should be an option in your BIOS that lets you choose which one to use.

  • In AWARD BIOS (v4.51PG), menu: Integrated Peripherals -> Init Display First -> [PCI Slot / AGP]
  • In AMIBIOS (v 08.00.08), menu: PCIPnP -> PCI Bus Scan Order -> [Ascent/Descent]
  • In other BIOSs it’s called: Bios First Boot -> [AGP/PCI]

Configuring X

In most cases, it is simplest to let X do as much auto-configuring as possible.
It can usually detect your graphics cards, at least.

As root run,

Code: X Auto-Configuration
X -configure

This will make your screen blink a few times, before returning with a message saying that it has created a test X configuration file at /root/XF86Config.new or /root/xorg.conf.new and giving the command line to test the X server using this config file.

With a bit of good luck, this should be a working X configuration.
You may have to edit the mouse, monitor, or resolution settings. This is done in the same way as with a single-monitor setup, but there will be two “Monitor” sections, two “Device” sections, and two “Screen” sections.
The “Screen” sections connect a monitor to a graphics card.

It is probably a good idea to change the Identifiers of the device and monitor sections so you can tell them apart, e.g.

File: /etc/X11/xorg.conf or /etc/X11/XF86Config
...
Section "Monitor"
  Identifier   "NECMonitor"
...
Section "Monitor"
  Identifier   "VSMonitor"
...
Section "Device"
  Identifier  "NvidiaCard"
  Driver      "nvidia"
...
Section "Device"
  Identifier  "AtiCard"
  Driver      "ati"
...
Section "Screen"
  Identifier   "LeftScreen"
  Device       "NvidiaCard"
  Monitor      "NecMonitor"
  DefaultDepth 24
...
Section "Screen"
  Identifier   "RightScreen"
  Device       "AtiCard"
  Monitor      "VSMonitor"
  DefaultDepth 24

At the top of the file, there is a section called “ServerLayout”.
This section specifies the layout of your monitors.
In my configuration, I have two monitors beside each-other–”RightScreen” is to the right of “LeftScreen”.

The layout can be specified using keywords or absolute pixel positions (useful for odd layouts, or even overlapping layouts!?)
E.g.

File: /etc/X11/xorg.conf or /etc/X11/XF86Config
Section "ServerLayout"
  Identifier     "XFree86 Configured"
  Screen      0  "LeftScreen" 0 0
  Screen      1  "RightScreen" RightOf "LeftScreen"

“LeftScreen” is located at position 0,0.
I then have “RightScreen” to the right of it.

The useable keywords are “RightOf <identifier>”, “LeftOf <identifier>”, “Above <identifier>”, and “Below <identifier>”.
A special keyword is “Relative” – it is used to specify the position in pixels of a screen in relation to another screen.
E.G.

File: /etc/X11/xorg.conf or /etc/X11/XF86Config
  Screen      0  "LeftScreen" 0 0
  Screen      1  "RightScreen" Relative "LeftScreen" 1024 40

In most cases, the LeftOf and RightOf keywords are what you want.

So, try starting the xserver using your test configuration file again.
Verify that the mouse can move from screen-to-screen in a relatively intuitive manner, and that your resolution and refresh rate is right.
You can then copy your configuration file overtop of your old /etc/X11/XF86Config or /etc/X11/xorg.conf.

Dual Monitors, Linux, xorg.conf

Search

Facebook

Tags

Apache Apple bar Beer Bill Gates cheat sheet Chicago Code comic dating Download Day Election 2008 Firefox 3 flash Fun Geek Hackerspace How to... Internet Explorer Life Linux mac Microsoft Movies MySQL Nerd News PHP pickup lines politics quote Software Tech Twitter ubuntu virus vote Web Dev Web Development Windows Wine women Wordpress writings YouTube

Archives

  • December 2011
  • October 2011
  • September 2011
  • July 2011
  • May 2011
  • April 2011
  • January 2011
  • September 2010
  • August 2010
  • June 2010
  • May 2010
  • March 2010
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • March 2007
  • February 2007

(c) 2012 ZachSchneider [dot] com