Compiz and Xinerama on NVIDIA?
Posted by ushimitsudoki on December 13, 2008
I have 3 monitors and 2 video cards, and for a long time I thought it was simply not possible to have all three in one large desktop with compositing. Yes, I could have one large desktop, or I get have multiple X screens with compositing on them, but the “holy grail” was unreachable. I just thought we would have to wait for XRandR 1.3 and the corresponding NVIDIA driver support.
Until I saw this.
The relevant ubuntu forum thread is here. Of course, there is a downside: you have to use xserver-xgl which is dead (development stopped around Jan 2008) because the latest versions of the normal xserver release supposedly include “most” of the functionality of xserver-xgl. (Except the functionality I care about, of course.)
The problem with running xserver-xgl specifically is that Intrepid (Ubuntu 8.10) now uses HAL for all the hardware stuff and ignores some/all of xorg.conf. Who knows how much? Well, good question. If you find clear documentation on the relationship between HAL and xorg.conf please let me know. This sure ain’t it.
What this means is that after you get xserver-xgl running, you are going to encounter a lot of hardware issues from HAL. These are things like the mouse/keyboard not working at all or correctly (like missing or incorrectly mapped keys), USB drives not mounting, and so on.
Let me try to document here what I did to get my system working – it wouldn’t hurt to read through that forum thread either, but the main point of it is to use xserver-xgl.
System info
So you know what sort of system I am working from:
Ubuntu 8.10 amd64
2×8800 GTS 512 (180.11 drivers)
3×24″ DFP monitors
1: Get and Install xserver-xgl. Get the latest (and probably last) release here. After installation, when you start X, xserver-xgl will be in effect. It is easy to turn off if you need to during the setup process. If the file: ~/.config/xserver-xgl/disable exists, xserver-xgl will not run. So just touch that or whatever as needed.
2: Get a basic xorg.conf working. Here’s what I got started with (there are problems here that will be addressed later):
Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" 1920 0 Screen 1 "Screen1" 3840 0 Screen 2 "Screen2" 0 0 InputDevice "Keyboard0" "CoreKeyboard" InputDevice "Mouse0" "CorePointer" EndSection Section "Module" Load "dbe" Load "extmod" Load "type1" Load "freetype" Load "glx" EndSection Section "Extensions" Option "Composite" "Enable" EndSection Section "ServerFlags" Option "Xinerama" "true" EndSection Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "auto" Option "Device" "/dev/psaux" Option "Emulate3Buttons" "no" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" Identifier "Keyboard0" Driver "kbd" EndSection Section "Monitor" # HorizSync source: edid, VertRefresh source: edid Identifier "Monitor0" VendorName "Unknown" ModelName "Iiyama PLB2403WS" HorizSync 30.0 - 83.0 VertRefresh 56.0 - 76.0 Option "DPMS" EndSection Section "Monitor" # HorizSync source: edid, VertRefresh source: edid Identifier "Monitor2" VendorName "Unknown" ModelName "Iiyama PLB2403WS" HorizSync 30.0 - 83.0 VertRefresh 56.0 - 76.0 Option "DPMS" EndSection Section "Monitor" # HorizSync source: edid, VertRefresh source: edid Identifier "Monitor1" VendorName "Unknown" ModelName "Iiyama PLB2403WS" HorizSync 30.0 - 83.0 VertRefresh 56.0 - 76.0 Option "DPMS" EndSection Section "Device" Identifier "Videocard0" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 8800 GTS 512" BusID "PCI:1:0:0" Screen 0 EndSection Section "Device" Identifier "Videocard1" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 8800 GTS 512" BusID "PCI:1:0:0" Screen 1 EndSection Section "Device" Identifier "Videocard2" Driver "nvidia" VendorName "NVIDIA Corporation" BoardName "GeForce 8800 GTS 512" BusID "PCI:2:0:0" EndSection Section "Screen" Identifier "Screen0" Device "Videocard0" Monitor "Monitor0" DefaultDepth 24 Option "metamodes" "DFP-0: 1920x1200 +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen2" Device "Videocard1" Monitor "Monitor2" DefaultDepth 24 Option "metamodes" "DFP-1: nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection Section "Screen" Identifier "Screen1" Device "Videocard2" Monitor "Monitor1" DefaultDepth 24 Option "TwinView" "0" Option "metamodes" "nvidia-auto-select +0+0" SubSection "Display" Depth 24 EndSubSection EndSection
3. Figure out (and hopefully fix) what’s not working. Here’s what I noticed:
USB Drives will not mount.
When I tried to open up a USB drive from my Places menu, I got an error like “org.freedesktop.hal.storage.mount-removable no <– (action, result)”
This was easily resolved, gksu polkit-gnome-authorization will bring up the Authorizations editor:
Just set the permissions appropriately there, and USB drives should be mounting like normal. No restarting required.
Keyboard keys
I have a Logitech G15 and after the change some keys weren’t working, like arrow keys, PgUp, etc. I was able to get the non-multimedia keys working, by basically relying totally on evdev and stripping them out of xorg.conf. That gave me a pretty slim xorg.conf:
Section "ServerLayout" Identifier "Layout0" Screen 0 "Screen0" 1920 0 Screen 1 "Screen1" 3840 0 Screen 2 "Screen2" 0 0 Option "AllowEmptyInput" "True" EndSection Section "Module" Load "dbe" Load "extmod" Load "type1" Load "freetype" Load "glx" Load "evdev" EndSection Section "Extensions" Option "Composite" "Enable" EndSection Section "ServerFlags" Option "Xinerama" "true" EndSection Section "Monitor" # HorizSync source: edid, VertRefresh source: edid Identifier "Monitor0" VendorName "Unknown" ModelName "Iiyama PLB2403WS" HorizSync 30.0 - 83.0 VertRefresh 56.0 - 76.0 Option "DPMS" EndSection ... as original file ...
Stop Here
At this point I’m right where I was in terms of functionality as I was before, which would have made me very happy, except…
… X crashed 3 times in the hour or two I spent documenting this procedure. And, since xorg-xgl is dead, there’s really no point in continuing with this. I did learn a little more about how HAL replaces xorg.conf, and I think I am starting to see how it makes sense.
(Special thanks to DASPRiD who went through a lot of this with me!)


Snille said
Hi, I’ve been on Ubuntu now some time. I went from XP with 6 screens to Ubuntu with two (using twinview). I have also been down the road trying to getting at least 4 screens to work (with compositing). However, I never headed in to the xorg-xgl world, and then I upgraded to 8.10 and have not yet tried to get more then 2 screens up. I’m thinking (after reading your post here) of going over to xorg-xgl, but have you heard anything of HAL being able to do the same job in 9.04? Should I maybe wait? Is it worth the trouble? :)
ushimitsudoki said
Snille,
It’s not really HAL that is the problem.
It’s xorg/twinview/nvidia/xrandr and how the pieces interact (or, rather how they do not interact).
As you can see from the video, 6 screen is possible using xorg-xgl – but xorg-xgl is dead, and doesn’t work well in 8.10 (and I would assume later version).
If you need 6 screens now and you need them as one large desktop, then xorg-xgl is the only way I know and that means you will probably want to go to 8.04 – it’s a long term release anyway so that’s not really a bad version to sit on.
You could set up multiple X screens under Twinview of course to get compositing – that’s what I do. You can’t drag windows between the X screen, though. With 1 row of monitors, this isn’t really that bad. You just have a “group” of applications you use in one, and another for the other. It’s not optimal, but it’s decent.
With multiple rows, you could to the same thing, but it would probably be more annoying. I’ve never ran more than 4 monitors on this machine – all in one row – so I can’t speak directly to that.
If I understand correctly, the functionality that xorg-xgl had is being incorporated into the core XOrg product, and hopefully that will fix everything. I’m skeptical, but hopeful.
Shane Menshik said
Its been awhile since I posted to the original Ubuntu thread (I’m the guy who posted the 6 screen vid and started that thread) – But anyway I started searching now to see if anyone has found a solution to Intrepid – xserver-xgl – or any alt methods. Doesn’t look like anything yet. I read that 9.10 will require some adjustments to video drivers, so I’m kinda hoping that perhaps nvidia and xrandr will be able to support multiple video cards with composite effects, etc.. But we shall see.. I had the same problems as you when trying intrepid – I even have the same G15 keyboard. I didn’t notice the stability issues – but the real point is that even if I do get it to work – xserver-xgl is dead and a new solution is needed. I’m still running my own modded 8.04 system w/ xserver-xgl. I just update the parts I see fit (compiz fusion, openoffice, etc) – and I’m living fine with it for now. But I would really like to be able to move up with the rest of the world to new Ubuntu versions without sacrificing my 6 screens (as would others with 3 or more screens).. I guess if you find anymore resources, email me or post to the original thread in the ubuntu forums.. Good to see there are others looking for solutions! Thanks for the tips here!
Shane Menshik
D2 GLOBAL INC
Shane Menshik said
Thought I would post this here – I have been using xserver-xgl with intrepid for a few days now and think I have it working as good as it was in Hardy.. I’ll be posting a howto and more information soon – you can see my announcement here: http://ubuntuforums.org/showpost.php?p=6889204&postcount=326 .
Shane Menshik
D2 Global Inc