Running examples on Raspberry Pi block input device


I’ve just compiled openFrameworks on Rasperry Pi following the offical guide. Everything went fine and I’m also able to compile examples. But when I try to run a random example, the device became unresponsive to all inputs after a few seconds.

For instance in the polygonExample the main window app continues to run animations fine, but mouse and keybord are unresponsive at all. The audioPlayerExample shows up, but without sounds.

The device isn’t responsive via SSH and I must plug off the power chord to restart. I guess that something bound to event loop, or so on.

This is the last log:

[notice ] Got device
[notice ]     node: %s

[notice ]     subsystem: %s

[notice ]     action: %s

Image 1:
Image 2:

And a run without keyboard and mouse:

pi@raspberrypi ~/openFrameworks/examples/sound/soundPlayerExample $ make run
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gtk±2.0 libmpg123
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): screenRect: 1920x1200
[notice ] ofAppEGLWindow: setupRPiNativeWindow(): windowRect: 1024x768
[notice ] ofAppEGLWindow: createSurface(): setting up EGL Display
[notice ] ofAppEGLWindow: createSurface(): EGL Display correctly set
[notice ] ofAppEGLWindow: createSurface(): current renderer type: GL
[notice ] ofAppEGLWindow: createSurface(): default renderer detected
[notice ] ofAppEGLWindow: createSurface(): surface created correctly
[notice ] ofAppEGLWindow: createSurface(): API bound correctly
[notice ] ofAppEGLWindow: createSurface(): -----EGL-----
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MAJOR = 1
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION_MINOR = 4
[notice ] ofAppEGLWindow: createSurface(): EGL_CLIENT_APIS = OpenGL_ES OpenVG
[notice ] ofAppEGLWindow: createSurface(): EGL_VENDOR = Broadcom
[notice ] ofAppEGLWindow: createSurface(): EGL_VERSION = 1.4
[notice ] ofAppEGLWindow: createSurface(): EGL_EXTENSIONS = EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_vg_parent_image EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_lock_surface
[notice ] ofAppEGLWindow: createSurface(): GL_RENDERER = VideoCore IV HW
[notice ] ofAppEGLWindow: createSurface(): GL_VERSION  = OpenGL ES-CM 1.1
[notice ] ofAppEGLWindow: createSurface(): GL_VENDOR   = Broadcom
[notice ] ofAppEGLWindow: createSurface(): -------------
[notice ] ofAppEGLWindow: setupPeripherals(): peripheral setup complete
[notice ] ofAppEGLWindow: setupNativeUDev(): created udev object
[notice ] ofAppEGLWindow: setupMouse(): unabled to find mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse
[ error ] ofAppEGLWindow: setupMouse(): did not open mouse, mouse_fd < 0
[warning] ofAppEGLWindow: setupKeyboard(): unabled to find keyboard
[ error ] ofAppEGLWindow: setupKeyboard(): did not open keyboard
[ error ] ofAppEGLWindow: setupKeyboard(): did not open keyboard, keyboard_fd < 0
[notice ] ofAppEGLWindow: setupPeripherals(): native event setup complete
[notice ] ofAppEGLWindow: setupOpenGL(): peripheral setup complete
[notice ] ofAppEGLWindow: runAppViaInfiniteLoop(): entering infinite loop
[notice ] ofAppEGLWindow: runAppViaInfiniteLoop(): setting up notifications complete

The RPi has some strange quirks if your power supply isn’t great/too many USB devices connected. This is most often seen with USB devices dropping out, ethernet disconnecting. I also see that you are running X11 which you may want to turn off as you can save GPU memory as OF doesn’t support X11 on the RPi.

I don’t need X11 at all because I’m going to build a console based application. However I wanted to check that the framework would work properly before starting a dev project based on it.
Is there a best practice to run oF without X11? How can run oF without a “startx”?

So I need to try another power supply unit or connect it directly to my MacBook USB port… isn’t it? Any suggestion there? I can’t test it right now, but I’ll let you know.soon.


to run without X11 is just like using the commands at the bottom of the setup guide

You can do this over SSH (what I do) or at the command prompt

You should really use a separate power supply - I use the one that comes with the iPhone but adafruit has some cheaper ones

I tried and it definitely works with a 2.1A PSU (the iPad’s one)… Yeah!

Now the only problem is the sound/noise level of analog audio output, but it isn’t related to oF.

1 Like