Triple (3) Monitors under Linux

I have a 3 monitor setup (each 1680x1050) via an Nvidia NVS440 (2 GPUs, 2 outputs per GPU totalling 4 outputs); this works fine under Windows XP,7 but caused considerable headaches under Linux (Ubuntu 9.04).

I had previously used an XFX 9600GT and the onboard XFX 9300GS to produce the same result but the card was noisy and power hungry and I was hoping that there was some magical switch in the NVS4400 that got rid of this annoying problem - turns out the NVS440 is just 2 cards on one physical PCB :-p (I searched the net high and low for people using this card under Linux but found nothing, if anything the card uses less power and is fan less so I was to benefit from it either way)

Anyway, using either set up there were 5 solutions available:

  • Have 3 separate X instances, all un joined
  • Have 3 separate X instances, adjoined by Xinerama
  • Have 2 separate X instances - One using twin-view, both adjoined by Xinerama
  • Have 2 separate X instances - One using twin-view but no Xinerama
  • Have a single Twin-view setup and leave the 3rd screen unplugged :-p

The 4rd option, using 2 separate X instances and twinview (but no xinerama) was the best balance in terms of performance and usability but caused 2 really annoying issues

  • You couldn't control (without altering the shortcuts) which screen an application opened onto - and once it was opened you couldn't move it to another screen without opening up terminal and forcing it to move
  • Nvidia's overriding or falsifying of Xinerama breaks and the 2 screens joined by Twin view behave like a single huge screen causing popups to open in the middle of both screens and maximising of windows stretches to the width of the first 2 screens
  • Firefox can only run one instance as the same user so having multiple firefox windows requires at least 2 users

The second option "feels" like the right option, but OpenGL is basically disabled and playing any sort of game or even running anything graphical causes a huge performance drop and instability - even trying to run a basic emulator for gba or gens just causes the system to fall over. It works just enough to stare at your desktop and do nothing but as soon as you start doing some work - opening windows, dragging things around - running multiple copies of firefox it just really feels slow.

The last open, only going dual screen works perfectly and everything performs as required, full GPU acceleration - two logical screen spaces - perfect, just make it work across GPUs like windows! :-p

Anyway, I know RandR was supposed to pick up the slack when it would introduced GPU objects of sorts to allow multiple GPUs to be stitched together to create one huge desktop at a much deeper layer than Xinerama. I was wondering if this has now been fixed (I noticed X server 1.7 is out) and whether anyone has got it running successfully?

Again, my requirements are:

  • One huge desktop to drag any window across
  • Maximising of windows to each screen (as XP does)
  • Running fullscreen apps on the primary screen and disabling the mouse from moving onto the others or on all 3 stretched

Finally as a side note; I am aware of the Matrox triple (and dual) head splitter but even the price they go for on eBay is more than I can afford atm, my argument: I shouldn't have to buy extra hardware to get something to work on Linux when it's something that's existed in the windows world for a long time (can you tell I don't get on with X :-p); If I had the cash I'd have bought the latest version of this box already (the new version finally supports large resolutions as the displays I have 1680x1050 each).


Solution 1:

Trying out Fedora 11 (XServer 1.7) and Ubuntu 9.10 (XServer 1.6.4) I can safely say the issue is still broken - If not more broken than before :-p

Some things I learned that might be useful to others:

  • Linux is starting to boot very very fast! :-D
  • When X dies for whatever reason it gets stuck in a restart-loop, this happens for the nvidia, nv and nouveau drivers
  • X can start without any xorg.conf using some auto-detect settings
    • unfortunately this only worked on my onboard GeForce 9300 for the nivida driver, nv and nouveau don't work with the onboard graphics.
    • Monitor resolution wasn't detected properly
    • Enabling ssh server allowed me to just ssh into the box once it'd broken as the restart-loop - being able to change the config and force a reboot is better than booting into the live cd to do the same thing :-p
  • The 32-bit PAE kernel breaks the nvidia drivers - (didn't try with nv or Nouveau) - everything (even 2d) became very slow and you could literally see portions of the screen been redrawn
  • 64bit support worked out of the box but non of the 32bit only packages would work without forcing them and even then some would still break; :-p
  • NV is acceptable for very basic use to avoid having to use propriatary binaries
  • Nouveau is a lot faster than I'd thought and runs a 2D setup pretty well; It even handles dual head output really nicely using the built in configuration AND also rotation so I was really impressed;
    • Nouveau doesn't yet support multicard setups - reading the site it looks as if none of the developers have this sort of setup and hence no way to test; Almost makes me want to gather a donation together and donate a basic system of this sort to sombody to just get it done - or learn the ins and out and start contributing myself

It seems like I go through this process every 3-4 months:

  • Hear about latest features under linux
  • Avoid them for a while
  • Try them out
  • Realise it's all still broken
  • Wait another 3-4 months

For now I'm back to my trusty windows xp setup; it never fails to boot (boot time feels incredibly slow now that I've seen ubuntu boot that fast), all my applictions work out of the box and my hardware has decent driver support!! :-p

Update: I logged a ticket with Nvidia and they gave me the standard 2 options:

  • Use Twinview and a single X desktop without Xinerama
  • Use 3x single X servers and join using Xinerama

The point they mentioned regarding the second option is that all graphical requests via Xinerama are looped for each screen (so each screen sees the same request, most likely altered based on the relative position of the screen to the original); So every operation occurs 3 times - which explains the performance hit; I guess if you have 3 things going in within each window that's 9 operations; This probably affects the two screens on the same GPU more than the one that has an entire GPU for a single screen but it was so noticeable just using a standard desktop that even rendering a web page in Firefox was delayed somewhat.

Solution 2:

Catalyst 10.7 and newer have support for Eyefinity on Linux: http://www.phoronix.com/vr.php?view=ODQ0OA

This will allow you to have 3 monitors on one AMD/ATI graphics card with 3D acceleration.

Solution 3:

There is a hack of another option - I will be releasing software (open-source) soon for Ubuntu Karmic - if I can get it working on there, otherwise it will be for Jaunty which I've already got working. - http://ubuntuforums.org/showthread.php?t=884161

See videos of this 6 monitor system over on youtube: (Link removed due to newbie limit - search youtube for "d2globalinc")

It's not the solution we want but its a way to get Composite with multiple-gpu's now until a better solution (perhaps AMD's eyefinity or nvidia's answer to that - whatever that may be)

Shane Menshik D2 GLOBAL INC.

p.s. I mention AMD's EyeFinity - See demo here - (search youtube for "Eyefinity Linux" - couldn't post 2nd link due to newbie limit) which is the most promising thing I've seen yet for linux / multiple GPU support.

Solution 4:

When X dies for whatever reason it gets stuck in a restart-loop

I also had this happen under Debian Lenny.

It was fixed by upgrading Nvidia drivers by switching to the testing repository (Squeeze).

Newer cards need newer drivers.