godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.48k stars 19.27k forks source link

Vulkan API using incorrect Vulkan Device, using Intel Graphics instead of NVIDIA GPU #88502

Open frederickjjoubert opened 4 months ago

frederickjjoubert commented 4 months ago

Tested versions

4.2.1

System information

Pop_OS! Razer Blade 17, NVIDIA 3070

Issue description

I am trying to open my projects using Godot 4.2.1 on Pop_OS!

The project selection window pops up, and when I select a project (any project) I get the following error:

jacques@pop-os:~$ godot4
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 470.199.02 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

Editing project: /home/jacques/Code/godot/udemy-gamedevtv-complete-godot-2d/projects/SpeedySaucer
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
Vulkan API 1.3.238 - Forward+ - Using Vulkan Device #0: Intel - Intel(R) UHD Graphics (TGL GT1)
X Error:  BadDrawable
  Request Major code 149 ()
  Request Minor code 4
  ResourceID 0x340000a
  Error Serial #196
  Current Serial #235
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketLargeE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools12BucketMediumE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketSmallE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: BUG: Unreferenced static string to 0: TextServerDummy
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: IPUnix
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatImporterSaver
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: MovieWriterMJPEG
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: interface_added
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: TextServerAdvanced
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ImageFormatLoader
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatSaver
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: GDScriptEditorTranslationParserPlugin
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: MovieWriterPNGWAV
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ScriptLanguage
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatLoader
   at: unref (core/string/string_name.cpp:129)

Steps to reproduce

Open a project using Godot 4.2.1 on Pop_OS!

Minimal reproduction project (MRP)

Any project on Pop_OS!

brcontainer commented 4 months ago

Does the bug occur in Godot4.1.3 or Godot4.3-dev3?

Downloads https://godotengine.org/download/archive/

AThousandShips commented 4 months ago

Does this happen with --rendering-method gl_compatibility?

frederickjjoubert commented 4 months ago

Does the bug occur in Godot4.1.3 or Godot4.3-dev3?

Downloads https://godotengine.org/download/archive/

I am using Godot 4.2.1

frederickjjoubert commented 4 months ago

Does this happen with --rendering-method gl_compatibility?

I will try that!

brcontainer commented 4 months ago

Does the bug occur in Godot4.1.3 or Godot4.3-dev3? Downloads https://godotengine.org/download/archive/

I am using Godot 4.2.1

I know, what you're asking is whether you've tested in different versions, because sometimes it's a problem that was fixed in version 4.3. Test to confirm (not in your project, create a new project for test).

I noticed is that although your GPU (RTX 3070) supports Vulkan, when opening the project instead of using the RTX 3070, the project tries to use "Intel(R) UHD", there is the possibility of RTX driver is not updated.

Vulkan API 1.3.238 - Forward+ - Using Vulkan Device #0: Intel - Intel(R) UHD Graphics (TGL GT1)

frederickjjoubert commented 4 months ago

Does the bug occur in Godot4.1.3 or Godot4.3-dev3? Downloads https://godotengine.org/download/archive/

I am using Godot 4.2.1

I know, what you're asking is whether you've tested in different versions, because sometimes it's a problem that was fixed in version 4.3. Test to confirm (not in your project, create a new project for test).

I will try running on 4.3 to check.

I noticed is that although your GPU (RTX 3070) supports Vulkan, when opening the project instead of using the RTX 3070, the project tries to use "Intel(R) UHD", there is the possibility of RTX driver is not updated.

Vulkan API 1.3.238 - Forward+ - Using Vulkan Device #0: Intel - Intel(R) UHD Graphics (TGL GT1)

Yes I noticed this too. I am not sure if there is a way to set it back? I uninstalled and reinstall the latest NVIDIA drivers for Pop_OS! and there was not any change to this.

brcontainer commented 4 months ago

Yes I noticed this too. I am not sure if there is a way to set it back? I uninstalled and reinstall the latest NVIDIA drivers for Pop_OS! and there was not any change to this.

When you create a new project, does it open with Intel UHD too?

frederickjjoubert commented 4 months ago

Does the bug occur in Godot4.1.3 or Godot4.3-dev3?

Downloads https://godotengine.org/download/archive/

I have the following results to report:

Tested with:

  1. Snap Install sudo snap install godot4 using Godot 4.2.1 stable.
  2. Download Archive using Godot 4.1.3 stable
  3. Download Archive using Godot 4.2 stable
  4. Download Archive using Godot 4.3.1 dev

Test 1 Results (Original Install using Snap Store Godot 4.2.1 stable)

Error, Crash, from Using Vulkan Device #0: Intel - Intel(R) UHD Graphics (TGL GT1)

For some reason it is not using my NVIDIA gpu

jacques@pop-os:~$ godot4
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 545.29.06 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

jacques@pop-os:~$ godot4
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 545.29.06 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

Editing project: /home/jacques/Code/godot/udemy-gamedevtv-complete-godot-2d/projects/SpeedySaucer
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
Vulkan API 1.3.238 - Forward+ - Using Vulkan Device #0: Intel - Intel(R) UHD Graphics (TGL GT1)
X Error:  BadMatch
  Request Major code 149 ()
  Request Minor code 4
  Error Serial #196
  Current Serial #235
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketLargeE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools12BucketMediumE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketSmallE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: BUG: Unreferenced static string to 0: TextServerDummy
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: IPUnix
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatImporterSaver
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: MovieWriterMJPEG
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: interface_added
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: TextServerAdvanced
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ImageFormatLoader
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatSaver
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: GDScriptEditorTranslationParserPlugin
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: MovieWriterPNGWAV
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ScriptLanguage
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatLoader
   at: unref (core/string/string_name.cpp:129)

Test 2 Results (Download Archive using Godot 4.1.3 stable)

Success, no issues.

jacques@pop-os:~/Downloads$ ./Godot_v4.1.3-stable_linux.x86_64 
Godot Engine v4.1.3.stable.official.f06b6836a - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 545.29.06 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

WARNING: Detected another project.godot at /home/jacques/Code/godot/udemy-gamedevtv-complete-godot-2d/projects/SpeedySaucer. The folder will be ignored.
     at: _should_skip_directory (editor/editor_file_system.cpp:2366)
Editing project: /home/jacques/Code/godot/udemy-gamedevtv-complete-godot-2d/projects/SpeedySaucer
Godot Engine v4.1.3.stable.official.f06b6836a - https://godotengine.org
Vulkan API 1.3.260 - Forward+ - Using Vulkan Device #2: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

Test 3 Results (Download Archive using Godot 4.2 stable)

Success, no issues.

jacques@pop-os:~/Downloads$ ./Godot_v4.2-stable_linux.x86_64 
Godot Engine v4.2.stable.official.46dc27791 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 545.29.06 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

Editing project: /home/jacques/Code/godot/udemy-gamedevtv-complete-godot-2d/projects/SpeedySaucer
Godot Engine v4.2.stable.official.46dc27791 - https://godotengine.org
Vulkan API 1.3.260 - Forward+ - Using Vulkan Device #2: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

Test 4 Results (Download Archive using Godot 4.3 dev3)

Success, no issues.

jacques@pop-os:~/Downloads$ ./Godot_v4.3-dev3_linux.x86_64 
Godot Engine v4.3.dev3.official.36e943b6b - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 545.29.06 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

Editing project: /home/jacques/Code/godot/udemy-gamedevtv-complete-godot-2d/projects/SpeedySaucer
Godot Engine v4.3.dev3.official.36e943b6b - https://godotengine.org
Vulkan API 1.3.260 - Forward+ - Using Vulkan Device #2: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

I use the snap store for a lot of my packages, I would prefer to keep using the snap store version so I can easily keep my godot install up-to-date with snap refresh as opposed to manually having to manage my godot versions.

frederickjjoubert commented 4 months ago

Yes I noticed this too. I am not sure if there is a way to set it back? I uninstalled and reinstall the latest NVIDIA drivers for Pop_OS! and there was not any change to this.

When you create a new project, does it open with Intel UHD too?

Yes, I tried with a new blank test project and get the same results:

jacques@pop-os:~/Downloads$ godot4
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 545.29.06 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

Editing project: /home/jacques/Code/godot/test_project
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
Vulkan API 1.3.238 - Forward+ - Using Vulkan Device #0: Intel - Intel(R) UHD Graphics (TGL GT1)
X Error:  BadMatch
  Request Major code 149 ()
  Request Minor code 4
  Error Serial #196
  Current Serial #235
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketLargeE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools12BucketMediumE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketSmallE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: BUG: Unreferenced static string to 0: TextServerDummy
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: IPUnix
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatImporterSaver
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: MovieWriterMJPEG
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: interface_added
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: TextServerAdvanced
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ImageFormatLoader
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatSaver
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: GDScriptEditorTranslationParserPlugin
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: MovieWriterPNGWAV
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ScriptLanguage
   at: unref (core/string/string_name.cpp:129)
ERROR: BUG: Unreferenced static string to 0: ResourceFormatLoader
   at: unref (core/string/string_name.cpp:129)
frederickjjoubert commented 4 months ago

Does this happen with --rendering-method gl_compatibility?

I will try that!

It looks like that works, but there is a warning as follows:

jacques@pop-os:~/Downloads$ godot4 --rendering-method gl_compatibility
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 545.29.06 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

Editing project: /home/jacques/Code/godot/udemy-gamedevtv-complete-godot-2d/projects/SpeedySaucer
Godot Engine v4.2.1.stable.official.b09f793f5 - https://godotengine.org
OpenGL API 3.3.0 NVIDIA 545.29.06 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 3070 Laptop GPU

jacques@pop-os:~/Downloads$ WARNING: Blend file import is enabled in the project settings, but no Blender path is configured in the editor settings. Blend files will not be imported.
     at: _editor_init (modules/gltf/register_types.cpp:63)
WARNING: Glow is not supported when using the GL Compatibility backend yet. Support will be added in a future release.
     at: environment_set_glow (servers/rendering/storage/environment_storage.cpp:387)
brcontainer commented 4 months ago

@frederickjjoubert These warnings are common, the first is because you didn't configure the tool to import from Blender (something that is optional), and the second warning is because the lighting in gl_compatibility does not support GLOW.

These warnings are common, the first is because you didn't configure the tool to import from Blender (something that is optional), and the second warning is because the lighting in gl_compatibility does not support GLOW.

Note that gl_compatibility still has several limitations: https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/internal_rendering_architecture.html#compatibility

frederickjjoubert commented 4 months ago

@frederickjjoubert These warnings are common, the first is because you didn't configure the tool to import from Blender (something that is optional), and the second warning is because the lighting in gl_compatibility does not support GLOW.

These warnings are common, the first is because you didn't configure the tool to import from Blender (something that is optional), and the second warning is because the lighting in gl_compatibility does not support GLOW.

Note that gl_compatibility still has several limitations: https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/internal_rendering_architecture.html#compatibility

I think we should ignore these warnings as they are not related to the problem at hand as far as I can tell. I'm working on a 2D project, I am not working with anything blender or glow related.