Wezzul.com - It's the Dinglez

Dual Display in Linux - Wezzul.com

Dual Display in Linux

So the other day, I figured I'd get dual display working in Linux. I had a spare video card and monitor laying around, so there was no reason not to add more real estate to any given desktop.

Though I don't run Gentoo, this site was extremely useful in getting things going.

First, I had to find out the PCI Bus ID's for both video cards. This can be easily found out executing the command lspci. I found the BusID's to be 2:0:0 and 1:6:0 for the Nvidia onboard card and the ATI All-in-Wonder, respectively. These values go in the Device sections. These values are not required for a one card setup, but if you are to use two video cards, it is absolutely necessary to have these Bus ID's in your XF86Config-4 file. Another major difference is adding the amount of video ram (in kilobytes) to that same Device section. I'm not totally sure if this is necessary, but I figure it definitely can't hurt. Next is to define both monitors, which is about the same as you would with one monitor. Defining the HorizSync and VertRefresh values is key for getting the most out of your monitors. Generally, you can find these specs for any given monitor with a simple google search. As usual, you need to define two Screen sections, one for each monitor, listing the device and monitor to be used, as well as setting the depth (in bits) and resolution.

The big differences in the config file lie in the ServerLayout section. Mine as is follows:

Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen1" 0 0
Screen 1 "Screen2" RightOf "Screen1"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "Generic Mouse"
EndSection


Note the RightOf command. This is pretty cool. You can use plain-text requests such as this to define where the second screen is in relation to the first. Also, for Screen0, the 0 0 after the name is the position that the screen lies at. I am fairly sure that, by default, this is where it lies anyways, but there is no need for ambiguity.

A last section that was not in my config by default is the ServerFlags section. I added the following:

Section "ServerFlags"
Option "Xinerama" "true"
EndSection


Xinerama is a set of extensions for Xfree86 that allow you to use multiple displays as one big virtual desktop, therefore allowing you to move windows between them (much the same way Windows works). If you do not include this, from what I've read, programs need to have coded in them the ability to move from one display to another, and the performance is a bit flaky at best.

In any case, it seems to be working now, I'm not really having any issues with it. There is some tweeking to be done to increase speed, and I will post about that if I get any results. My full config is here .

Posted on Friday, May 27, 9:14am in Tech by wezzul
Username:

URL:

Comment: