-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Trying to build ProjectM on Raspberry Pi 3 #115
Comments
I've also now tried rebuilding SDL from the repo (2.0.9) using:
and rebuilding projectM-SDL (just to be sure) but the errors and output are the same. |
Okay, looks like Projectm-SDL wants to use X11. This SDL configuration: ./configure --disable-pulseaudio --disable-esd --disable-video-mir --disable gives me a somewhat more productive output:
I still do not have any graphics appearing on the screen, but at least we're not crashing right away. |
Hm, some more monkeying with the setup (I needed some audio loopback magic) and there are visuals appearing now. The frame rate is not good, though. I guess that's ... next... |
Oh hey that’s awesome! I couldn’t get it fully running on my pi because of the shader compilation issues, but I only got GL ES 1.0 for shader Lang. I wonder how you got the 3.0 |
Are you running a pretty recent version of raspbian? (The frame rate is very low, and ProjectMSDL is using ~300% cpu [based on top]) |
I think it was recent.. maybe I need to build SDL from source or something. Need to deal with systems with no audio input too. |
Please apply this patch for shader compilation issue |
@revmischa I built SDL from source, on the pi. I used the instructions here: https://choccyhobnob.com/raspberry-pi/sdl2-2-0-8-on-raspberry-pi/ There are also a bunch of SDL test tools in that tree which were helpful in diagnosing if SDL was working and other related issues. (For example there is a tool that shows audio devices.) It turns out that there is a SDL environment variable, SDL_AUDIODRIVER (list here: https://www.libsdl.org/release/SDL-1.2.15/docs/html/sdlenvvars.html) that can be set to "dummy" which might be the same as "no audio input" (at least for testing)? I will try running without X, with wayland, and the GPU presets in the next few days... |
Okay thanks! The SDL version should just do something besides segfault if you don't have any audio input devices. I'm pretty excited to see how it goes with the raspi. I think maybe turning down your resolution and/or settings (the mesh width/height in the config) might make it go nicer, particularly with shader-based presets. I'll have to give this a go with @deltaoscarmike's patch some time soon. |
oh one thing I might have forgotten to mention, you will need to make sure your LD_LIBRARY_PATH has this in it: I guess that is where the vc4 drivers/libraries are kept. btw, without X loaded we go back to the original error state of: This might mean that some coding is needed to tell ProjectMSDL to run full screen SDL in GLES mode? The SDL example tools will run. Although interestingly (and I'm about to track this down) the SDL/test/testshader program reports "Shaders not supported!" when X isn't running... |
You can run full-screen SDL, don't think GLES has anything to do with it. It works on osx for me. GL_VERSION: (null) - I believe means we can't get an appropriate openGL context. Nothing will work if that's the case. |
I'm not sure if this is the exact current state of rpi with video drivers, but it does seem to explain the relationship between X & OpenGL on the platform... https://www.raspberrypi.org/forums/viewtopic.php?t=192017 ... maybe I'm reading it incorrectly but it seems like I must always use the VC4 video driver overlay in order to get OpenGL. I guess that I assumed that the "--enable-gles" in the projectM configuration stanza used GLES instead of OpenGL. Is that true? or is it that it uses GLES and OpenGL? |
This: https://discourse.libsdl.org/t/problems-using-sdl2-on-raspberry-pi-without-x11-running/22621/29 |
So I'm trying this in SDL now, based on this: https://discourse.libsdl.org/t/can-we-now-use-sdl2-without-x11/23421 the SDL build line is:
after building and installing SDL and the test code, much of the test software works. In particular
This results in a full screen shaded cube. unfortunately with projectMSDL I still get:
Seems like there then must be something different about how ProjectM-SDL is trying to launch versus the example code? Here's a link to that file in the SDL repo: https://hg.libsdl.org/SDL/file/0789a425e8d7/test/testgl2.c |
Heh, this is interesting. testgles was trying to load libraries called libGLESv1_CM.so.1 and libGLES_CM.so.1, neither of which seemed to exist on the system. testgles2 was trying to load libGLESv2.so.2 which didn't exist on the system. So, time for some symbolic links:
After doing this, testgles2 works as expected. testgles gives an "* failed to add service - already in use?" error, searching implies that this may be related to the full OpenGL overlay driver. (So we're gonna leave that alone for now.) Here's the output of testgles2:
I've applied the patch above to the ProjectM-SDL source and rebuilt. We also get further than before, so those symbolic links might have somehow mattered to this code as well? at this moment, running ProjectMSDL results in:
Unfortunately the screen is black. Any thoughts on next things to try? thanks! |
Okay, that looks more like what I was getting on my pi. projectMSDL is asking for a particular version (so the shader compilation works). if the shaders can be made to work with "1.00 ES" then it could run on that driver I believe. In projectM_SDL_main.cpp there is
and it may need adjusting. |
The Pi should support openGL ES 2.0 see this
|
Even though it says |
I'm thinking that there's some issue on debian jessie rpi where we have 3 different video drivers:
The two OpenGL drivers (vc4-kms-v3d, vc4-fkms-v3d) when used with the KMSDRM driver in SDL seem to result in this:
You can't use the KMSDRM driver in SDL without using the vc4 drivers. Next test:
I recompiled SDL to not use kmsdrm and to use rpi-video:
output of the (hopefully relevant) SDL test programs: So in this state, there does not appear to be any OpenGL available:
But GLES and GLES2 work:
@deltaoscarmike: the code you link to does compile and run in this system setup:
but unfortunately in this state, ProjectMSDL is like this:
|
Using the latest firmware and GL drivers that I'm aware of on my pi3:
|
Using GLSL ES 100 version on pi gives:
|
New ticket for tracking this: #168 |
Hello,
I'm trying to build ProjectM on a Rpi3, thinking that it would be cool to be able to bolt it onto "volumio" (https://volumio.org/)
The code builds on the rpi (ableit with a bunch of warnings). I've built SDL 2.0.8 (more on that later) and verified that SDL works using some test code. I've verified that there's GLES working using some of the test code in the rpi.
Running projectMSDL results in:
This clearly isn't optimal. :-)
Here's as much detail as I can think to provide, please let me know if more is needed, if there are other tests / code I can run, etc.
system environment:
compiler version
SDL version:
SDL was built with:
projectMSDL in gdb:
I have tried running the rpi with the three different (as far as i know) possible video driver modes:
/boot/config.txt:
dtoverlay=vc4-fkms-v3d
dtoverlay=vc4-kms-v3d
and no dtoverlay in config.txt
The first two modes, SDL does not operate. The setting with no dtoverlay, SDL does operate.
Note that there is no difference in any of the projectMSDL output no matter the setting I use.
SDL is tested with code such as:
glxgears reports:
The text was updated successfully, but these errors were encountered: