Staacks / there.oughta.be

Projects featured on my blog at https://there.oughta.be
https://there.oughta.be
GNU General Public License v3.0
99 stars 33 forks source link

eglGetDisplay() returns "* failed to add service - already in use" #8

Closed jjwalter2001 closed 3 years ago

jjwalter2001 commented 3 years ago

This is happening on a rpi4 running in headless mode.

I am able to successfully run the triangle_rpi4 example from https://github.com/matusnovak/rpi-opengl-without-x - where it can initialize EGL get a viewport and generate the output file.

I tried merging some of the display setup code from triangle_rpi4 (so that I'm calling eglGetDisplay() using a gbm_device structure, as he does in triangle_rpi4) - but, I still keep getting that error message from cpu-stats-gl.

Any ideas on what I'm missing or what would be causing that?

Staacks commented 3 years ago

The page you link to clearly says that it will not work in headless mode on the rPi4. You might also want to look at this issue: https://github.com/Staacks/there.oughta.be/issues/4 It digresses a bit, but a user over there posted his version for the rPi4. However, he also could not get it to work in headless mode and switched to a rPi3.

As the issue tracker is not too crowded yet, I will leave this open for now, so others on a rPi4 can find it quickly. However, it seems to be something to be solved at the OS level and it is nothing that can be fixed at the "cube end" of the problem.

jjwalter2001 commented 3 years ago

Appreciate the comments. I saw that on his page, also, but, like I mentioned, the triangle_rpi4 actually does run properly without a screen attached - after modifying the config.txt. Since the triangle_rpi4 example worked headless, I was trying to also get cpu_stats_gl to work the same way.

Oh well - not a huge deal. I have a rpi3 showing up today and will try it with that.