Page 1 of 1

"failed to add service - already in use?" error

Posted: Fri Jul 27, 2012 7:03 am
by Toad King
After the latest firmware update, any time I try to run a program with GLES/OpenVG, I get an error like this:

Code: Select all

3422136784: * failed to add service - already in use?
where the number changes each time. Does anyone know what could be causing this?

Re: "failed to add service - already in use?" error

Posted: Fri Jul 27, 2012 9:54 am
by dom
What memory split are you using?

Re: "failed to add service - already in use?" error

Posted: Fri Jul 27, 2012 4:47 pm
by pwinwood
It happens to me too using 128/128 and 192/64.

uname -a

Linux raspberrypi 3.1.9+ #202 PREMPT Wed Jul 25 22:11:06 BST 2012 armv6l GNU/Linux.

I will try reflashing the sdcard.

Re: "failed to add service - already in use?" error

Posted: Fri Jul 27, 2012 6:21 pm
by pwinwood
I reflashed the sdcard, installed and ran the rpi-update and the same error occurred again running hello_triangle.

Re: "failed to add service - already in use?" error

Posted: Fri Jul 27, 2012 8:16 pm
by Aloshi
Same thing here, also started happening after I updated the firmware yesterday.

Re: "failed to add service - already in use?" error

Posted: Sat Jul 28, 2012 7:57 am
by Oraclemaster
I have the same problem with Quake 3 and some people get this error running XBMC.

Mauro

Re: "failed to add service - already in use?" error

Posted: Sat Jul 28, 2012 9:19 am
by fordexplorer
I can confirm Mauro's statement regarding XBMC.

Ford

Re: "failed to add service - already in use?" error

Posted: Sat Jul 28, 2012 9:34 am
by dom
@all
Have you tried updating today? I think I fixed this late last night.

Re: "failed to add service - already in use?" error

Posted: Sun Jul 29, 2012 7:12 am
by Oraclemaster
Hi dom, after a

sudo apt-get update
sudo apt-get dist-upgrade
sudo rpi-update 192

Reboot

It works.

Thank you.

Mauro

Re: "failed to add service - already in use?" error

Posted: Thu Sep 20, 2012 10:16 am
by jlauha
I started getting this error when I just switched to the new "2012-09-18-wheezy-raspbian" image. I get it e.g. when I compile and try to run the hello_triangle example.

Re: "failed to add service - already in use?" error

Posted: Thu Sep 20, 2012 5:27 pm
by dom
jlauha wrote:I started getting this error when I just switched to the new "2012-09-18-wheezy-raspbian" image. I get it e.g. when I compile and try to run the hello_triangle example.
What memory split are you using?

Re: "failed to add service - already in use?" error

Posted: Thu Sep 20, 2012 5:53 pm
by jlauha
I had it on 240/16 as the previous image worked with that. Also I had tried the rpi-update 192 command instructed in a message above, thinking I had tried it with that as well with no luck. I guess I somehow missed an error message since there is no rpi-update command. :D

Now that I checked & tried again, it works again with the 192 memory split. 224 doesn't work either, although it gives a different, app dependent error message (context creation fails).

Re: "failed to add service - already in use?" error

Posted: Wed Sep 26, 2012 1:32 am
by thogue
Xbian 0.6.3

xbmc would error.

Tried 192, xbmc started but still would not finish loading. Set to 128 seems to be working now.

Re: "failed to add service - already in use?" error

Posted: Mon Nov 13, 2017 3:57 am
by jdonald
I know this thread is more than five years old, but doesn't this problem exist today on Raspbian Jessie and Stretch? There's a Stack Overflow question about exactly this error, and someone pinpointed the vc4-kms-v3d overlay as a partial cause. To answer the earlier troubleshooting question, raising GPU memory to 256 MB on a Pi 3 doesn't help.

Removing dtoverlay=vc4-kms-v3d does make the error go away, but also disables the full OpenGL driver with KMS. This isn't really an acceptable solution.

Given that minecraft-pi still runs regardless of whether the overlay is enabled, it should be possible to make other VideoCore-accelerated programs work consistently as well.

/opt/vc/src/hello_pi/hello_triangle/ and similar examples would ideally be a starting point for integrating VideoCore acceleration into other engines. Does anyone know what source lines to change to make them work regardless?

I know there's the alternative of the Mesa driver with some open-source VC4 acceleration, but it's not as fast yet and packages like Quake 3 still use the VC libs.

Re: "failed to add service - already in use?" error

Posted: Tue Nov 28, 2017 2:21 am
by jdonald
Closing the loop here.

  • When this thread was discussed five years ago the problems were not due to the newer VC4 overlay--because it didn't exist at the time. Users were encountering a combination of bad memory splits and perhaps a now-resolved Raspbian regression. Whereas if someone comes across "failed to add service" today, it's more likely a case of running these older programs with the vc4-kms-v3d overlay enabled.
  • Minecraft Pi Edition works today with Mesa EGL via a wrapper. Raspbian has a script at /usr/bin/minecraft-pi which detects the runtime configuration and if necessary makes use of a modified version of this library: https://github.com/xobs/mcrpi-wrapper
  • Raspbian Quake3 could run with a slightly modified version of that wrapper that implements eglSaneChooseconfigBRCM(). However, given that this program is open-source and built on SDL it's probably more straightforward to remove the dispmanx parts of that codebase altogether. See this thread.
  • The hello_pi examples are not using SDL so would involve more code to set up a window. On Pi Stack Exchange I've posted one approach to run them on Mesa with minimal changes. In theory one could further extend the wrapper to take care of window creation and run an unmodified hello_triangle.bin executable.

Re: "failed to add service - already in use?" error

Posted: Sun Feb 18, 2018 10:50 am
by Azimoth
Adding to this list:
  • Kodi (version 2:17.6-2~stretch) gave me this error today and returning to the "Original non-GL desktop driver" (in contrast to the "OpenGL desktop driver with full/fake KMS") made the error go away