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

Vulkan: Can't start Godot with AMD integrated + NVIDIA dedicated GPU switchable graphics (Failed dispatch call vkEnumeratePhysicalDevices) #57708

Closed
fonixgm opened this issue Feb 6, 2022 · 37 comments · Fixed by #73450

Comments

@fonixgm
Copy link

fonixgm commented Feb 6, 2022


Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version

4.0

System information

Windows 10 RTX 2060 and AMD graphics chipset

Issue description

67c643612afe3503f692c94426fc251b
b09673e306d981f59a5e5606dd42dec6

When I double click on the program I get the following error showing that I don't have the drivers I have checked everything and it is correct I have even installed it again and it is still the same.

Steps to reproduce

Open ./Godot_v4.0-alpha1_win64_console.cmd or ./Godot_v4.0-alpha1_win64.exe

Minimal reproduction project

No response

@fonixgm
Copy link
Author

fonixgm commented Feb 6, 2022

The solution I had to apply is the following by performing these actions from this video:
https://www.youtube.com/watch?v=0HdHE_sq7dw

@Calinou
Copy link
Member

Calinou commented Feb 6, 2022

Related to #57396.

I don't think there's anything we can do about this. Setting DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 to 1 automatically is probably not a good idea, as it will prevent forcing the use of AMD integrated graphics entirely when a dedicated GPU is present. For non-game applications, this can be problematic if you want to preserve battery life.

Did you update your graphics drivers from AMD and NVIDIA's websites (not from your laptop OEM or Windows Update)?

cc @bruvzg

@Calinou Calinou added this to the 4.0 milestone Feb 6, 2022
@Calinou Calinou changed the title I can't open godot on my laptop Vulkan: Can't start Godot with AMD integrated + NVIDIA dedicated GPU switchable graphics Feb 6, 2022
@fonixgm
Copy link
Author

fonixgm commented Feb 6, 2022

Related to #57396.

I don't think there's anything we can do about this. Setting DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 to 1 automatically is probably not a good idea, as it will prevent forcing the use of AMD integrated graphics entirely when a dedicated GPU is present. For non-game applications, this can be problematic if you want to preserve battery life.

Did you update your graphics drivers from AMD and NVIDIA's websites (not from your laptop OEM or Windows Update)?

cc @bruvzg

I have updated all the drivers both from windows update first and then from the manufacturers page with their latest versions.

@bruvzg
Copy link
Member

bruvzg commented Feb 6, 2022

as it will prevent forcing the use of AMD integrated graphics entirely when a dedicated GPU is present

If I understand correctly, with DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 both devices should be accessible, without it, it's presented as a single device.

@fonixgm Could you try running Godot with --verbose command line argument (both with and without DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 set), and give us the output ("Vulkan devices:" part in particular).

@fonixgm
Copy link
Author

fonixgm commented Feb 6, 2022

as it will prevent forcing the use of AMD integrated graphics entirely when a dedicated GPU is present

If I understand correctly, with DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 both devices should be accessible, without it, it's presented as a single device.

@fonixgm Could you try running Godot with --verbose command line argument (both with and without DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 set), and give us the output ("Vulkan devices:" part in particular).

This is with DISABLE_LAYER_AMD_SWITCHCHABLE_GRAPHICS_1 on
16db03304dd4429b3e5ccb0e52725cee
8e3662aaaa748a204234a14de0fa0b63

and this is without the DISABLE_LAYER_AMD_SWITCHCHABLE_GRAPHICS_1

ae313da7f9579c916af731aa06444f1c

@bruvzg
Copy link
Member

bruvzg commented Feb 6, 2022

I have not found much useful info how VK_LAYER_AMD_SWITCHCHABLE_GRAPHICS should work, but it seems broken (there are also plenty of similar issues with the layer on Linux, so it's not Windows specific).

With the layer disabled, it should be possible to force a specific GPU for the app using Windows built-in option in "System→Display→Graphics". But I agree that we probably can't do anything with it.

@fonixgm
Copy link
Author

fonixgm commented Feb 6, 2022

I have not found much useful info how VK_LAYER_AMD_SWITCHCHABLE_GRAPHICS should work, but it seems broken (there are also plenty of similar issues with the layer on Linux, so it's not Windows specific).

With the layer disabled, it should be possible to force a specific GPU for the app using Windows built-in option in "System→Display→Graphics". But I agree that we probably can't do anything with it.

Temporarily I will use the DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 to make it work and I will also investigate if there is any configuration that can solve this problem apart from using this environment variable and thus not to annoy so much the battery of my pc.

@Calinou Calinou changed the title Vulkan: Can't start Godot with AMD integrated + NVIDIA dedicated GPU switchable graphics Vulkan: Can't start Godot with AMD integrated + NVIDIA dedicated GPU switchable graphics (Failed dispatch call vkEnumeratePhysicalDevices) Feb 10, 2022
@ChristianB84
Copy link

I reproduced this with a similar combination of graphics cards and fixed it locally by adding "OS::get_singleton()->set_environment("DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1", "1");" to the function Main::setup in main.cpp, immediately after "OS::get_singleton()->initialize();". At least the Windows implementation for that function changes the environment variable only for the current process (at least according to the documentation). Is there any reason not to do this? Updating my graphics drivers didn't do the trick and I guess it might take some time till most users with such a (not that unusual) graphics cards combination will receive an update that fixes this issue.

@Mikadini
Copy link

i want to comunicate i solve a similar problem ( #56164 ) i simply remove the official asus amd driver and put the generale amd driver using the adrenalin software this solve the problem for me.

@Calinou
Copy link
Member

Calinou commented Jun 17, 2022

I reproduced this with a similar combination of graphics cards and fixed it locally by adding "OS::get_singleton()->set_environment("DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1", "1");" to the function Main::setup in main.cpp, immediately after "OS::get_singleton()->initialize();". At least the Windows implementation for that function changes the environment variable only for the current process (at least according to the documentation). Is there any reason not to do this? Updating my graphics drivers didn't do the trick and I guess it might take some time till most users with such a (not that unusual) graphics cards combination will receive an update that fixes this issue.

How will this behave on systems with only AMD integrated graphics? Can anyone test this on such a system?

@akien-mga
Copy link
Member

akien-mga commented Jun 17, 2022

Please try 4.0 alpha 10, there was an update to VMA which might help: https://godotengine.org/article/dev-snapshot-godot-4-0-alpha-10

(Reading again, maybe not - but there's no harm in testing :))

@fonixgm
Copy link
Author

fonixgm commented Jun 17, 2022

I have tried alpha 10 but the error persists.

image

@Ramedes
Copy link

Ramedes commented Jun 19, 2022

The Error occurs on Branch 3.x, 3.4.x and 4.x

On my System i have a integrated Radeon AMD Vegas 11 Graphics card and a additional, second NVidia Graphics card.
I simply turned the AMD Vergas Graphic card up in Windows 10 Device manager (Nvidia still was enabled), the Editor
launched without any problems. After it, i was able to re-enable the AMD Graphics card in Device Manager (without Reboot)
and the Editor starts without any Problems.

@Calinou
Copy link
Member

Calinou commented Jun 19, 2022

The Error occurs on Branch 3.x, 3.4.x and 4.x

Godot 3.x uses an OpenGL renderer, so Vulkan-specific issues like this one don't affect it. If you encounter this on Godot 3.x, it's due to something different which should be tracked in a separate issue.

@Ramedes
Copy link

Ramedes commented Jun 19, 2022

I built 3.x, 3.4 and 4.x and the error shows up on any build, with tools or without, if it is release or debug targets or both.

@ChristianB84
Copy link

ChristianB84 commented Jul 9, 2022

I reproduced this with a similar combination of graphics cards and fixed it locally by adding "OS::get_singleton()->set_environment("DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1", "1");" to the function Main::setup in main.cpp, immediately after "OS::get_singleton()->initialize();". At least the Windows implementation for that function changes the environment variable only for the current process (at least according to the documentation). Is there any reason not to do this? Updating my graphics drivers didn't do the trick and I guess it might take some time till most users with such a (not that unusual) graphics cards combination will receive an update that fixes this issue.

How will this behave on systems with only AMD integrated graphics? Can anyone test this on such a system?

I don't know. I don't have such a system.

@Calinou
Copy link
Member

Calinou commented Feb 16, 2023

If any of you can still reproduce the issue, please test #73450 locally. A Windows build is included in that PR's description.

@MonT97
Copy link

MonT97 commented Mar 2, 2023

Update AMD Radeon diver can solve this problem

confirmed here :
R7 4800H
GTX 1650

got the driver from AMD website

@abderman
Copy link

abderman commented Mar 6, 2023

The solution I had to apply is the following by performing these actions from this video: https://www.youtube.com/watch?v=0HdHE_sq7dw

Thank you, its'working!!!

@yarre-uk
Copy link

Bumping because I had this issue too. An easy, temporary solution on Windows to force Godot to use the NVIDIA GPU is editing the cmd script to locally set the DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1 environment variable only for the given session.

@echo off
setlocal
	set DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
	Godot_v4.0-beta1_win64.exe
	pause > nul
endlocal

hello, tried your fix, and godot closes without any errors, just "not responding"

@snailrhymer
Copy link
Contributor

If any of you can still reproduce the issue, please test #73450 locally. A Windows build is included in that PR's description.

Works for me!

@TATAPNHOB
Copy link

TATAPNHOB commented Jul 2, 2023

image
image
My errors are like these. It seems that it recognizes the dedicated GPU, but still cannot initialize Vulkan. Actions from the aforementioned video do not work, as it seems.

@Calinou
Copy link
Member

Calinou commented Jul 2, 2023

My errors are like these. It seems that it recognizes the dedicated GPU, but still cannot initialize Vulkan. Actions from the aforementioned video do not work, as it seems.

Try 4.1.rc2 as it includes #73450.

Are you using external monitors by any chance?

@TATAPNHOB
Copy link

4.1.rc2 works! Thank you. I don't have any external monitors though.

@fudgepop01
Copy link

fudgepop01 commented Feb 7, 2024

for those of you arriving here in 2024 after January 27th, the issue is detailed here:
https://community.khronos.org/t/cannot-create-vulkan-instance-non-conformant-vulkan-implementation/110488/3

I’m having the same problem. Yesterday, I could open Vulkan-supported applications, but now I can’t. I updated the driver, used DDU to uninstall and reinstall it, but nothing changed. Example Vulkan applications also don’t open. I downloaded “VulkanRT-1.3.275.0-Components” from the LunarG website. The x86 version works with a warning that “dzn is not a conformant Vulkan implementation, testing use only.” However, the x64 version only gives a warning. Sometimes GPU-Z shows that it supports Vulkan, but then it disappears when the application is refreshed. My system: R5 5600G Vega 7(Cezzane), OS: Windows 11.

Edit: Uninstalling the “OpenCL™, OpenGL® and Vulkan® Compatibility Pack” fixed the problem.

This solution worked for me. You can easily find and uninstall this in "Apps > Installed Apps" in Windows settings. Click the 3 dots, uninstall it, and it should start working again.

@nathan130200
Copy link

bro... this is not fixed yet?

@lmReef
Copy link

lmReef commented Feb 19, 2024

bro... this is not fixed yet?

I've stopped running into this issue some time ago using godot 4. Though I'm not sure exactly which version fixed for me I'm currently on 4.2.1

@akien-mga
Copy link
Member

This was fixed in 4.1. If you still experience a similar issue in 4.2.1 or later, please open a new issue with details.

@nathan130200
Copy link

nathan130200 commented Feb 19, 2024

I'm in latest 4.2 and still happen this issue. I must add --rendering-driver opengl3 param to bypass this. Godot don't check for which render devices they can use, just enforce vulkan by default.

The same error is displayed
#57708 (comment)

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