Performance issues with RPi4

Hi! First post from a long time lurker. Been doing Processing stuff for years, and finally decided to join the forum too. Could anyone help me with something. I’m not sure if this is a Processing issue or Raspberry pi issue, but i’ll ask here as this seems to be specific to Processing, and someone here might have same issues.

I have some problems getting consistent smooth fps on Raspberry pi 4 with Processing sketches.

The pi 4 definitely has power to run graphics, like some 3d stuff, that would not run as well on the pi 3, but for some reason the fps is unsteady. It fluctuates between around 10 to 50 very randomly sometimes, which the pi 3 didn’t do at all, despite performing overall a bit worse, like expected.

I’ve tried a lot of things to fix it in the raspberry pi configs and in the processing code. I dont think the problem is my bad code, because this seems to happen in very simple test sketches also.
Googling around reveals it might have to do something with the opengl stuff. There seems to be other similar reports, with advice to check some gpu related stuff. The sketch runs more consistetly on the default rendeder and the problems happen on using P2D or P3D. I have to use then as i’m doing 3d stuff, and i want to utilize the gpu anyway for overall performance.

I’m running Processing 3 on 64 bit Raspberry pi OS, with Pi 4 8gb. I’d like to use Processing 4 but it crashes after running a while, which i’m hoping to get a fix on a next release. However using the version 4 does not seem to fix the issue either, looking at it as long as it runs before crashing.

Anyone else having similar issues? I saw some discussion at the Processing forums about this, but the threads are old and do not give solutions. Any ideas or help would be greatly appreciated!

Ok, seems like i got the problem fixed.
I installed the brand new Processing 4.0.1

I immediately faced java-related problems running it, so i googled around and found a troubleshooting page i hadn’t ever seen before for some reason, where it was advised to completely replace the java directory inside the Processing folder.

So i updated to openjdk 17, replaced the Processing java folder with it, and like magic, working sketches with steady, smooth as butter 50fps graphics.

Hi Fossa, thanks for this information. I will try it. Have problems only when the pi4 is running in headless mode with a ssh connection with a laptop.
can you please send a link to the troubleshooting page you mentioned?

Argh, i cannot remember the troubleshoot page anymore :confused:
I’ll try to remember to come back here if i bump into it. I’m having yet again some more problems with pi 4, now with video.