
Forgive me for asking a question that has probably been asked already, but I cannot find the answer: Is it possible to get xmonad to work with zaphod mode? I specifically need the ability to associate each xmonad workspace with a different CRTC. Is that possible? Thanks, Martin

On Mon, Dec 19, 2011 at 11:23, Martin Carroll < martin.carroll@alcatel-lucent.com> wrote:
Forgive me for asking a question that has probably been asked already, but I cannot find the answer:
Is it possible to get xmonad to work with zaphod mode?
I specifically need the ability to associate each xmonad workspace with a different CRTC. Is that possible?
The default behavior is that each monitor shows a different workspace and workspaces can move between monitors. The IndependentScreens module allows you to have a linked set of workspaces across monitors instead. You cannot "tie" a workspace to a specific monitor, though. Nor can you have each screen be managed separately; this is a function of the X server, and it looks like that functionality was removed from XRandR. -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

On Mon, 19 Dec 2011 15:56:39 -0500
Brandon Allbery
Nor can you have each screen be managed separately; this is a function of the X server, and it looks like that functionality was removed from XRandR.
Can't you use the screennumber part of the display to do this? That
worked before there was an XRandR (and Xinerama). I don't have a
multiheaded machine available to check it on, or I would.
It may take some finagling to get things started properly:
DISPLAY=:0.1 xmonad & # Managing screen 1
DISPLAY=:0.0 xmonad # Managing screen 0, exit to exit X.
It doesn't look like xmonad has a way to specify a non-default config,
which would significantly lower the value of this. Moving windows
between screens didn't work back then either, but that was the X
server, so it may or may not work now.

Quoting Mike Meyer
It may take some finagling to get things started properly:
DISPLAY=:0.1 xmonad & # Managing screen 1 DISPLAY=:0.0 xmonad # Managing screen 0, exit to exit X.
It doesn't look like xmonad has a way to specify a non-default config, which would significantly lower the value of this.
The config file is a program written in the general-purpose programming language Haskell, so you have all of Haskell's power at your fingertips. Branch on the value of $DISPLAY or do any other thing that seems sensible. For example: main = do display <- getEnv "DISPLAY" case display of ":0.0" -> xmonad config00 ":0.1" -> xmonad config01 _ -> hPutStrLn stderr "Hey! I was expecting either :0.0 or :0.1 in $DISPLAY." ~d

Ok, let me clarify my earlier inaccurate statement about CRTCs. Consider a computer with one physical GPU that has two physical video ports. That physical GPU has two physical CRTCs attached to it. In both zaphod and nonzaphod mode, the host runs one instance of the Xorg process. The difference is that in nonzaphod mode, Xorg "presents" one GPU with two CRTCs, whereas in zaphod mode, Xorg "presents" *two* GPUs, each with a single CRTC. I want to run xmonad in the latter mode. Mike correctly pointed out that the "obvious" way to run xmonad in zaphod mode is to change /etc/X11/Sessions/xmonad to the following: DISPLAY=:0.1 xmonad & # Managing screen 1 DISPLAY=:0.0 xmonad # Managing screen 0, exit to exit X. Unfortunately, that doesn't work. Mike points out that some finagling might be necessary to get this to work, but after several hours I was unable to find the right finagling. I *conjecture* that xmonad does not support zaphod. If anyone on this list has managed to get zaphod to work, please let me know. Thanks! mar

On Tue, Dec 20, 2011 at 14:00, Martin Carroll < martin.carroll@alcatel-lucent.com> wrote:
DISPLAY=:0.1 xmonad & # Managing screen 1 DISPLAY=:0.0 xmonad # Managing screen 0, exit to exit X.
Unfortunately, that doesn't work. Mike points out that some finagling might be necessary to get this to work, but after several hours I was unable to find the right finagling. I *conjecture* that xmonad does not support zaphod.
The problem here is xmonad uses the Xinerama/XRandR multiscreen information to find out what to manage. If you want to run legacy dual-head, you need to get the second screen out of the Xinerama config, which means having an xorg.conf with the right incantations. Problem here is that Googling has been suggesting to me that the x.orgfolks have been systematically disabling legacy mode. You can test this by seeing if xdpyinfo reports multiple screens or not (xdpyinfo | grep 'number of screens'); if it says 1, you have Xinerama or XRandR combining the physical displays with a single server root window, and xmonad will use it as such. You will need to separate them (separate X11 "screen"s with separate root windows). You cannot fake it, btw; everything involved pretty much requires distinct root windows on each screen. If xmonad is seeing multiple monitors, it's because the screens have been assigned to different ranges of the same root window, and even if you block xmonad from paying attention to Xinerama various other window management operations would fail in exactly the same way that you see if you try to run a second window manager on the same screen (specifically, both the WM_S0 property is "owned" — as X11 reports it, both screens are X11 screen 0 — and the SubstructureRedirectMask is already being selected by another client). -- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms

If you want to run legacy dual-head, you need to get the second screen out of the Xinerama config, which means having an xorg.conf with
the right incantations. I do. And I know that my xorg.conf is correct, because xdpyinfo shows 2 screens, and several other desktop/window managers (in particular, KDE, xfce, and awesome) handle the zaphod just fine. mar

Just to clarify: I have an xorg.conf that creates two zaphod devices, but I am unable to bring up two xmonads, one per device.
participants (4)
-
Brandon Allbery
-
Martin Carroll
-
Mike Meyer
-
wagnerdm@seas.upenn.edu