flathub / org.godotengine.Godot

Godot engine
https://flathub.org/apps/details/org.godotengine.Godot
39 stars 25 forks source link

"Unable to initialize video driver" came back again #80

Closed 3ter closed 3 years ago

3ter commented 3 years ago

Most probably after updating my video drivers I couldn't start the snap/flatpak version of Godot anymore (appimage still working fine):

image

$ flatpak run org.godotengine.Godot 
Godot Engine v3.3.2.stable.flathub - https://godotengine.org
ERROR: initialize: Condition "!fbc" is true. Returned: ERR_UNCONFIGURED
   At: platform/x11/context_gl_x11.cpp:158.
ERROR: initialize: Condition "!fbc" is true. Returned: ERR_UNCONFIGURED
   At: platform/x11/context_gl_x11.cpp:158.
ERROR: is_viable: Error initializing GLAD
   At: drivers/gles2/rasterizer_gles2.cpp:166.
Gtk-Message: 20:20:51.274: Failed to load module "canberra-gtk-module"
Gtk-Message: 20:20:51.274: Failed to load module "canberra-gtk-module"

Last time this happened it could be alleviated by updating everything and restarting but this time I'm at a loss.

Similar to issues https://github.com/godotengine/godot/issues/27548 and https://github.com/godotengine/godot/issues/27494https://github.com/godotengine/godot/issues/27494 brought up in the Godot repo.

Calinou commented 3 years ago

Try rebooting your system after updating your graphics drivers. This is an issue with graphics drivers on Linux in general; it's not specific to Godot.

Also, which graphics card model do you have? NVIDIA graphics drivers require you to install Flatpak packages that match the driver version currently in use. Flatpak should handle this for you automatically, but it's possible that the versions are still mismatching after you updated the graphics driver and rebooted. Check the output of nvidia-smi to see your NVIDIA driver version, then run flatpak list to see the list of Flatpaks installed (including their dependencies).

3ter commented 3 years ago

Thank you for your answer! I did restart the system and I do think that there's a mismatch in the driver version:

$ flatpak list
Name                                    Application ID                               Version  Branch Installation
Freedesktop Platform                    org.freedesktop.Platform                     20.08.14 20.08  system
Mesa                                    org.freedesktop.Platform.GL.default          21.1.4   20.08  system
nvidia-455-38                           org.freedesktop.Platform.GL.nvidia-455-38             1.4    system
nvidia-460-32-03                        org.freedesktop.Platform.GL.nvidia-460-32-03          1.4    system
nvidia-460-39                           org.freedesktop.Platform.GL.nvidia-460-39             1.4    system
nvidia-460-56                           org.freedesktop.Platform.GL.nvidia-460-56             1.4    system
nvidia-460-73-01                        org.freedesktop.Platform.GL.nvidia-460-73-01          1.4    system
nvidia-460-80                           org.freedesktop.Platform.GL.nvidia-460-80             1.4    system
openh264                                org.freedesktop.Platform.openh264            2.1.0    2.0    system
GNOME Application Platform version 3.38 org.gnome.Platform                                    3.38   system
Godot                                   org.godotengine.Godot                        3.3.2    stable system
Adwaita dark GTK theme                  org.gtk.Gtk3theme.Adwaita-dark                        3.22   system
$ nvidia-smi
Thu Jul 22 08:47:11 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.91.03    Driver Version: 460.91.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1070    Off  | 00000000:01:00.0  On |                  N/A |
| 39%   49C    P8    11W / 190W |    692MiB /  8116MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
$ nvidia-detector 
nvidia-driver-470

image

3ter commented 3 years ago

The issue was resolved as expected by

$ flatpak install flathub org.freedesktop.Platform.GL.nvidia-460-91-03

Shall we leave it open @Calinou as this dependency should have been resolved by flatpak on its own (I saw you adding the bug label)?

Calinou commented 3 years ago

Shall we leave it open @Calinou as this dependency should have been resolved by flatpak on its own (I saw you adding the bug label)?

Indeed, this is an issue with Flatpak itself, not the Godot Flatpak manifest.