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

Raspberry Pi 4: Your video card driver does not support any of the supported OpenGL versions. #41162

Closed
ikostan opened this issue Aug 10, 2020 · 12 comments

Comments

@ikostan
Copy link

ikostan commented Aug 10, 2020

Godot version: 3.2.2-stable

OS/device including version: Manjaro ARM Linux (Linux 5.4.51-2-MANJARO-ARM (aarch64)) + Raspberry Pi 4 4 GB

Issue description: video card driver error appears when running Godot project on Raspberry Pi 4 (Godot engine was compiled on Raspberry Pi 4)

Steps to reproduce:

In general I tried to compile Godot for my Raspberry Pi 4 (4 GB) so that I could run Godot projects on it. I do that because there is no official Godot version for my setup at the moment. The full procedure description you can find here.

  1. Open terminal and run: "sudo pacman -S scons pkgconf gcc libxcursor libxinerama libxi libxrandr mesa glu alsa-lib pulseaudio
    freetype2 yasm"

  2. Download official Godot version from here: 3.2.2-stable

  3. Extract files to: "/home/superadmin/Godot/godot-3.2.2-stable/"

  4. Open terminal and run: "cd /home/superadmin/Godot/godot-3.2.2-stable/"

  5. Then run: "scons -j8 platform=x11 bits=64"

  6. Wait until compilation process is finished

  7. Copy compiled version: sudo cp /bin/godot.x11.tools.64 /home/superadmin/Godot/compiled/godot.x11.tools.64

  8. Run godot.x11.tools.64

  9. Open a simple Godot project and press on "Play" button.

Actual results:

"Your video card driver does not support any of the supported OpenGL versions. Please update your drivers or if you have a very old or integrated GPU upgrade it." error appears

Minimal reproduction project:

@clayjohn
Copy link
Member

There is a different process for compiling to raspberry Pi. The default x11 templates are for desktop x11.

This Reddit comment suggests you should compile the executable with particular flags for the raspberry Pi.

Keep in mind, Godot doesn't officially support raspberry Pi, so don't expect great performance or usability.

@Tungsten842
Copy link

Godot version: 3.2.2-stable

OS/device including version: Manjaro ARM Linux (Linux 5.4.51-2-MANJARO-ARM (aarch64)) + Raspberry Pi 4 4 GB

Issue description: video card driver error appears when running Godot project on Raspberry Pi 4 (Godot engine was compiled on Raspberry Pi 4)

Steps to reproduce:

In general I tried to compile Godot for my Raspberry Pi 4 (4 GB) so that I could run Godot projects on it. I do that because there is no official Godot version for my setup at the moment. The full procedure description you can find here.

1. Open terminal and run: "sudo pacman -S scons pkgconf gcc libxcursor libxinerama libxi libxrandr mesa glu alsa-lib pulseaudio 
   freetype2 yasm"

2. Download official Godot version from here: [3.2.2-stable](https://github.com/godotengine/godot/releases/tag/3.2.2-stable)

3. Extract files to: "/home/superadmin/Godot/godot-3.2.2-stable/"

4. Open terminal and run: "cd /home/superadmin/Godot/godot-3.2.2-stable/"

5. Then run: "scons -j8 platform=x11 bits=64"

6. Wait until compilation process is finished

7. Copy compiled version: sudo cp /bin/godot.x11.tools.64 /home/superadmin/Godot/compiled/godot.x11.tools.64

8. Run godot.x11.tools.64

9. Open a simple Godot project and press on "Play" button.

Actual results:

"Your video card driver does not support any of the supported OpenGL versions. Please update your drivers or if you have a very old or integrated GPU upgrade it." error appears

Minimal reproduction project:

Have you enabled dtoverlay=vc4-fkms-v3d in config.txt?

@ikostan
Copy link
Author

ikostan commented Aug 10, 2020

dtoverlay=vc4-fkms-v3d

It was there by default, see my config below:

`# See /boot/overlays/README for all available options

gpu_mem=64
initramfs initramfs-linux.img followkernel
kernel=kernel8.img
arm_64bit=1
enable_gic=1
disable_overscan=1

#enable sound
dtparam=audio=on
hdmi_drive=2

#enable vc4
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

over_voltage=6
arm_freq=2000`

@ikostan
Copy link
Author

ikostan commented Aug 10, 2020

There is a different process for compiling to raspberry Pi. The default x11 templates are for desktop x11.

This Reddit comment suggests you should compile the executable with particular flags for the raspberry Pi.

Keep in mind, Godot doesn't officially support raspberry Pi, so don't expect great performance or usability.

Thank you for trying to help me. I will try to recompile it as following:

scons platform=x11 target=release_debug tools=yes use_llvm=yes CCFLAGS="-mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -mlittle-endian -munaligned-access" -j 4

@ikostan
Copy link
Author

ikostan commented Aug 10, 2020

There is a different process for compiling to raspberry Pi. The default x11 templates are for desktop x11.

This Reddit comment suggests you should compile the executable with particular flags for the raspberry Pi.

Keep in mind, Godot doesn't officially support raspberry Pi, so don't expect great performance or usability.

What I did step by step:

  1. Removed all previously compiled files.
  2. Run following command: sudo pacman -S clang
  3. Extract Godot engine source files to: /home/superadmin/Godot/godot-3.2.2-stable/
  4. cd /home/superadmin/Godot/godot-3.2.2-stable/
  5. sudo scons platform=x11 bits=64 target=release_debug tools=yes use_llvm=yes CCFLAGS="-mcpu=cortex-a72 -mfpu=neon-vfpv4 -mfloat-abi=hard -mlittle-endian -munaligned-access" -j 4

Final output:

`
[Initial build] Compiling ==> thirdparty/freetype/src/winfonts/winfnt.c

[Initial build] Compiling ==> thirdparty/freetype/src/sfnt/sfnt.c

[Initial build] Linking Static Library ==> modules/freetype/libfreetype_builtin.x11.opt.tools.64.llvm.a

[Initial build] Ranlib Library ==> modules/freetype/libfreetype_builtin.x11.opt.tools.64.llvm.a

[Initial build] Building compilation database compile_commands.json

[Initial build] progress_finish(["progress_finish"], [])

[Initial build] Linking Static Library ==> core/libcore.x11.opt.tools.64.llvm.a
Ranlib Library ==> core/libcore.x11.opt.tools.64.llvm.a

[Initial build] Linking Program ==> bin/godot.x11.opt.tools.64.llvm

[Initial build] scons: done building targets.
`

Now the problem is that I have no idea where is the execution file... I mean I checked bin directory and there was nothing like "bin/godot.x11.opt.tools.64.llvm" there... What should I do next?

@Zireael07
Copy link
Contributor

I expect the compiled file to have no extension, not .llvm.

@ikostan
Copy link
Author

ikostan commented Aug 10, 2020

I expect the compiled file to have no extension, not .llvm.

I guess it because I used use_llvm=yes ...
I found some interesting procedure here. Will try to re-run it as following:

"scons -j 4 platform=x11 module_webm_enabled=no tools=yes use_llvm=yes CCFLAGS="-mcpu=cortex-a72 -mfpu=neon-vfpv4 -mfloat-abi=hard -mlittle-endian -munaligned-access"

@ikostan
Copy link
Author

ikostan commented Aug 10, 2020

I expect the compiled file to have no extension, not .llvm.

I guess it because I used use_llvm=yes ...
I found some interesting procedure here. Will try to re-run it as following:

"scons -j 4 platform=x11 module_webm_enabled=no tools=yes use_llvm=yes CCFLAGS="-mcpu=cortex-a72 -mfpu=neon-vfpv4 -mfloat-abi=hard -mlittle-endian -munaligned-access"

That one did not work as well, this is what I got at the end:

[ 73%] Compiling ==> thirdparty/freetype/src/type42/type42.c
[ 73%] Compiling ==> thirdparty/freetype/src/winfonts/winfnt.c
[ 74%] Compiling ==> thirdparty/freetype/src/sfnt/sfnt.c
[ 93%] Building compilation database compile_commands.json
[ 93%] Linking Static Library ==> modules/freetype/libfreetype_builtin.x11.tools.64.llvm.a
[ 93%] Ranlib Library ==> modules/freetype/libfreetype_builtin.x11.tools.64.llvm.a
[ 95%] progress_finish(["progress_finish"], [])
[ 97%] Linking Static Library ==> core/libcore.x11.tools.64.llvm.a
Ranlib Library ==> core/libcore.x11.tools.64.llvm.a
[ 97%] Linking Program ==> bin/godot.x11.tools.64.llvm
[ 97%] scons: done building targets.

@ikostan
Copy link
Author

ikostan commented Aug 25, 2020

So I got some help from @psstoyanov and finnaly manage to compile it on my system (Raspberry Pi 4 4GB + Linux Manjaro), for more details see here

Step by step:

  1. Open terminal and run: sudo pacman -S scons pkgconf gcc libxcursor libxinerama libxi libxrandr mesa glu alsa-lib pulseaudio freetype2 yasm
  2. Run: git clone --branch 3.2 https://github.com/godotengine/godot
    NOTE: it is important to clone 3.2 branch, otherwise the procedure will fail
  3. Run: cd godot
  4. Run: scons platform=x11 target=release_debug tools=yes use_llvm=false CCFLAGS="-march=armv8-a+crc+crypto -mcpu=cortex-a72" -j6

and as a result I got this output:

scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 5%] Linking Static Library ==> main/libmain.x11.opt.tools.64.a
[ 5%] Ranlib Library ==> main/libmain.x11.opt.tools.64.a
[100%] progress_finish(["progress_finish"], [])
[100%] Linking Program ==> bin/godot.x11.opt.tools.64
[100%] scons: done building targets.

  1. Run: sudo bin/godot.x11.opt.tools.64

as a result I got following output:

Godot Engine v3.2.3.rc.custom_build.c5abc57f8 - https://godotengine.org
X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 28
Current serial number in output stream: 25
X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 28
Current serial number in output stream: 25
ERROR: initialize: Condition "ctxErrorOccurred || !p->glx_context" is true. Returned: ERR_UNCONFIGURED
At: platform/x11/context_gl_x11.cpp:190.
OpenGL ES 2.0 Renderer: V3D 4.2
OpenGL ES 2.0 Batching: ON

Godot GUI client is opened as well

  1. For the test purposes I imported following pong project. It is a 2D game and it seems running well. However, I can still see a few errors in the console when I am trying to run the Godot engine, see logs above (step 4)

It is good enough for now so I'll close this issue.

@ikostan ikostan closed this as completed Aug 25, 2020
@ikostan
Copy link
Author

ikostan commented Aug 25, 2020

So I got some help from @psstoyanov and finnaly manage to compile it on my system (Raspberry Pi 4 4GB + Linux Manjaro), for more details see here

Step by step:

1. Open terminal and run: `sudo pacman -S scons pkgconf gcc libxcursor libxinerama libxi libxrandr mesa glu alsa-lib pulseaudio freetype2 yasm`

2. Run: `git clone --branch 3.2 https://github.com/godotengine/godot`
   **NOTE**: it is important to clone 3.2 branch, otherwise the procedure will fail

3. Run: `cd godot`

4. Run: `scons platform=x11 target=release_debug tools=yes use_llvm=false CCFLAGS="-march=armv8-a+crc+crypto -mcpu=cortex-a72" -j6`

and as a result I got this output:

scons: Reading SConscript files ...
Enabling ALSA
Enabling PulseAudio
Checking for C header file mntent.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
[ 5%] Linking Static Library ==> main/libmain.x11.opt.tools.64.a
[ 5%] Ranlib Library ==> main/libmain.x11.opt.tools.64.a
[100%] progress_finish(["progress_finish"], [])
[100%] Linking Program ==> bin/godot.x11.opt.tools.64
[100%] scons: done building targets.

1. Run: `sudo bin/godot.x11.opt.tools.64`

as a result I got following output:

Godot Engine v3.2.3.rc.custom_build.c5abc57f8 - https://godotengine.org
X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 28
Current serial number in output stream: 25
X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 28
Current serial number in output stream: 25
ERROR: initialize: Condition "ctxErrorOccurred || !p->glx_context" is true. Returned: ERR_UNCONFIGURED
At: platform/x11/context_gl_x11.cpp:190.
OpenGL ES 2.0 Renderer: V3D 4.2
OpenGL ES 2.0 Batching: ON

Godot GUI client is opened as well

1. For the test purposes I imported following [pong](https://github.com/godotengine/godot-demo-projects/tree/master/2d/pong) project. It is a 2D game and it seems running well. However, I can still see a few errors in the console when I am trying to run the Godot engine, see logs above (step 4)

It is good enough for now so I'll close this issue.

Actually I still have a problem. When I tried to develop 2D game of my own I got an error on my first attempt to play it:

image

So I get right back to where I started. i mean, I wanted to compile the Godot engine in order to solve that error in the first place...

@Calinou
Copy link
Member

Calinou commented Aug 25, 2020

@ikostan Did you configure the project to use the GLES2 renderer instead of GLES3? You can do it in the top-right corner of th eeditor window (which appears to be cut off on your screenshot), or in the Project Settings (Rendering > Quality > Driver > Driver Name).

@ikostan
Copy link
Author

ikostan commented Aug 25, 2020

@ikostan Did you configure the project to use the GLES2 renderer instead of GLES3? You can do it in the top-right corner of th eeditor window (which appears to be cut off on your screenshot), or in the Project Settings (Rendering > Quality > Driver > Driver Name).

Thanks @Calinou , now it works fine.

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

No branches or pull requests

6 participants