JOGL on Linux (Fedora 9) very very slow???

Hi,

sorry if this a known issue, I’ve been looking around and I didn’t find info about this…

I was using JOGL with Eclipse on Windows and it worked fine, but I don’t want to use the corporate installation for private things so I installed Fedora 9 aiming to use Linux for developing. The first thing I did was to go to JOGL Demos page and try the Gears demo and it’s incredible slow, about 0.5 fps… I was completely disappointed… Can someone give me a hint of what’s happening?

If I run glxgears (I suppose this demo it’s done with C, accessing to native OpenGL libraries) from command line, the Gears demo running pretty smooth, but I get this output:
Failed to initialize TTM buffer manager. Falling back to classic.
3645 frames in 5.0 seconds = 728.933 FPS

Any help will be deeply appreciated!!!

Pedro

I wish I was able to help, but so far I haven’t been able to install the (fglrx) ATI driver on Fedora 9 sigh

Hi,

well, this is something frustrating, I’ve been spending a lot of time looking around and nothing…

I’ve installed the JRE from Sun instead of the Open one that comes with Fedora 9, but nothing changed. I don’t know, but may be it’s something related with the driver or the X configuration (Intel 945GM on a Dell laptop). The funny thing is that other demos, as the “infinite shadows” (or something like this) work quite smooth, the model moves pretty fast when dragging with the mouse, but the gears demo (that should be faster) is terrible slow… I’m completely lost, because glxinfo output says that everything should be OK. Other demos, as the “JOGL & Swing interoperability demo” work even worse, in this case, if you launch the Gears demos the window appears, it states around 8 fps but the gears are not painted.

I have to look more at this, but it seems something is wrong with Java painting on my Linux config, because other applets seem to produce a lot of flickering.

I’ll keep fighting, because I’d like to be able to use Linux for developing.

Thanks and I hope someone can make me “to see the light”.

Regards,
Pedro

Hi again,

I’m still fighting with this issue…

I tried to run the Gears demo from Eclipse, compiling it with the last JOGL release and I get this output in the console:

INIT GL IS: com.sun.opengl.impl.GLImpl
Chosen GLCapabilities: GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 8, Red: 8, Green: 8, Blue: 8, Alpha: 8, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false ]
GL_VENDOR: Tungsten Graphics, Inc
GL_RENDERER: Mesa DRI Intel® 945GM 20061102 x86/MMX/SSE2
GL_VERSION: 1.4 Mesa 7.1
do_wait: drmWaitVBlank returned -1, IRQs don’t seem to be working correctly.
Try running with LIBGL_THROTTLE_REFRESH and LIBL_SYNC_REFRESH unset.

The demo runs as slow as with the WebStart version in de JOGL website, but after looking for this in Google it seems that it could be a problem with the driver, but I didn’t find the solution yet. I know that this is not a Linux support forum, but if someone here has experience on this I’d appreciate your help.

Thanks,
Pedro

There is a lot of problems with Intel chips even under Windows. If I were you, I would try to find another graphics card if possible, don’t count on better driver, Intel is not serious at all on my view. Some of their chips pretend to be “OpenGL 1.5 compatible” but that’s not completely true.

Well, I’d be happy enough if I can make it wok at least as slow as it is on Windows, I hope I can find some “tuning” to avoid these problems because it’s a laptop and changing the graphics card is not possible for the moment.

Regards,
Pedro

Hi,

I installed the DriConf package and now I can tune some parameters… disabling the vsync now the gears demo runs quite smooth (and now it doesn’t appear the error message quoted above), but the Swing integration seems not to work. The JGears demo states around 20 fps but the gears are not shown, and in my own developments no 3D objects are shown neither.

Any hint?

Thanks!
Pedro

What do you call the “Swing integration”? I don’t know JGears.

Hi,

I mean “Swing Integration” when you use a GLJPanel as canvas in order to use JOGL inside a Swing GUI. You can find JGears inside the JRefract demo, and it’s in the jogl-demos.jar.

I’m using these RT parameters: -Djava.library.path=/home/pedro/workspace/lib-jogl -Dsun.java2d.opengl=True

I’ve tried also -Dsun.java2d.opengl.fbobject=false, but nothing changes

What I’ve seen is that enabling debugging (True instead true for sun.java2d.opengl), the output in console is:

Could not enable OpenGL pipeline for default config on screen 0
INIT GL IS: com.sun.opengl.impl.GLImpl
Chosen GLCapabilities: GLCapabilities [DoubleBuffered: false, Stereo: false, HardwareAccelerated: true, DepthBits: 0, StencilBits: 0, Red: 8, Green: 8, Blue: 8, Alpha: 8, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false ]
GL_VENDOR: Tungsten Graphics, Inc
GL_RENDERER: Mesa DRI Intel® 945GM 20061102 x86/MMX/SSE2
GL_VERSION: 1.4 Mesa 7.1

Regards,
Pedro

Do you have the same problem with GLCanvas?

Nop. GLCanvas works fine, the problem comes with Swing integration. Before adjusting the DRI configuration to disable the VSync problem nothing was working, but now my problems are “only” with Swing.

I’ve tried my developments in a Mac and it works fine with no changes, but Linux is being a nightmare (due to my lack of knowledge, of course).

Thanks,
Pedro

you can’t rely on -Dsun.java2d.opengl=true on linux. The OpenGL pipeline is unstable and does not work with hardware accelerated Desktop enabled (ubuntu, mandriva… have all compiz enabled by default).
It is even buggy on my Geforce 7 with latest (proprietary) drivers and compiz disabled. I found that OpenJDK 7 runs best with OpenGL pipeline (but still not reliable) since this is the JDK with the most community contributions and GTK bugfixes which are not yet backported to OpenJDK 6 or the Update 10 branch.

Have you tried to install newest Intel drivers? Maybe you can even get rid of the Mesa renderer if you get full hardware acceleration through intel drivers. But as gouessej already said intel is known to have weak drivers and OpenGL support.

Hi,

thanks for this info.

I think I’m losing this war… I tried to look for new drivers, but for the moment I found nothing. Fedora 9 is quite new and it’s supposed to come with last version. I’ll keep looking for…

I’ve tried a lot of xorg.conf options and now other applications, as Google Earth render fine, but terribly slow. My only problems are with Swing integration… and this is key for the application I’m doing, I’m afraid I’ll have to come back to Windows to do it, because it was working there.

I’d like to try OpenJDK 7 but Fedora 9 comes with OpenJDK 6 and doesn’t provide the packages, so I’ve to find how to get this working too…

Regards,
Pedro