Godot 4 build for Raspberry pi 4

Godot Version

4.2.1

Question

Hello all you knowledgeable people. I am fairly new to both the gaming development and godot, and have currently ran into a problem where I am out of my depth. I have a game I have done in Godot 4.2.1 which I hope to run on a raspberry pi 4, currently running RetroPi. The OS can be changed if that is the bottleneck, but I have tried ubuntu and raspbian too, and neither worked as I hoped. What I have done:

This was more during the fall, which was probably on 4.1 rather than 4.2. I managed to build the binaries, and installed Vulkan via mesa-vulkan. I got some vague error relating to the buffer size not being enough, which is when I felt out of my depth. I did read that there was since very recently added support for Vulkan on the Pi 4. I read the recent thread where I saw that 4.2 got some more official binaries and that you are working on some support to get it running on Raspberry Pi 5. What I need help with is if anyone has gotten a game in Godot 4 running on a Raspberry Pi 4, and how you managed this. I likely miss a setting or two that makes it possible, so any help is appreciated!

1 Like

All I can say is Godot runs on Vulcan 1.3

I did a look around but couldn’t find a clear answer if the Vulcan driver has been updated since, because all sources only mention Vulcan 1.2.

1 Like

That would make sense. Is it possible to build it with opengl as default or is that an godot 3 exclusive?

1 Like

I’m not sure, the project manager opens with opengl3 as the default so maybe it’s possible. I mean you could export the game in compatibility mode. If that’s what you mean.
Otherwise if you mean the editor there are command line options to use opengl3

1 Like

I more meant for the final build. Building with opengl as the graphics driver. I develop on a normal pc, its just the final build that I hope to put on the Pi 4. Maybe I just have to run it in a browser for now until some time pass for support to be added :smiley:

1 Like

You should be able to export in compatibility mode aka opengl3.

You can also test your game in the editor by changing the project settings renderer to opengl/compatibility.

1 Like

Some info I looked up: The raspberry pi 5 page says it also support vulkan 1.2, just as the pi 4 should.

This thread talks about getting it running on pi 5 Add official Linux ARM/Raspberry Pi editor and export template binaries · Issue #988 · godotengine/godot-proposals · GitHub

I’ll try those binaries and see what happens.

1 Like

Update: Tried the official binaries on 4.2.1, but could not get it to run. Got a mysterious(to me) error that said" exec format error", which is different to the last binaries I used. Maybe there’s a build setting I am missing…

1 Like

I’ll update further, so anyone else can get info and learn from my testing:

I used arm64 when I had retropie, which is a 32 bit system, so swapping to that let the file run. However, it instantly returns the error: X11 Display not available

Initial google searches did not give me much info, except it seems server based, and my game doesn’t want or need a server, which is unclear to me. Does anyone know more?

1 Like

Here there is an option to use Vulcan, maybe setting that to false will promote opengl3 as the default.

1 Like

This Vulcan stuff have been happening a lot, and any GPU that has official support for 1.3 is working. But I can’t find an official statement that Vulcan of lesser versions are not supported. I think people should report the issue to GitHub when this happens.

1 Like

Exec format error is probably compliant the wrong architecture probably a tool chain issue.

1 Like

You were right with this, thank you! I’ll keep looking for why my build does not work properly.

Godot only requires Vulkan 1.0 support currently, so you don’t need a driver that supports Vulkan 1.3.

However, given Raspberry Pi’s performance profile and relative driver immaturity on the Vulkan side, it’s strongly recommended to switch your project to the Compatibility rendering method in the top-right corner of the editor.

1 Like

@ErikGodot the last time I tried to build Godot 4 for raspberrypi, I was most successful building it directly on the pi. With this approach didn’t have to worry about tool chain selection or build environment setup. The draw back is that it takes a little longer.

I think I had a similar issue with some rendering error messages, but I didn’t investigate further since I was running a headless server anyway.

I ultimately abandoned the pi approach for my development server, because I use Docker and didn’t want to take the time to build-and-maintain a container image, as no one was up-to-date with the latest Godot for arm. So I haven’t been working with the build system much since.

@Calinou, thanks for the confirmation! I recently was correcting myself on the vulkan compatibility matter.

Do you take lead on the Forward+ component of Godot? I see your name many times when looking at GitHub issues.

One of our previous questions here was: Is their a build option to set the editor with opengl3 as the default renderer?

I didn’t read this topic fully, but for reference here’s another thread that talked about this. Maybe it’s helpful:

Makes sense. Thank you for all your thoughts and responses. I am running in compatibility mode too. Regarding building it on the Pi itself, do you mean creating my own export templates, or getting godot up and running on the pi itself, and building it there?

I did look it through, but I feel about a hundred levels beneath what they do! The issue might be that I don’t know enough about building it manually and in the ways they mention. Its promising that they get it running on the pi 5 for sure. Maybe I just have to wait until someone with knowledge creates a step by step guide for a rookie like myself!

I’m a rendering contributor but most of the heavy lifting is done by clayjohn, RandomShaper and DarioSamo.

You can use the --rendering-driver opengl3 command line argument to force any project to run with OpenGL, even if it’s an exported project. The use of OpenGL can be forced at build-time by disabling Vulkan with the vulkan=no SCons option, but this is untested.

1 Like