X11 Fullscreen Issue (Serious)

anonymous wrote on Sunday, March 04, 2012:

Hi,

I’m a new glfw user. I have compiled the latest release on by Linux box and
have been playing around with the examples.

However, neither of the two examples that use fullscreen mode - particles &
pong3d - work correctly.

They both exhibit the exact same problem:

Which is, they change they screen resolution and then seem to exit before
actually drawing anything on the screen, leaving the rest of the X11 system in
the new resolution and therefore pretty much unusable. (I’ve not had any luck
trying to resolve the problem in the Control Centre, so I tend to end up
logging out and logging back in again to sort it out.)

Below I will provide some hopefully helpful system information:

General System Info
glfw version: glfw-2.7.3 (compiled from source)
Linux distro: Ubuntu 11.04 (natty)
Linux kernel: 2.6.38-13-generic
GNOME version: 2.32.1
X11 version: X.Org X Server 1.10.1
Processor: i686
Graphics adapter: ATI Radeon HD 4800 Series

ATI Software Info
Driver Packaging Version: 8.78.3-100920a-105558C-ATI
2D Driver Version: 8.84.60
Catalyst Control Center Version: 2.13
RandR Version: 1.3

OpenGL Info
Provider: ATI
Renderer: ATI Radeon HD 4800 Series
Version: 3.3.10665 Compatibility Profile Context

So does anyone know what’s happening? Is this a known issue?

I hope the above information helps. Please let me know if there’s any more
information that would prove useful in tracking this issue down. And please
also let me know if you’d like me to try compiling and running any modified
code examples if that would be helpful too.

Many thanks,

thoughton.

elmindreda wrote on Sunday, March 04, 2012:

You should be able to restore the video mode using xrandr(1):

xrandr -s 1024x768

Do the examples crash or do they just exit?

Also, what happens if you run the reopen test?

anonymous wrote on Sunday, March 04, 2012:

Hi! Thanks for the quick reply.

Yes that command does restore my previous video mode - thanks very much!
That’s really useful to know.

The examples don’t actually crash or exit. They keep running, but with no
window displayed. Ctrl-C in the terminal they’re executed from stops them
(but the video mode doesn’t change back).

I’m sorry, what do you mean by “run the reopen test”?

If I run the example again after pressing Ctrl-C on the previous attempt,
whilst the video mode is still broken, then I actually do see the graphics of
the example in that instance, but the resolution still does not look right for
the example (strangely).

Strangest of all, on very rare occasions - possibly only after having reset
the video mode using the xrandr command - the example actually runs and
displays correctly, and resets the video mode back upon exit. The only thing
that seems wrong on these (very rare) occasions is that when exiting the
example by pressing Esc, it seems the terminal which was used to execute the
example also gets killed.

Any additional help or advice you might have would be hugely appreciated!

Thanks,

Tom.

elmindreda wrote on Sunday, March 04, 2012:

If you compiled GLFW from source then the test programs in the tests directory
should also have been built. One of these programs is named reopen.

I haven’t heard of anyone else having this problem. Do other fullscreen
applications, games especially, work as intended?

anonymous wrote on Sunday, March 04, 2012:

Correction!

On those rare occasions where everything seems to work fine, it turns out the
terminal isn’t killed when exiting the example after all, what actually
happens is the example exits to a different workspace than the one it was run
from! (Very confusingly.)

Tom.

anonymous wrote on Sunday, March 04, 2012:

Ahha, thanks for pointing me towards the “reopen” test.

The first time I ran it it seemed to work fine (ie. it alternated between a
window and full-screen). Again, the only issue I had was when it cycled from
full-screen back to windowed mode it left me on a different workspace to the
one I started it on.

However, the next time I ran the test it was much less successful - sometimes
it correctly switched to fullscreen mode, but other times it exhibited the
exact same issues as I experienced with those fullscreen examples. It would
switch back to a windowed display properly eventually, but usually after a few
attempts as sometimes the screen would just go black when it attempted to do
so.

Regarding other fullscreen games, I’ve just tried the following and they all
worked perfectly:

Anomaly Warzone Earth
Aquaria
Defcon
EDGE
Jamestown
Osmos (actually the menus were broken on this, but it worked fine earlier!)
World of Goo

Thanks,

Tom.

elmindreda wrote on Sunday, March 04, 2012:

I would very much like to see the config.log file from the root directory of
the GLFW source tree. Also, do you have the xorg-dev package installed?

anonymous wrote on Sunday, March 04, 2012:

Ok, here’s the config.log:

This file contains any messages produced by compilers while
running ./compile.sh, to aid debugging if ./compile.sh makes a mistake.
./compile.sh: checking whether we are using GNU C
./compile.sh: cc -E conftest.c
./compile.sh: Checking for X11 RandR support
./compile.sh: cc -c  conftest.c 1>&5
./compile.sh: Checking for pthread support
./compile.sh: cc -o conftest  -pthread conftest.c  -lGL -pthread 1>&5
./compile.sh: Checking for sched_yield
./compile.sh: cc -c  -pthread conftest.c 1>&5
./compile.sh: Checking for clock_gettime
./compile.sh: cc -o conftest  -pthread conftest.c  -lGL -pthread 1>&5
./compile.sh: Checking for glXGetProcAddress variants
./compile.sh: cc -o conftest  -pthread conftest.c  -lGL -pthread 1>&5
./compile.sh: Checking for sysconf
./compile.sh: cc -o conftest  -pthread conftest.c  -lGL -pthread 1>&5
./compile.sh: Checking for sysctl support
./compile.sh: cc -E conftest.c
./compile.sh: Creating ./lib/x11/Makefile.x11
./compile.sh: Creating ./examples/Makefile.x11
./compile.sh: Creating ./tests/Makefile.x11
./compile.sh: Creating ./lib/x11/libglfw.pc.in

I checked in Synaptic Package Manager and I do not have "xorg-dev"
installed.

elmindreda wrote on Sunday, March 04, 2012:

If you install the xorg-dev package and rebuild like this:

make x11-dist-clean
make x11

Does it work any better?

anonymous wrote on Sunday, March 04, 2012:

I tried it but it didn’t make any difference unfortunately.

elmindreda wrote on Sunday, March 04, 2012:

I don’t know what could be wrong, then.

anonymous wrote on Sunday, March 04, 2012:

Oh ok, thanks very much for helping anyway! It’s much appreciated.

Do you know how I could get this registered as an “official” bug so it could
be looked into further?

Thanks again,

Tom.

elmindreda wrote on Sunday, March 04, 2012:

Right here on SF.net. Select the GLFW bug tracker in the menu above.

anonymous wrote on Sunday, March 04, 2012:

Thanks, I’ve logged a bug here: [https://sourceforge.net/tracker/?func=detail&
aid=3496867&group_id=72569&atid=534938](https://sourceforge.net/tracker/?func
=detail&aid=3496867&group_id=72569&atid=534938)