[xmonad] How to manage three monitors on two graphics cards?
Wolfram Kahl
kahl at cas.mcmaster.ca
Sat Jan 7 05:18:50 CET 2012
On Fri, Jan 06, 2012 at 08:10:48AM -0800, Mike Meyer wrote:
> On Thu, 5 Jan 2012 20:31:59 -0500
> Wolfram Kahl <kahl at cas.mcmaster.ca> wrote:
> > On Thu, Jan 05, 2012 at 05:08:29PM -0800, Mike Meyer wrote:
> > > Xrandr is the preferred solution. Xinerama has missing functionality
> > > and vague specs.
> >
> > However:
> >
> > * With Xinerama on, xrandr is not available.
>
> That doesn't seem right. Both systems I have available have both the
> xrandr and xinerama extensions working in the X server. At least, I
> can query the screen info using either extension. What makes you say
> this?
The fact that while I am running an X server with Xinerama On,
when I issue the command ``xrandr'', I only get the error message:
RandR extension missing
On Thu, Jan 05, 2012 at 11:20:40PM -0400, Norbert Zeh wrote:
> I'm attaching an updated version of your xorg.conf file, which I fashioned to
> (a) match my own current setup and what I learned from all the xinerama setups I
> used before and (b) match what man xorg.conf actually has to say about driving
> multiple monitors off a single card. No guarantees this will not simply not
> work at all (as in "the X server doesn't even start"), but we have to start
> somewhere. So, do try it out.
Thanks a lot!
Unfortunately, my current impression is that the radeon driver might be
the source of at least the differences, and probably even of the problems...
> >
> > 1080x1920 2048x1152 1920x1200
> > -----------
> > | | ---------------------
> > | |--------------------| |
> > | || || |
> > | AsusV1 || Samsung1 || Apple1 |
> > | || || |
> > | || || |
> > | |-----------------------------------------
> > | |
> > -----------
> >
> > Radeon2 | Radeon1
> > :0.1 | :0.0
> > | Radeon1b | Radeon1a
> >
> # Tried to fashion this after my quad-monitor NVIDIA setup on archlinux to
> # match your triple-monitor ATI setup. Don't ask me why what you are doing
> # does not work. I'm just trying to start from what I know *does* work for me
> # and see whether we can tweak this into something that does work for you.
> #
> # Apart from cleaning out some comments and changing indentation so I was able
> # to consume the information more easily, there were three potentially
> # important changes I made:
> #
> # 1) Specify the relative screen positioning in the ServerLayout section
(absolute)
> # 2) Have one Device section per monitor. That is, the card with two monitors
> # has two corresponding Device sections with different Screen numbers.
> # According to man xorg.conf, this is as it should be, and it certainly is the
> # only way I ever got xinerama to work on any of my setups.
I had not noticed that previously, but had only seen somewhere
the version with the two DVI-* outputs specified to two monitors
in a single device section.
man xorg.conf is indeed quite unambiguous about that,
but my radeon driver seems to not like those Screen lines at all:
(EE) RADEON(1): reusing fd for second head
I tried setting Screen 2 on AsusV1, but that gives:
(EE) Screen 2 deleted because of no matching config section.
Re-inserting the
Option "Monitor-DVI-*" XYZ
lines AND removing the Screen lines was the only way
I got to a point where a terminal would start.
> # 3) Got rid of the Virtual display sizes, as I suspect they were the source of
> # your panning issues.
(They were commented out anyway, and still are in my versions of the xorg.conf.)
>
> Section "ServerLayout"
> # Note this layout will currently align your monitors along their top edges.
> # Once we get this working, we can easily tweak this aspect.
> Identifier "Main Layout"
> # This whole layout here may possibly also be achieved using LeftOf/RightOf
> # statements, but I opted for absolute coordinates because they are
> # necessary if you want to tweak the relative vertical alignment of
> # monitors, as I had to learn the hard way.
> Screen 0 "ScreenApple1" 3128 0
> Screen 1 "ScreenSamsung1" 1080 0
> Screen 2 "ScreenAsusV1" 0 0
> InputDevice "Keyboard0" "CoreKeyboard" # Not sure you need this, but it's there in my server layout
> InputDevice "Mouse0" "CorePointer" #
I have xorg.conf.d files taking care of input --- no problems there.
> Option "Xinerama" "1"
> EndSection
>
>[...]
>
> Section "Device"
> Identifier "DeviceApple1"
> Driver "radeon"
> BusID "PCI:06:00:0"
> Option "Int10" "True"
I tried without Int10 (*_E), and saw no difference,
except two fewer WW lines in the log.
Here are all the files --- only for the last two, I actually had X working.
(For the others, I could not start a terminal, and Samsung1 reported no input,
but I still had to manually ^C the startx.)
http://sqrl.mcmaster.ca/~kahl/Xorg.0.log_Zeh1
http://sqrl.mcmaster.ca/~kahl/xorg.conf_Zeh1
http://sqrl.mcmaster.ca/~kahl/xorg.conf_Zeh2
http://sqrl.mcmaster.ca/~kahl/Xorg.0.log_Zeh2
http://sqrl.mcmaster.ca/~kahl/Xorg.0.log_A
http://sqrl.mcmaster.ca/~kahl/xorg.conf_A
http://sqrl.mcmaster.ca/~kahl/xorg.conf_B
http://sqrl.mcmaster.ca/~kahl/Xorg.0.log_B
http://sqrl.mcmaster.ca/~kahl/Xorg.0.log_C
http://sqrl.mcmaster.ca/~kahl/xorg.conf_C
http://sqrl.mcmaster.ca/~kahl/xorg.conf_D
http://sqrl.mcmaster.ca/~kahl/Xorg.0.log_D
http://sqrl.mcmaster.ca/~kahl/Xorg.0.log_E
http://sqrl.mcmaster.ca/~kahl/xorg.conf_E
With the last two (only difference is Int10), I get:
Xinerama.getScreenInfo result:
Rectangle {rect_x = 2048, rect_y = 0, rect_width = 2048, rect_height = 1200}
Rectangle {rect_x = 0, rect_y = 50, rect_width = 1080, rect_height = 1920}
Same XMonad screen shown (cloned) on Samsung1 and Apple1, size 2048x1200.
Bottom 48 pixel rows missing on Samsung1, not panning.
Apple1 is panning with the mouse.
The mouse never leaves that screen, that is, the cursor is shown simultaneously on
Samsung1 and Apple1, and never reaches AsusV1.
As so far always with Xinerama on:
$ xrandr
RandR extension missing
This might be a driver problem, too.
Usin mod4-e I can move the keyboard focus to AsusV1 (sometimes; it apparently requires
previous mouse movement) so I can start a terminal there.
The mouse still does not move over to AsusV1.
Sometimes keyboard focus randomly switches back to the Samsung/Apple screen.
Switching Xinerama Off got me almost back to where I was before,
except that the mouse still didnt't reach AsusV1:
http://sqrl.mcmaster.ca/~kahl/Xorg.0.log_F
http://sqrl.mcmaster.ca/~kahl/xorg.conf_F
kahl at heraklit ~ $ runhaskell CheckX.hs
Xlib: extension "XINERAMA" missing on display ":0.0".
Xinerama.getScreenInfo result:
Rectangle {rect_x = 0, rect_y = 0, rect_width = 2048, rect_height = 1200}
kahl at heraklit ~ $ xrandr
Screen 0: minimum 320 x 200, current 2048 x 1200, maximum 8192 x 8192
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
DVI-0 connected 1920x1200+0+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*+
...
kahl at heraklit ~ $ xrandr --output DVI-1 --left-of DVI-0
kahl at heraklit ~ $ xrandr
Screen 0: minimum 320 x 200, current 3968 x 1200, maximum 8192 x 8192
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
HDMI-0 disconnected (normal left inverted right x axis y axis)
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*+
...
kahl at heraklit ~ $ runhaskell CheckX.hs
Xlib: extension "XINERAMA" missing on display ":0.0".
Xinerama.getScreenInfo result:
Rectangle {rect_x = 0, rect_y = 0, rect_width = 3968, rect_height = 1200}
kahl at heraklit ~ $ DISPLAY=:0.1 terminal &
[1] 683
kahl at heraklit ~ $ DISPLAY=:0.1 xmonad &
[2] 700
kahl at heraklit ~ $ Xlib: extension "XINERAMA" missing on display ":0.1".
So for work, I am now back to Xinerama Off and only one Radeon1 screen
with only one Readeon1 device with two monitors:
http://sqrl.mcmaster.ca/~kahl/Xorg.0.log_G
http://sqrl.mcmaster.ca/~kahl/xorg.conf_G
On Fri, Jan 06, 2012 at 08:10:48AM -0800, Mike Meyer also wrote:
> > I wanted to say, more precisely, that I consider the output of
> > Graphics.X11.Xinerama.getScreenInfo to be either wrong,
> > or inappropriate for xmonad to base its screen subdivisions on.
>
> Ah, right. yeah, the ghc output is wrong.
>
> The solution seems to be to list the two outputs on the one card as
> different devices, at least according to this:
>
> https://bbs.archlinux.org/viewtopic.php?id=115596
That essentially just gave me the additional hint to try ZaphodHeads:
The only difference is that it starts with a wide Viewport on Apple1 and Samsung1,
with Samsung1 still fixed in the upper left corner and Apple1 still panning,
and the mouse still doesn't reach AsusV1.
http://sqrl.mcmaster.ca/~kahl/Xorg.0.log_H
http://sqrl.mcmaster.ca/~kahl/xorg.conf_H
In CheckX.hs, I currently have:
import qualified Graphics.X11 as X11
import qualified Graphics.X11.Xinerama as Xinerama
main = do
display <- X11.openDisplay []
xineramaScreens <- Xinerama.getScreenInfo display
putStrLn "Xinerama.getScreenInfo result:"
mapM_ (putStrLn . (" " ++) . show) xineramaScreens
I'll put more in once I find out what I can do with X...
Wolfram
More information about the xmonad
mailing list