[SDL] Failed to open vchiq device on RPi

Andreas Falkenhahn andreas at falkenhahn.com
Sun Sep 11 12:52:51 PDT 2016


I've looked into this now and the problem is that this call in SDL_egl.c
returns NULL:

    _this->egl_data->egl_display = _this->egl_data->eglGetDisplay(native_display);

I've then examined further and found out that SDL2 was actually using the
X11 video driver. I'd have expected it to use the RPI driver instead. So
I did the following:

    SDL_VideoInit("RPI");

Now it finally worked - well, sort of. There are still some issues:

1) The mouse cursor freezes and I can't move it. Also, keyboard doesn't
seem to work. According to the docs, this should solve it:

   sudo usermod -aG input pi

But it didn't. Input doesn't seem to work at all and the mouse cursor is
locked in the top left corner of the screen. Does anybody have an idea why
this happens?

2) What about the X11 driver? Is it supposed to work on the Pi or do
I have to use the RPI driver on the Pi? As I said, using the X11 driver
results in a "Failed to open vchiq device" error message.

3) I've noticed that the RPI driver always opens in full screen mode. Is
it also possible to make this open in window mode?

Thanks!

On 02.09.2016 at 20:06 Eric Wing wrote:

> On 9/2/16, Andreas Falkenhahn <andreas at falkenhahn.com> wrote:
>> On 01.09.2016 at 20:43 Eric Wing wrote:

>>> On 9/1/16, Andreas Falkenhahn <andreas at falkenhahn.com> wrote:
>>>> I've compiled SDL 2.0.4 on my Raspberry Pi 2 (running Raspbian) and
>>>> followed
>>>> all
>>>> the instructions in docs/README-raspberrypi.md. However, it doesn't work.
>>>> I
>>>> always
>>>> get the following error:

>>>>     * failed to open vchiq device

>>>> I've googled the error and tried all the solutions I could find (e.g.
>>>> doing
>>>> a
>>>> "sudo chmod 777 /dev/vchiq" or adding user pi to the video group by
>>>> doing
>>>> "sudo usermod -a -G video pi") but nothing helped. I still get the
>>>> error.

>>>> What is causing this and how can I fix this?


>>> I'm assuming you are using Raspbian Jessie.

>> I'm still on Wheezy but AFAIR that should be ok.

>>> I don't remember having to do anything special on my Pi that required
>>> privileged access (besides cranking up the amount of GPU memory). But
>>> I have a pretty boring Pi setup. (Just the basic with a HDMI into a
>>> TV. No cameras or touch screen, etc.)

>>> Does my demo program work for you?
>>> http://playcontrol.net/tempdownload/BlurrrBinaries/FlappyBlurrrC-0.1.1-Raspbian.tar.gz

>> Yes, it works. What could be the reason that my build doesn't work?

>> --
>> Best regards,
>>  Andreas Falkenhahn
>> mailto:andreas at falkenhahn.com


> Could be a thousand things, but my first guess is you installed a
> bunch of stuff on your system, which in turn changes SDL's automatic
> dependency phase in configure or whatever, and SDL builds with
> different features which may not work or may require extra
> permissions. You may need to vette every build option when you build
> SDL. (For example, I recall a touch library to be problematic and I
> think I disabled it explicitly.)


> Or you could use Blurrr :)

> FYI, the demo program is from a new SDK I'm developing, centered
> around SDL. One of the things Blurrr offers is shipping prebuilt
> libraries vetted to work for distribution on multiple platforms,
> saving you from this stuff. Blurrr tries to give you a
> download-and-go, non-root, reproducible way of developing for
> cross-platform, so you can focus on your game instead of building
> dependencies and managing different build systems on every platform.

> https://blurrrsdk.com

> Thanks,
> Eric



-- 
Best regards,
 Andreas Falkenhahn                            mailto:andreas at falkenhahn.com



More information about the SDL mailing list