Login  Register

Re: Poor performances on Linux Ubuntu unless desktop effects are disabled

Posted by riccaricca68 on Jul 27, 2014; 11:34am
URL: https://forum.jogamp.org/Poor-performances-on-Linux-Ubuntu-unless-desktop-effects-are-disabled-tp4032647p4032662.html

Hi Julien,

thank you so much for your quick and detailed reply. I was not intended to ask help for older versions of Java3D, I only referred them just to explain what has changed, and what has not, with the newer version.

The hardware I'm using now is:

- Intel Core 2 Duo E7400 2.80GHz
- GPU NVIDIA GeForce GTS 450
- Display Samsung Syncmaster 1920x1080 60Hz
- 4GB RAM
- Mother board MSI G41M-P33, same behavior with previous ASUS P5N73-CM

The software details are reported below.

$ uname -a
Linux ubuntu-1204 3.2.0-67-generic #101-Ubuntu SMP Tue Jul 15 17:46:11 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

$ glxinfo | grep "OpenGL version"
OpenGL version string: 4.2.0 NVIDIA 304.116

$ unity --version
unity 5.20.0

$ java -version
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

The glxgears application seems behaving like the Java3D applications: when V-sync is ON in an Ubuntu 3D session, I can see that the borders of the wheels are not clear, but they are vibrating. It's like if a V-sync could not be realized, the frame rate is exactly 60Hz but the animation is not good. On the contrary, in Ubuntu 2D or "Gnome Classic - No effects" sessions (available through the package gnome-session-fallback) the animations are perfectly smooth with V-sync activated. When I set V-sync OFF I get quite good results both in Ubuntu 3D and Ubuntu 2D / gnome classic sessions. Without resizing the window, the frame rates of the glxgears application are summarized below:

Ubuntu 3D: 9000 FPS
Ubuntu 2D: 4500 FPS (but better animation)
Gnome Classic - No effects: 17000 FPS

Regarding the Java3D / JOGL sample application, I chose a simple rotating cube application that you can find here.

I chose this sample because it is a very regular motion and any defects can be easily detected by our eye. We can observe the borders of the color cube and it's very easy to notice the enormous differences of quality and smoothness among the different environments and settings. The results of the comparation are the following:

Ubuntu 3D, V-Sync ON: very poor.
Ubuntu 3D, V-Sync OFF: just acceptable.
Ubuntu 2D, V-Sync OFF: quite good.
Ubuntu 2D, V-Sync ON: good.
Gnome Classic - NO effects, V-Sync OFF: good.
Gnome Classic - NO effects, V-Sync ON: very good.

Unfortunately, examining the frame rates of all these cases does not tell us anything because they are good in each case: when V-Sync is ON, the frame rate is always 60Hz without gaps, and whan V-Sync is OFF it is always very high. I measured the FPS extending the RotationInterpolator class, I don't know if there is a better way to do this.

Of course, the more the application is complex and/or the window size is large, the more the defects of the animation are noticeable. Maybe these problems could be tolerated in a very simple application like glxgears or the rotating cube, but in more complex scenes the resulting smoothness and quality are not so good, or even poor, on Ubuntu 3D.

Regarding the links you posted please read the comments below.

1) http://ubuntuforums.org/showthread.php?t=2002029

This seems not related to my problem. The post speaks of a FPS of 2.5 while I have a very high frame rate on Ubuntu 3D.
Rather, my problem seems dealing with this: http://forum.jogamp.org/V-SYNC-causes-choppy-animations-td4029992.html.

2) http://askubuntu.com/questions/68379/slow-and-laggy-animations

I tried all the suggested options in the Compiz Config Settings manager, but without any improvement. On the contrary, the smoothness has worsened and I came back to the default settings.

3) http://www.phoronix.com/scan.php?page=article&item=ubuntu_unity_512&num=1

As you can see from my software details, I have Unity 5.20 and I still have problems.

Regarding the JOGL logs: I activated them in the sample application (through the settings -Dnewt.debug=all -Dnativewindow.debug=all -Djogl.debug=all) but I obtain a lot of information that I cannot understand. Most of the logs are identical for the different options / environments, and I don't know what to look for. If you think they could be useful I can attach them.

Regarding Windows: I use the updated manufacturer's drivers. When you speak of disabling Direct3D pipeline, what do you mean? Is it not sufficient to set the j3d.rend property to ogl or jogl?

I hope that all those details help you to better understand what could be the issue.
Thank you again and best regards,
Riccardo.