[Xmonad] Xinerama

Spencer Janssen sjanssen at cse.unl.edu
Tue Jun 12 10:40:57 EDT 2007


On Wed, 13 Jun 2007 00:33:10 +1000
Aldo Cortesi <aldo at nullcube.com> wrote:

> 
> Hi folks,
> 
> 
> I'm seeing symptoms similar to the the same Xinerama-related problem
> reported here:
> 
> http://www.haskell.org/pipermail/xmonad/2007-June/000491.html
> 
> In that same thread, Jason Creighton suggested running the following
> test script:
> 
> """
>     import Graphics.X11.Xlib
>     import Graphics.X11.Xinerama
> 
>     main = do
>         d <- openDisplay ""
>         xineramaQueryScreens d >>= print
>         getScreenInfo d >>= print
> """
> 
> On my system, this outputs:
> 
> """
> Nothing
> [Rectangle {rect_x = 0, rect_y = 0, rect_width = 1920, rect_height =
> 1200}] """
> 
> Now the plot thickens. The following snippet of C should be very
> nearly equivalent to the script above:
> 
> """
> #include <X11/X.h>
> #include <X11/Xlib.h>
> #include <X11/extensions/Xinerama.h>
> #include <stdio.h>
> #include <stdlib.h>
> 
> int main (){
>     Display *dpy;
>     XineramaScreenInfo *xsi;
>     int i, num;
>     dpy = XOpenDisplay("\0");
>     printf("%s\n", XDisplayString(dpy));
>     if((xsi = XineramaQueryScreens(dpy, &num))) {
>         printf("%i screens\n", num);
>         for(i = 0; i < num; i++) {
>            printf("%i: %ix%i\n", xsi[i].screen_number, xsi[i].width,
> xsi[i].height); }
>        XFree(xsi);
>     }
>     XCloseDisplay(dpy);
>     return 0;
> }
> """
> 
> However, from this, I get the following output:
> 
> 2 screens
> 0: 1920x1200
> 1: 1280x1024
> 
> As you can see, the Xinerama screens are detected correctly. Xinerama
> under other window managers (e.g. KDE) also seems to work flawlessly
> with the same X configuration. Despite this is being my first real
> foray into Haskell, I bravely ploughed through the appropriate
> bindings in X11-extras and X11-1.2.2, but I could see no obvious
> errors. 
> 
> I have a hunch that the problem is related to the fact that I have an
> NVidia graphics card with TwinView (NVidia's magic sauce that allows
> you to connect multiple screens to the same GPU). Apparently,
> Twinview is known to cause problems with some window managers - see,
> for example, the FAQ section of this page from NVidia:
> 
> http://http.download.nvidia.com/XFree86/Linux-x86/1.0-8178/README/appendix-g.html
> 
> The FAQ entry is pretty vague about exactly what form these
> "problems" might take.  
> 
> I'm keen to give XMonad a try, so I'd be happy to spend time helping
> to troubleshoot this problem...
> 
> 
> 
> 
> 
> Cheers,
> 
> 
> 
> 
> Aldo
> 
> 
> 
> 

Are you running X11-extras from darcs?  If so, did you run 'autoreconf'
before running 'Setup configure'? (this step isn't required if you're
compiling from a release tarball)

Watch X11-extras configure output for:
checking X11/extensions/Xinerama.h usability... yes
checking X11/extensions/Xinerama.h presence... yes
checking for X11/extensions/Xinerama.h... yes


Hope that helps,
Spencer Janssen


More information about the Xmonad mailing list