LWJGL example doesn't work under Linux with ATI Radeon 9250 Pro

Hi!

I think a more constructive approach (than only criticizing LWJGL) is to show you some examples of games that don’t work on my machine. I wanted to help another member to write a JNLP file that would allow to install LWJGL. I tried the example game “Space Invaders”:
http://www.lwjgl.org/jnlp/lwjgl-demo.php/examples.spaceinvaders.Game
I heard the sound (when I clicked) but I had only a black screen. I watched the Java console, I saw nothing except: “Use - fullscreen for fullscreen mode”. What can I do to? I get 62 FPS.
I’m under Mandriva Linux 2007, AMD Sempron 2600+, 2 GB DDR, ATI Radeon 9250 Pro with the Xorg driver.

I get this with the demo TestControllers:

[quote]Failed to open device (/dev/input/event1): Failed to open device /dev/input/event1 (13)

Failed to open device (/dev/input/event0): Failed to open device /dev/input/event0 (13)

Linux plugin claims to have found 0 controllers
0 Controllers Found
[/quote]
HWCursorTest works.

KeyboardTest works.

MouseCreationTest works.

MouseTest works.

ALCTest works:

[quote]Default device: ALSA Software on default
Available devices:
0: ALSA Software on default
1: ALSA Software on VIA 8237
2: OSS Software
3: Wave File Writer
DEFAULT_DEVICE_SPECIFIER: ALSA Software on default
DEVICE_SPECIFIER: ALSA Software on default ALSA Software on VIA 8237 OSS Software Wave File Writer
EXTENSIONS: ALC_ENUMERATE_ALL_EXT ALC_ENUMERATION_EXT ALC_EXT_CAPTURE ALC_EXT_EFX
ALC_MAJOR_VERSION: 1
ALC_MINOR_VERSION: 1
Value of ALC_MAJOR_VERSION: 4096
[/quote]
MovingSoundTest works.

OpenALCreationTest works.

PlayTest works.

PlayTestMemory works.

PositionTest works.

SourceLimitTest works:

[quote]Default device: ALSA Software on default
Available devices:
0: ALSA Software on default
1: ALSA Software on VIA 8237
2: OSS Software
3: Wave File Writer
Creating 64 in one go…created 64 sources successfully!
Creating 64 one at a time…created 64 sources successfully!
[/quote]
StressTest works.

FullScreenWindowedTest works.

PbufferTest doesn’t work but it is my fault:

org.lwjgl.LWJGLException: No Pbuffer support
	at org.lwjgl.opengl.LinuxPbufferPeerInfo.nInitHandle(Native Method)
	at org.lwjgl.opengl.LinuxPbufferPeerInfo.<init>(LinuxPbufferPeerInfo.java:52)
	at org.lwjgl.opengl.LinuxDisplay.createPbuffer(LinuxDisplay.java:1116)
	at org.lwjgl.opengl.Pbuffer.createPbuffer(Pbuffer.java:247)
	at org.lwjgl.opengl.Pbuffer.<init>(Pbuffer.java:229)
	at org.lwjgl.opengl.Pbuffer.<init>(Pbuffer.java:200)
	at org.lwjgl.test.opengl.PbufferTest.initialize(PbufferTest.java:99)
	at org.lwjgl.test.opengl.PbufferTest.execute(PbufferTest.java:86)
	at org.lwjgl.test.opengl.PbufferTest.main(PbufferTest.java:397)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.javaws.Launcher.executeApplication(Launcher.java:1293)
	at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1239)
	at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1086)
	at com.sun.javaws.Launcher.run(Launcher.java:105)
	at java.lang.Thread.run(Thread.java:619)

Now my task bar has become strange, the bottom right corner is not displayed correctly :frowning: My desktop too :frowning:

VBOIndexTest works and the previous symptom disappeared :smiley:

VBOTest works.

GLGears doesn’t work, the screen is black and I get this in the console:

[quote]GL_VENDOR: Tungsten Graphics, Inc.
GL_RENDERER: Mesa DRI R200 20060602 AGP 1x x86/MMX+/3DNow!+/SSE TCL
GL_VERSION: 1.3 Mesa 6.5.2

glLoadTransposeMatrixfARB() supported: true
4187 frames in 5.0 seconds = 837.4
3983 frames in 5.0 seconds = 796.6
3773 frames in 4.999 seconds = 754.7509
4538 frames in 5.0 seconds = 907.6
31549 frames in 5.0 seconds = 6309.8
34909 frames in 5.0 seconds = 6981.8
32927 frames in 5.0 seconds = 6585.4
31993 frames in 5.0 seconds = 6398.6
35334 frames in 5.0 seconds = 7066.8
26062 frames in 4.999 seconds = 5213.4424
3811 frames in 4.999 seconds = 762.3525
[/quote]
Systest works:

[quote]==== Test Alert ====
Opening native alert window
---- Test Alert ----

==== Test Debug ====
Debug is not enabled. Please set the org.lwjgl.Sys.debug property to true to enable debugging
Example:
java -Dorg.lwjgl.util.Debug=true …
You will not see any debug output in the following tests.
---- Test Debug ----

==== Test Timer ====
Resolution of timer (ticks per second): 1000
Current time: 1232873537524
Sleeping for 2 seconds, using Thread.sleep()
Current time: 1232873539531
Actually slept for: 2.007 seconds
---- Test Timer ----

==== Test URL ====
Opening a browser window to http://www.lwjgl.org
---- Test URL ----

Contents of clipboard: ‘null’
[/quote]
DisplayTest works but why does it say my graphics card is null??? :

[quote]==== Test Current ====
Info about current:
Graphics card: null, version: null
Resolution: 1280x1024x24@60Hz
---- Test Current ----
==== Test query ====
Retrieving available displaymodes
Found 6 modes
The first 5 are:
400 x 300 x 24 @60Hz
1024 x 768 x 24 @60Hz
800 x 600 x 24 @60Hz
1280 x 1024 x 24 @60Hz
640 x 480 x 24 @60Hz
1280 x 960 x 24 @60Hz
---- Test query ----
==== Test setDisplayMode ====
Retrieving available displaymodes
Looking for 640x480…found!
Changing to mode…done
Resolution: 640x480x24@60Hz
Resetting mode…done
---- Test setDisplayMode ----
==== Test setDisplayConfigurationTest ====
Testing normal setting
Configuration changed, gamma = 1.0 brightness = 0.0 contrast = 1.0
Testing gamma settings
Configuration changed, gamma = 5.0 brightness = 0.0 contrast = 1.0
Configuration changed, gamma = 0.5 brightness = 0.0 contrast = 1.0
Testing brightness settings
Configuration changed, gamma = 1.0 brightness = -1.0 contrast = 1.0
Configuration changed, gamma = 1.0 brightness = -0.5 contrast = 1.0
Configuration changed, gamma = 1.0 brightness = 0.5 contrast = 1.0
Configuration changed, gamma = 1.0 brightness = 1.0 contrast = 1.0
Testing contrast settings
Configuration changed, gamma = 1.0 brightness = 0.0 contrast = 0.0
Configuration changed, gamma = 1.0 brightness = 0.0 contrast = 0.5
Configuration changed, gamma = 1.0 brightness = 0.0 contrast = 10000.0
resetting…done
---- Test setDisplayConfigurationTest ----
[/quote]
WindowCreationTest works but I get this in the console:

[quote]The following keys are available:
ESCAPE: Exit test
ARROW Keys: Move window when in non-fullscreen mode
L: List selectable display modes
0-8: Selection of display modes
F: Toggle fullscreen
SHIFT-F: Toggle fullscreen with Display.destroy()/create() cycle
Found 6 display modes
Problem retrieving mode with 640x480x16@-1
Problem retrieving mode with 640x480x32@-1
Problem retrieving mode with 800x600x16@-1
Problem retrieving mode with 800x600x32@-1
Problem retrieving mode with 1024x768x16@-1
Problem retrieving mode with 1024x768x32@-1
[/quote]
I don’t know why it happens but in AWT, most of my available display modes use BIT_DEPTH_MULTI and REFRESH_RATE_UNKNOWN.

I spent 40 minutes to make these tests, I hope it will help you to drive your API more reliable and now, you cannot accuse me of FUD. As you know, English is not my mother tongue. FUD means Fear Uncertainty and Doubt, doesn’t it?

N.B: Jake 2 LWJGL version works fine on my machine. Therefore, I assume GLGear doesn’t work because of a bug appeared in a LWJGL version younger than the one used in Jake2.

Thanks for the input. Just to make sure - you are using 2.0.1 right?

[quote]Failed to open device (/dev/input/event1): Failed to open device /dev/input/event1 (13)
[/quote]
afaik, this is an issue with JInput which lwjgl uses. I seem to recall it as being an issue with having to be a root user to read /dev/input. Not sure though!
I have always assumed that it was just - like that - on linux, because I have personally never seen a Joystick/Controller API for linux?

[quote]Now my task bar has become strange, the bottom right corner is not displayed correctly :Sad: My desktop too :Sad:
[/quote]
Not sure about that issue - never seen it.
Can this be an issue with KDE/Gnome more so than X ?

[quote]GLGears doesn’t work, the screen is black and I get this in the console:
[/quote]

[quote]GL_VENDOR: Tungsten Graphics, Inc.
GL_RENDERER: Mesa DRI R200 20060602 AGP 1x x86/MMX+/3DNow!+/SSE TCL
GL_VERSION: 1.3 Mesa 6.5.2
[/quote]
This looks a bit strange, it doesn’t seem like you are running in hardware mode?
Please try to pass in -Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true and also -Dorg.lwjgl.util.Debug=true to see if it provides some info?

[quote]DisplayTest works but why does it say my graphics card is null???
[/quote]
I dont think the linux implementation collects information on what graphics card is used. The windows version queries the registry - not sure what one does on linux?

[quote]Problem retrieving mode with 1024x768x32@-1
[/quote]
afaik, this has to do with linux not exposing refresh rates or something like that.

The space invaders demo works perfectly fine here on Suse Linux 10.3, AMD 3000+, Official Nvidia drivers. This sounds like a driver issue have you tried the latest drivers from ati/amd ?

I only used the Java Webstart links, I did not install LWJGL separately.

[quote=“Matzon,post:2,topic:32872”]
I have no joystick, it is not important.

I already showed this bug to princec months ago, maybe he has a fix, maybe it is only a minor problem. It happened for the first time with the game “Cosmic Trip”. I use KDE 3.5. This bug does not appear with games using other OpenGL bindings for Java.

No it is not strange, watch again, “R200” means that it uses the driver for ATI Radeon 8500 to 9500, I’m not surprised. However, I will try to pass your options when I have more time. It would be easier for me if you used the JAR lwjgl-debug.jar in the webstart deployment. If you do it, I can test it immediately. I want to help but I’m extremely busy.

[quote=“Matzon,post:2,topic:32872”]
I don’t know. I hope it has no impact.

[quote=“Matzon,post:2,topic:32872”]
Yes but it should work even though Linux doesn’t expose the refresh rate, shouldn’t it? Getting a black screen is not acceptable.

My graphics card is too old, there is no proprietary official ATI driver for it under Linux. It is not a driver issue on my view. Why does Jake2 under LWJGL work fine but not Space Invaders? Do they use the same LWJGL version? I assume that is not the case.

I am testing it under Debian Etch with the ATI Radeon XPress 200 and I get good performance this time:

[quote]JNLP JREDesc in Component ignored: http://lwjgl.org/jnlp/extension.php
JNLP JREDesc in Component ignored: http://lwjgl.org/jnlp/extension.php
GL_VENDOR: Mesa project: www.mesa3d.org
GL_RENDERER: Mesa GLX Indirect
GL_VERSION: 1.2 (1.5 Mesa 6.5.1)

glLoadTransposeMatrixfARB() supported: true
1075 frames in 4.998 seconds = 215.08603
1082 frames in 4.998 seconds = 216.48659
1089 frames in 4.997 seconds = 217.93076
1065 frames in 4.997 seconds = 213.12787
1101 frames in 5.0 seconds = 220.2
[/quote]
Space invaders works with this chip.

VBOTest fails but it is what I expected. Even TUER has a very low frame rate with this chip and it relies on VBO when available:

[quote]JNLP JREDesc in Component ignored: http://lwjgl.org/jnlp/extension.php
JNLP JREDesc in Component ignored: http://lwjgl.org/jnlp/extension.php
Setting display mode to 640 x 480 x 24 @72Hz
Created display.
Created OpenGL.
Timer resolution: 1000
ARB VBO not supported!
[/quote]
I think I will download the source code of the tests and try to reproduce the bugs locally.

Someone else under Ubuntu with an ATI Radeon HD 4850 has some problems with LWJGL too, I’m going to investigate.

Everything’s ok on Radeon 9250 SE 128VRAM , sempron 2600+ and Linux Suse 10.1 + fglrx 8.28.8 drv.
10.1 still runs on x.org 6.9 which is perfectly good for the FGLRX install.
;D

It is interesting because your configuration is extremely close to mine, you have an ATI Radeon 9250 SE, I have an ATI Radeon 9250 Pro but with another driver. However, if the bug was coming from the driver, I wouldn’t be able to launch any OpenGL softwares and it isn’t the case, I can play with C/C++ games using OpenGL (Open Arena, Alien Arena 2007, Nexuiz, Urban Terror…) and with Java games using JOGL (Jake2, TUER, Wakfu). As I said, LWJGL still works with Jake2 but it relies on another version, not the 2.0.1. Therefore, I consider it is a bug of this version, nothing less.

Edit.: this uses LWJGL and works on my machine: http://xith.org/archive/jws/FirstPersonInputHandlerTest.jnlp

I get this when I do

[quote]java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar: -Djava.library.path=native/linux -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true org.lwjgl.examples.spaceinvaders.Game
[/quote]

[quote]Use -fullscreen for fullscreen mode
Xrandr extension version 1.1
Using Xrandr for display mode switching
XF86VidMode extension version 2.2
Initial mode: 1280 x 1024 x 24 @60Hz
Removed 0 duplicate displaymodes
Available screen modes:
400 x 300 x 24 @60Hz
1024 x 768 x 24 @60Hz
800 x 600 x 24 @60Hz
1280 x 1024 x 24 @60Hz
640 x 480 x 24 @60Hz
1280 x 960 x 24 @60Hz
Sorted display modes:
800 x 600 x 24 @60Hz
1024 x 768 x 24 @60Hz
1280 x 960 x 24 @60Hz
1280 x 1024 x 24 @60Hz
Attempting to set displaymode: 800 x 600 x 24 @60Hz
libGL warning: 3D driver claims to not support visual 0x4b
Pixel format info: r = 8, g = 8, b = 8, a = 8, depth = 24, stencil = 0, sample buffers = 0, samples = 0
getPathFromClassLoader: searching for: openal
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.Launcher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.URLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.security.SecureClassLoader.findLibrary(java.lang.String)
getPathFromClassLoader: searching for: lwjgl
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.Launcher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.URLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.security.SecureClassLoader.findLibrary(java.lang.String)
getPathFromClassLoader: searching for: lwjgl
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.Launcher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.URLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.security.SecureClassLoader.findLibrary(java.lang.String)
getPathFromClassLoader: searching for: lwjgl
Failed to locate findLibrary method: java.lang.NoSuchMethodException: sun.misc.Launcher$AppClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.net.URLClassLoader.findLibrary(java.lang.String)
Failed to locate findLibrary method: java.lang.NoSuchMethodException: java.security.SecureClassLoader.findLibrary(java.lang.String)
Found 9 OpenAL paths
Testing ‘native/linux/libopenal64.so’
Failed to load native/linux/libopenal64.so: Could not load OpenAL library
Testing ‘/home/julien/Desktop/lwjgl-2.0.1/libopenal64.so’
Failed to load /home/julien/Desktop/lwjgl-2.0.1/libopenal64.so: Could not load OpenAL library
Testing ‘libopenal64.so’
Failed to load libopenal64.so: Could not load OpenAL library
Testing ‘native/linux/libopenal.so’
Found OpenAL at ‘native/linux/libopenal.so’
Mode 0: 1280x1024 @60
XF86VidMode extension version 2.2
[/quote]
What more can I do?

The only thing I am concerned about is this:

[quote]Attempting to set displaymode: 800 x 600 x 24 @60Hz
libGL warning: 3D driver claims to not support visual 0x4b
Pixel format info: r = 8, g = 8, b = 8, a = 8, depth = 24, stencil = 0, sample buffers = 0, samples = 0
[/quote]
Is the warning a problem?
Is the pixel format ok for that driver/card? (should depth be lower?).
As mentioned, it could be a driver issue. But as you say the other games work (they may be requesting rgb= 8 & a = 0, depth != 24 - or something like that).

I know you are busy, but it would probably be nice to modify the example to use another pixel format?

Good news!!! It works under LWJGL 2.0.0 alpha but not under 2.0.1. It means that it is a regression. The warning always appears even with games that are working correctly, TUER causes this warning even twice. The pixel format is good. I’m going to investigate.

Edit.: it works with LWJGL 2.0 alpha 1 and LWJGL 2.0 alpha 2 but not with LWJGL 2.0 alpha 3.

It is NOT A DRIVER ISSUE. Other OpenGL games work fine with my driver.

Please give me the change logs. I need to know which changes have been done between LWJGL 2.0 alpha 2 and LWJGL 2.0 alpha 3. I’m going to look at the source code if I find some time. I haven’t found any change logs in the source code.

hmm

[quote]2008-09-17 11:27 spasi

[s]* src/native/windows/context.c: Potential fix for PixelFormat
  choice on ATI cards.[/s]

[/quote]
in http://www.lwjgl.org/changelogs/2.0-changelog.txt

doh - you’re on linux!

http://lwjgl.org/changelog.php

I have no suggestion for the moment. I will try to investigate as soon as possible.

I’m having a poke around in SVN to find out what’s changed… not very successfully I might add… but the only person to have even looked at the relevant bits of code is Elias.

Cas :slight_smile:

Hi!

What do you suggest? I’m going to ask to someone else to check if this bug is reproducible with other graphics cards, I would like to know if it happens only with old ATI graphics cards.

Can someone give me a diff file (I assume it is easy to generate it with SVN but I have forgotten the command to do it) between LWJGL 2.0 alpha 2 and LWJGL 2.0 alpha 3? It would allow me to build LWJGL with each modification and then detect which one causes the bug.

What about 2.0.1? Do all the alphas work, but then they’re broken in 2.0.1?

Cas :slight_smile:

woops sorry, missed that clarification before. I think we’ll have to bug Elias.

Cas :slight_smile:

changes between a2 and a3: svn log -v -r 2961:2991

http://rafb.net/p/yeRtQ339.html

First of all, thank you for the thorough testing of an issue that doesn’t seem to be reproducible for any of us LWJGL devs. If you’re still up for some regression testing, the best bet would be to do a svn checkout and build from that, since svn can help you quickly go through revisions.

I’ve done some digging, and it seems that revision 2961 corresponds to 2.0alpa2 and revision 2990 corresponds to 2.0alpha3. You can see the log for that interval with “svn log -r 2961:2990” and the changes themselves with “svn diff -r 2961:2990”. If you can build and run examples with (e.g. “ant clean && ant runtest -Dtest.mainclass=org.lwjgl.test.opengl.Gears”), you’re quite far. Personnally, I’d bisect through the revision interval like this:

First check that the endpoints are correct:
svn up -r 2961
and verify it does work
svn up -r 2990
and verify it doesn’t work

then pick the middle revision (between 2961 and 2990 ~2976)
svn up -r 2976
and check whether it works or not

If it did work, go for the middle revision between 2976 and 2990, if it didn’t work go for the other half between 2961 and 2976. Keep bisecting until you’ve (hopefully) identified the sinful commit and report back, unless you want to dig into the commit changes themselves.

  • elias