[xmonad] How to manage three monitors on two graphics cards?

Wolfram Kahl kahl at cas.mcmaster.ca
Fri Jan 6 01:16:28 CET 2012


On Thu, Jan 05, 2012 at 03:53:47PM -0400, Norbert Zeh wrote:
> Wolfram Kahl [2012.01.05 1353 -0500]:
> > I have a machine with two graphics cards,
> > and three differently-sized monitors (at different orientations)
> > driven by the two cards.
> > 
> > As far as I could easily find, my main options appear to be:
> > 
> > (1) In xorg.conf ServerFlags:
> >        Option    "Xinerama" "false"
> > 
> >     Then I have two screens, :0.0 and :0.1;
> >     I follow the gentoo Multihead instructions at
> > 
> >       http://en.gentoo-wiki.com/wiki/X.Org/Dual_Monitors
> > 
> >     and start X without session manager, just with startx,
> >     and have xmonad on the last line of .xinitrc.
> >     (This is xmonad-0.10.)
> > 
> >     That xmonad then appears to manage only the first screen, :0.0,
> >     which happens to have two outputs associated with it.
> >     (While I had the second card deactivated,
> >      xmonad managed these two outputs separately as it should.)
> >     However now, even though xrandr still sees these two outputs
> >     associated with the current screen,
> >     xmonad manages them as a single unit --- does that qualify as a bug?
> 
> I'm not sure about this, but I would suspect that this is an x server/graphics
> driver issue.  xmonad can only work with what the x server/graphics driver
> reports as the available screens.  I had a similar situation where, using three
> screens and the NVIDIA proprietary driver.  I was running xinerama on top of
> twinview and suddenly had the twinview screens used as a single screen.

I am running to equal ATI cards with the radeon driver.

The code configuration is taken care of by the gentoo USE flag xinerama ---
I just checked the tests suggested on the FAQ page.

> In any case, running with "xinerama" "false" doesn't seem to be the way to go
> because you can't move windows between independent displays, etc.

Indeed, but currently it is still more usable than anything
I could achieve with Xinerama on.


> 
> > (2) In xorg.conf ServerFlags:
> >        Option    "Xinerama" "true"
> > 
> >      Now xrandr does not work anymore, and xmonad sees one big area.
> 
> Indeed, xrandr and xinerama are incompatible.  Do you need xrandr?

I just knew no other tool that produces that kind of information...

> Can you
> maybe post your entire xorg.conf file.


  http://sqrl.mcmaster.ca/~kahl/xorg.conf-2012-01-05

1080x1920     2048x1152           1920x1200
-----------
|         |                    ---------------------
|         |--------------------|                   |
|         ||                  ||                   |
| AsusV1  ||     Samsung1     ||      Apple1       |
|         ||                  ||                   |
|         ||                  ||                   |
|         |-----------------------------------------
|         |
-----------

  Radeon2  |                Radeon1
   :0.1    |                 :0.0
           |    Radeon1b       |     Radeon1a



Right now, with Xinerama off, I get:

On DISPLAY :0.1:
 $ xrandr
Screen 1: minimum 320 x 200, current 1080 x 1920, maximum 8192 x 8192
DVI-2 connected 1080x1920+0+0 left (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080      60.0*+
   ...
 $ ghc -e "Graphics.X11.openDisplay [] >>= Graphics.X11.Xinerama.getScreenInfo"
Xlib:  extension "XINERAMA" missing on display ":0.1".
[Rectangle {rect_x = 0, rect_y = 0, rect_width = 1080, rect_height = 1920}]

OK.


On DISPLAY :0.0:
 $ xrandr
Screen 0: minimum 320 x 200, current 3968 x 1200, maximum 8192 x 8192
DVI-0 connected 1920x1200+2048+0 (normal left inverted right x axis y axis) 495mm x 310mm
   1920x1200      59.9*+
DVI-1 connected 2048x1152+0+0 (normal left inverted right x axis y axis) 510mm x 287mm
   2048x1152      59.9*+
   ...
 $ ghc -e "Graphics.X11.openDisplay [] >>= Graphics.X11.Xinerama.getScreenInfo"
Xlib:  extension "XINERAMA" missing on display ":0.0".
[Rectangle {rect_x = 0, rect_y = 0, rect_width = 3968, rect_height = 1200}]


I consider this as wrong and would expect two separate rectangles to be reported
for the two outputs DVI-0 and DVI-1.
(That was probably the case while the second card was deactivated.)


> From your
> post, I suspect that the only reason you want it is that your xinerama setup
> still reports everything as one big screen, which is really strange.

With Xinerama on, I don't get the ``extension "XINERAMA" missing'' messages,
and I get the two rectangles from above in one list,
no matter whether I use ScreenRadeon1
or the attempts ScreenRadeon1a and ScreenRadeon1b at putting the two monitors
into separate screens (which only seems to make everything worse).

What makes ``Xinerama on'' unusable right now is that the monitors start panning
around some virtual space I don't understand when I move the mouse beyond
some of their edges, and don't pan back when I try the opposite edges.



Wolfram



More information about the xmonad mailing list