Loading...
Logo
Processing Forum
When I run sketches full screen my frame rate drops down to like 10 fps when I am using Ubuntu.  However in Windows it doesn't seem to put much pressure on the computer at all.  

Is this something that I'm going to just have to live with and accept that running Processing in Ubuntu is significantly less efficient than running it in Windows?  Or is this an error and shouldn't be happening?

Anyway, if anyone knows of something that I may be doing or a fix, I would love to hear it.  So yeah let me know!  

Thanks,
Karl

Replies(8)

My guess is that you are not using manufacturers graphics drivers, but using mesa drivers, see what you get when you type 
Copy code
  1. glxinfo|grep glx 
in a terminal.  This what I get:-

server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:


hi, sorry for intruding
i got similar problem
i tried the glxinfo|grep glx command

(~) % glxinfo|grep glx                                         
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
client glx vendor string: SGI
client glx version string: 1.4
client glx extensions:
(~) %                                                          

so what does it all means? do i use manufacturers drivers or mesa?

I ran that line of code and got the same thing:

server glx vendor string: NVIDIA Corporation
server glx version string: 1.4
server glx extensions:
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4
client glx extensions:

Does this means that I'm using manufacture drivers?

Btw, thanks for the reply!  

-Karl
I had noticed that as well on another linux distro (slax) and the following solved it. Export your sketch to an application, open the file that launches your sketch and add the following argument to the java command:

-Dsun.java2d.opengl=True


This tells java to use gl acceleration. My understanding is that this happens automatically on other platforms. I'm not sure how to implement this fix for running sketches directly from within the IDE, though.
First off thanks for the help!

Secondly, unfortunately I exported my sketch to an application but the application didn't even start.  This isn't horrible, as I'm sure others can run my application even if I can't, but its still annoying.  

Anyway I added the line of code just in case but it still didn't work.  But I'm not too worried about this because I can always just upload my exports assuming they worked.

But this brings up a possibility.  Is it possible that the java that comes with processing is to blame?  If so how would I use my jdk that is installed on my system in place of that java?  I read tutorials about "linking" your java jdk Bin folder to the folder that Processing java folder but it didn't seem to do anything.  Is there any way to know if you linked something correctly?

Sorry for all the trouble,
Karl
Drivers are OK, next likely culprit is conflicting eye-candy. Try turning down/off fancy desktop features (rotating desktop etc). Actually it could be the java your system is using, processing doesn't like openjdk. Note the jdk that comes with processing is 32 bit, if  you are using a 64 bit distro you want to install 64 bit jdk from oracle (previously sun).

 I read tutorials about "linking" your java jdk Bin folder to the folder that Processing java folder but it didn't seem to do anything.  Is there any way to know if you linked something correctly?
did you delete the java folder inside processing first?

check this thread https://forum.processing.org/topic/gsvideo-question

monkstone
are you in 64bit linux? you delete the java folder in processing and link it to your native jdk folder?

Following the instructions on your link  https://forum.processing.org/topic/gsvideo-question greatly improved speed however it still lags quite a bit.  It went from about 5FPS to 10-15 FPS which is honestly an amazing improvement so thanks.  

However, I didn't understand this part of the instructions given by  daedalus12 :


Replace links in the OpenGL libraries as well.
Copy code
  1. cd modes/java/libraries/opengl/library/linux64      (thanks mrfidget for the correction)
  2. rm libgluegen-rt.so libjogl_awt.so libjogl.so
  3. ln -s /usr/lib/jni/libgluegen-rt.so
  4. ln -s /usr/lib/jni/libjogl_awt.so
  5. ln -s /usr/lib/jni/libjogl.so
 

When I navigate into that directory and use the "ls" command I only have the files:
Copy code
  1. libjogl_desktop.so               libjogl_es2.so                          libnativewindow_x11.so
  2. libjogl_es1.so                     libnativewindow_awt.so            libnewt.so     
I don't have the ones that he wants me to get rid of.  Not sure why.  What should I do?   


But also, thanks for all the help people!  I would have no chance of getting processing to really work on Ubuntu without you!  :D
-Karl