I am trying to get a library (written by someone else) to run on OpenSuse 12.1; I am not an X developer, but I inherited it and need things to run. The library is tested and runs on FC13, RHEL 5 and SL6 without problems. But it consistently creates deadlocks in X calls on OpenSuse 12.1 The sequence of events is 1. XInitThreads is called 2. The library creates a thread ("XEventThread") and starts executing it. The thread executes a simple loop that repeatedly calls XNextEvent and passes the returned events elsewhere. 3. XEventThread calls XNextEvent 4. XNextEvent blocks waiting for events; it does not return immediately because there are no windows yet 5. XEventThread releases control to the main app thread 6. the main app thread calls XLockScreen 7 the main app thread starts creating windows 8. The first call to X functions, e.g. XCreateSimpleWindow, hangs This is with XSyncrhonize enabled; if it is disabled, a few X calls will succeed, but eventually something will hang forever. On the OSes that work (FC13, ScientificLinux 6) the difference is point 8 - the calls to X never lock, everything proceeds happily. It works with a variety of window managers. Why is there a difference on the OpenSuse, and what can I do about it? I am happy to file a bug report with Novell, too, if this appears to be a bug. I originally asked a version of this question on the general X list (well, it started less clearly defined), and got a suggestion that this may be a thread safety fix missing from OpenSuse XLib. http://lists.freedesktop.org/archives/xorg/2012-June/054726.html I also created a cut-down version of the library (in the attached file) that displays the behaviour. On FC13 and RHEL it creates 3 windows with 3-second intervals between them, and then waits forever. It succeeds every time. On OpenSuse 12.1 it freezes as soon as the thread starts, usually on the first call to XCreateSimpleWindow during the creation of the first window. It is not affected by a window manager - fails for all of them. To compile gcc -O2 -ansi -g -DXGRAFIX -I. -DUNIX -D_cplusplus -D_XOPEN_SOURCE=500 -D_REENTRANT -c -o HGraf.o HGraf.c gcc HGraf.o -lpthread -lm -lX11 -L/usr/X11R6/lib mv a.out HGrafTest to run ./HGrafTest Is this indeed an OpenSuse bug, or am I missing something about the program? Thanks, Myrosia