June 2005

Using Xinerama &
XORG for Extended Xdesktops

Over time it was thought that having a lot of hardware was great. As time has moved on the thought has become less hardware that can do more and elegantly. With extended desktops under X windows using Xinerama, that can be achieved.

Sometimes in X windows, we all want to try something strange. It is in the nature of the curious OS user to do. A look at extending a laptop display using xinerama and x.org.

The Scenario

The hardware is probably considered marginal by most of the l33t community [ 1 ] but it makes for the best (or worst depending on your point of view) case example. Following is the laptop involved:

Acer 1410 From a Linux View


processor  : 0
vendor_id  : GenuineIntel
cpu family : 6
model      : 13
model name : Intel(R) Celeron(R) M processor         1.30GHz
stepping   : 6
cpu MHz    : 1299.342
cache size : 1024 KB
...
MemTotal   : 498008 kB
...
Filesystem 1K-blocks  Used      Available 
/dev/hda   237122736  16415460  18791124  
...

Outside of the above, it uses USB for _all_ keyboard and mice operations which made life a bit easier. All that had to be done was to switch on USB core support for mice and keyboards (more on that later).

So, there is a single Acer 1410 laptop with X.org running just fine using framebuffer in console and for X (the needs for graphics - at the time - were limited). Now it has to be able to extend out to at least a 1024x768 with 16bpp+ monitor.

How can it be done?

Xinerama Is the Key

In truth, the answer was two parts. Using xinerama and updating to the latest x.org release. The system in question uses slackware-10 base so moving over the installed X was not a big deal.

Backup X First

Anyone who does anything different is a complete moron. If there is not space then find a way to backup the current working X directory whether it is a simple cd /usr; cp -Rp X11R6 X11R6.orig or streaming it off to /dev/st0. [ 2 ]

The xorg.conf File

All that is needed is a working config file. Next are some pictures of it in action.


Section "ServerLayout"
        Identifier     "Xinerama Layout"
        Screen         "Screen0"
        Screen         "Screen1" RightOf "Screen0"
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

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

Section "Files"
    RgbPath    "/usr/X11R6/lib/X11/rgb"
    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/CID/"
    FontPath   "/usr/X11R6/lib/X11/fonts/Speedo/"
    FontPath   "/usr/X11R6/lib/X11/fonts/75dpi/"
    FontPath   "/usr/X11R6/lib/X11/fonts/100dpi/"
    FontPath   "/usr/X11R6/lib/X11/fonts/cyrillic/"
EndSection

Section "Module"
    Load        "dbe"   # Double buffer extension
    Load "extmod"
    SubSection  "extmod"
      Option    "omit xfree86-dga"   # don't initialise the DGA extension
    EndSubSection
    Load        "type1"
    Load        "freetype"
#    Load        "speedo"
    Load       "glx"
EndSection

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "keyboard"
EndSection

Section "InputDevice"
    Identifier  "Mouse0"
    Driver      "mouse"
        Option "Protocol"       "ExplorerPS/2"
        Option       "ZAxisMapping" "6 7"
        Option       "ButtonNumber" "7"
        Option       "Buttons" "7"
    Option "Device"      "/dev/mouse"
EndSection

Section "Monitor"
        Identifier   "LCD
        VendorName   "Acer LFP LCD"
        Identifier   "LCD
        VendorName   "Acer LFP LCD"
        ModelName    "LCD Panel 1024x768"
        DisplaySize  320        240
        HorizSync    31.5 - 48.5
        VertRefresh  40.0 - 70.0
        Option      "dpms"
EndSection

Section "Monitor"
       Identifier   "CRT"
      VendorName   "Dell"
       ModelName    "CRT Screen 1280x1024"
       DisplaySize  320        240
       HorizSync    31.5 - 48.5
       VertRefresh  40.0 - 70.0
       Option      "dpms"
EndSection


Section "Device"
        Identifier  "i855a"
        Driver      "i810"
        VendorName  "Videocard vendor"
        BoardName   "Intel 852"
        BusId       "0:2:0"
        Option      "Clone" "false"
        #Option     "DevicePresence" "false"
        #Option     "FlipPrimary" "true"
        Option      "DRI" "true"
        #Option      "CloneRefresh" "75"
        Option      "MonitorLayout" "CRT,LFP"
        Screen      0
EndSection

Section "Device"
       Identifier  "i855b"
       Driver      "i810"
       VendorName  "Videocard vendor"
       BoardName   "Intel 852"
       BusId       "0:2:0"
       Screen      1
EndSection


Section "Screen"
        Identifier "Screen0"
        Device     "i855a"
        Monitor    "LCD"
        DefaultDepth     24
        SubSection "Display"
                Viewport   0 0
                Depth     16
                Modes    "800x600" "640x480"
        EndSubSection
        SubSection "Display"
        EndSubSection
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes    "1024x768" "800x600" "640x480"
        EndSubSection
EndSection

Section "Screen"
       Identifier "Screen1"
       Device     "i855b"
       Monitor    "CRT"
       DefaultDepth     24
       SubSection "Display"
               Viewport   0 0
               Depth     16
               Modes    "800x600" "640x480"
       EndSubSection
       SubSection "Display"
               Viewport   0 0
               Depth     24
               Modes    "1024x768" "800x600" "640x480"
       EndSubSection
EndSection

Section "DRI"
        Group        0
        Mode         0666
EndSection

Note it works with the 855{G}M intel video card but it uses the i810 driver, the i810 driver holds true for many of the laptop displays out there.

Imagery

Now at long last, some imagery from the setup. First, the actual physical area. In the picture, there is a laptop and an 8-cube TFT that is using the same video bus as the laptop screen.

Physical Hardware

image

Soft Screenshots

Here is a screenshot in action using e17 across two 1024x768's under the extended desktop scenario.

image

Summary

Getting the desktop to a point where it is usable whether that is ergonomically, visibly or even artistically is fun, something we could all use a little more of.

Footnotes

  1. The ACER 1410 has gotten more compliments, at least in the author's experience, than most laptops.
  2. Copying off X via scp or ftp works as well.