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

Wolfram Kahl kahl at cas.mcmaster.ca
Thu Jan 5 19:53:37 CET 2012


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 can start another xmonad

       DISPLAY=:0.1 xmonad &

    taking over the other screen,
    but that is not sufficient to actually use it;
    I found no combination of mouse clicking and keyboard action
    that would get focus into that empty screen and start a terminal.
    I therefore have to

       DISPLAY=:0.1 terminal &

    whenever I end up in an empty workspace on the second screen,
    otherwise I can do nothing there.

    Even if both screens are populated,
    switching focus between them seems to require mouse movement,
    and still seems to be a brittle affair;
    most of the time I have to mod4-<left> click (myModMask = mod4Mask)
    (followed my mod4-t to move the activated window back into tabbing).

    I can work with this, but it is far from the degree of enjoyment
    that xmonad gave me with two monitors...


(2) In xorg.conf ServerFlags:
       Option    "Xinerama" "true"

     Now xrandr does not work anymore, and xmonad sees one big area.

     I can specify the X locations of the three outputs
     to

      import XMonad.Layout.LayoutScreens

     but I have the impression that this works on the wrong level,
     and did not see how that would allow me to switch my normal 9 workspaces
     across the now three monitors in the same way as I previously did with
     two monitors.

(I have been a pure xmonad user so far (a very happy one!)
 and not delved into its API yet.)


What is the best way to make xmonad ``just work'' with multiple screens
split across multiple graphics cards?


Just fixing my main problem with (1),
namely getting the first xmonad to handle the two outputs separately again,
would be a big improvement...


Wolfram



More information about the xmonad mailing list