
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

On Wed, 13 Jun 2007 00:33:10 +1000
Aldo Cortesi
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
#include #include #include #include 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...
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

Thus spake Spencer Janssen (sjanssen@cse.unl.edu):
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
Excellent - that fixed it. I'll just chalk up the frustrating hour I spent staring at the binding definitions as a learning experience... ;) Cheers, Aldo -- Aldo Cortesi aldo@nullcube.com http://www.nullcube.com Mob: 0419 492 863

aldo:
Thus spake Spencer Janssen (sjanssen@cse.unl.edu):
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
Excellent - that fixed it. I'll just chalk up the frustrating hour I spent staring at the binding definitions as a learning experience... ;)
Hehe. This has come up 3 times now, so we'll do something about ensuring ./configure is checked, before Setup.lhs will be happy. Hopefully after 0.3 is released, chasing features in the darcs branch won't be necessary.
Another nullcube guy eh? Is there a xmonad cabal there? ;-) -- Don

Thus spake Donald Bruce Stewart (dons@cse.unsw.edu.au):
Another nullcube guy eh? Is there a xmonad cabal there? ;-)
Hehe - yes, you must be paying Dave pretty well. He's been pestering me to ditch Ion in favour of XMonad for weeks... ;) Cheers, Aldo -- Aldo Cortesi aldo@nullcube.com http://www.nullcube.com Mob: 0419 492 863

Donald Bruce Stewart wrote:
Hopefully after 0.3 is released, chasing features in the darcs branch won't be necessary.
Another nullcube guy eh? Is there a xmonad cabal there? ;-)
lol, I'd say my "xmonad advocacy" is no secret :-)
participants (4)
-
Aldo Cortesi
-
Dave Harrison
-
dons@cse.unsw.edu.au
-
Spencer Janssen