The Bard's Tale

The Bard's Tale

View Stats:
DrMcCoy Oct 15, 2013 @ 2:56pm
Xlib: extension "XINERAMA" missing on display ":0.0".
The Bard's Tale doesn't start for me on Debian GNU/Linux.

The error message is:
Xlib: extension "XINERAMA" missing on display ":0.0".

Yes, I do have two monitors, but they're two separate X screens, so of course there's no Xinerama. Why would the game even care about that?
< >
Showing 1-9 of 9 comments
NoXPhasma Oct 15, 2013 @ 11:18pm 
Me too, WTH!
Keyran Oct 16, 2013 @ 8:42am 
I have the same problem on Archlinux, x64.

Xlib: extension "XINERAMA" missing on display ":0".
[1] 10985 segmentation fault (core dumped) ./BardTale
DrMcCoy Oct 16, 2013 @ 12:49pm 
Well, it turns out that the only Xinerma function The Bard's Tale calls is XineramaQueryScreens(). It returns 0 (and sets *number to 0) if Xinerama is not available, but the BardTale doesn't check that (it also doesn't call XFree() on the pointer).

So, a simple LD_PRELOAD hack can fix that pretty easily:

#define _GNU_SOURCE 1 #include <stdio.h> #include <stdlib.h> #include <dlfcn.h> #include <X11/extensions/Xinerama.h> XineramaScreenInfo *XineramaQueryScreens(Display *dpy, int *number) { XineramaScreenInfo *(*orig_query)(Display *, int *) = dlsym(RTLD_NEXT, "XineramaQueryScreens"); XineramaScreenInfo *orig_screens = orig_query(dpy, number); if (orig_screens) return orig_screens; printf("No Xinerama available, engaging fallback.\n"); Screen *screen = XDefaultScreenOfDisplay(dpy); if (!screen) { printf("Can't get a normal X screen either. Terminating.\n"); exit(-1); } XineramaScreenInfo *fake_screen = malloc(sizeof(XineramaScreenInfo)); fake_screen->screen_number = 0; fake_screen->x_org = 0; fake_screen->y_org = 0; fake_screen->width = screen->width; fake_screen->height = screen->height; *number = 1; return fake_screen; }

Compile with
gcc -Wall -shared -m32 -fPIC -o noxinerama.so noxinerama.c -ldl

Put it into the The Bard's Tale directory and call the binary with

LD_PRELOAD=./noxinerama.so ./BardTale

BAM, works.
Last edited by DrMcCoy; Oct 16, 2013 @ 12:50pm
DrMcCoy Oct 16, 2013 @ 12:59pm 
And for the lazy:

http://drmccoy.de/bardstale/noxinerama.c
http://drmccoy.de/bardstale/Makefile

And the precompiled thing:

http://drmccoy.de/bardstale/noxinerama.so

And small startup script:

http://drmccoy.de/bardstale/BardTale

(Rename the original BardTale binary to BardTale.orig, but the script in BardTale's place and put noxinerama.so in the same directory; and the game should even work from within steam)
NoXPhasma Oct 19, 2013 @ 11:53am 
Thanks for your hack! BTW I was unable to compile your sourcecode, I get some errors:
$ gcc -Wall -shared -m32 -fPIC -o noxinerama.so noxinerama.c -ldl In file included from /usr/include/stdio.h:28:0, from noxinerama.c:2: /usr/include/features.h:324:26: schwerwiegender Fehler: bits/predefs.h: Datei oder Verzeichnis nicht gefunden Kompilierung beendet.

But with your linked so file it works fine!
Last edited by NoXPhasma; Oct 19, 2013 @ 11:54am
DrMcCoy Oct 19, 2013 @ 12:14pm 
Hmm, bits/predefs.h is a system include, it should come with the dev package for the (e)glibc. On my Debian system here, that would be libc6-dev (and libc6-dev:i386 for the 32bit version; they are identical though and the only difference is where they are installed).
NoXPhasma Oct 19, 2013 @ 4:36pm 
The problem is solved, installing libc6-dev-i386 did the trick, thanks.
step_jac  [developer] Nov 12, 2013 @ 9:25pm 
This workaround should no longer be required as this has been fixed upstream. Our apologies for this oversight.
DrMcCoy Nov 13, 2013 @ 11:38am 
Thanks :)
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Oct 15, 2013 @ 2:56pm
Posts: 9