Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

* failed to add service - already in use? #1

Closed
cnlohr opened this issue Jun 16, 2018 · 3 comments
Closed

* failed to add service - already in use? #1

cnlohr opened this issue Jun 16, 2018 · 3 comments

Comments

@cnlohr
Copy link

cnlohr commented Jun 16, 2018

I'm sure it's something with my configuration, but I'm doing my darnedest to figure out what's going on here. If I try to compile my own OGLES-without-X stuff or use this example, this error is all I get when the executable runs. Any ideas of where to go or how to figure things out from here?

* failed to add service - already in use?
@matusnovak
Copy link
Owner

I suspect that something in the background has taken over the EGL. Are you running your Raspberry Pi in headless mode (no desktop, no GUI, no screen, only the terminal)? If you are in desktop mode, try headless, that way the EGL will be available only to you.

Also worth to note, (I might be wrong about this) the Raspberry Pi uses proprietary Open GL drivers (the mesa libraries). If you use the open source ones, the EGL only works with X11 present (you have to be in desktop mode). I would recommend trying to compile and run this on a blank new Raspbian installation.

Also, have a look at this post: https://stackoverflow.com/questions/40490113/eglfs-on-raspberry2-failed-to-add-service-already-in-use and mainly the first comment by the OP:

I finally managed to solve the problem. The eglfs_brcm backend of Qt is using the vchiq device, which is the video core device. That's the same device the vc4-kms-v3d overlay uses when you activate hw-acceleration in your config.txt within /boot. Therefore the mentioned device is already grabbed and you can't use it anymore. The solution is to comment the appropriate line in your config.txt: # dtoverlay=vc4-kms-v3d and your eglfs will work as i described above. Please correct me, if sth is not formulated correctly. I hope i can save you time and grey hairs with that solution.

@cnlohr
Copy link
Author

cnlohr commented Jun 16, 2018

I'm not entirely sure what the difference is between the two. X11 is definitely not running, I am sure of that much.

But it turns out that link is it! If I remove all references to vc4-kms-v3d and vc4-fkms-v3d in my config, your examples seem to work.

Thank you!

@cnlohr cnlohr closed this as completed Jun 16, 2018
@matusnovak matusnovak mentioned this issue Jan 22, 2020
@cwassert
Copy link

I just want to add that I had this error because my video memory was too small. I replaced gpu_mem=16 with gpu_mem=256 in my /boot/config.txt to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants