Staacks / there.oughta.be

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

* failed to add service - already in use? - need help #17

Closed jf-simon closed 3 years ago

jf-simon commented 3 years ago

Hi, first thanks for this create project. i compiled the code and get following massage when i try to run it. * failed to add service - already in use? i tried to fix it search the web, but had no success. i'm running a rpi4 B. i have a other project running with rpi-rgb-led-matrix so this works.

looking forward for help :)

Greetings Simon

Staacks commented 3 years ago

It seems like this not a problem with the rpi-rgb-led-matrix but with headless OpenGL on the Raspberry Pi 4. There has been someone else with that issue (https://github.com/Staacks/there.oughta.be/issues/8), but he simply solved it by using an rPi3 instead. Interestingly, I mentioned in the other issue that the rpi-opengl-without-x guy said that it would not work on an rPi4 in headless mode, but this seems to have been updated in December: https://github.com/matusnovak/rpi-opengl-without-x

But: On the rpi-opengl-without-x (near the bottom), there is also a reference to this error with a suggestion. Did you try that? It also references this issue with some input: https://github.com/matusnovak/rpi-opengl-without-x/issues/1

jf-simon commented 3 years ago

Thanks for your answer. I looked at https://github.com/matusnovak/rpi-opengl-without-x and i can successfully build and run it with the suggestions there.

pi@raspberrypi:~/CODE/rpi-opengl-without-x $ sudo ./triangle_rpi4 resolution: 1024x768 Initialized EGL version: 1.4 GL Viewport size: 1024x768

i had to run it with sudo the output.png is created.

But * failed to add service - already in use? still happens running ./cpu-stats-gl even using sudo

alberto-grande commented 3 years ago

For me , in a raspi2, the problem was to setup de GPU memory to the minimum. Setting it to the default value fixed the issue.

jf-simon commented 3 years ago

Thanks for the info. But setting gpu memory to default didn't helped

LowKnee commented 3 years ago

It runs on a RasPi2 and RasPi3. I tested it with a fresh install including X and a connected Display on a RasPi4 but it does not work. I also applied the /boot/config.txt changes without getting it running. I tried the RasPi4 cpp code from #4 but run into the problem that according the xf86drm error it seems that the mesa/gbm maybe acc. https://github.com/matusnovak/rpi-opengl-without-x has to be installed... maybe I try this later, maybe. The problem mentioned in #4 with "a display installed" and "portability" could be solved by using a HDMI headless emulator dongle, which I also have. Maybe I try this later, maybe.

LowKnee commented 3 years ago

Got it working, see #4

Staacks commented 3 years ago

Interesting, so having an actual device present at the HDMI port plays a role on the rPi4 after all. Still confused that the triangle example works, but the cube does not. Since I do not have a spare rPi4 (mine runs the house and my family would file a lot of bug reports if I removed it), I cannot test much, but if you want to find out more on this issue, it might be worth bringing this up in https://github.com/matusnovak/rpi-opengl-without-x/issues/11. Maybe they have more input over there as my knowledge ends here.

As it is working now, I will close the issue.