godot
godot copied to clipboard
Vulkan: Can't start Godot with AMD integrated + NVIDIA dedicated GPU switchable graphics (Failed dispatch call `vkEnumeratePhysicalDevices`)
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
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
The solution I had to apply is the following by performing these actions from this video: https://www.youtube.com/watch?v=0HdHE_sq7dw
Related to https://github.com/godotengine/godot/issues/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
Related to #57396.
I don't think there's anything we can do about this. Setting
DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1
to1
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.
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).
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 withoutDISABLE_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
and this is without the DISABLE_LAYER_AMD_SWITCHCHABLE_GRAPHICS_1
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.
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.
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.
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.
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?
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 :))
I have tried alpha 10 but the error persists.
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.
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.
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.
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.
I have done an update of the latest driviers of the radeon integrated graphics and the amd just install the necessary drivers without doing a minimal installation nor a full installation when I have done this suddenly I have noticed an improvement and I am not failing the godot or shows any error when it boots it does it directly from the rtx.
I give for my part solved the problem I think it was probolema of amd and its drivers.
if someone fails to check this as shown on screen in drivers only and this should not fail or at least it does not fail me
The main problem here isn't whether or not this works for developers. There are workarounds. The important question is: will someone who wants to play (or even buy) a game made with Godot run into this issue? Will they be willing to take any additional steps to make that one particular game work? Keep in mind that making changes to one's setup like setting environment variables isn't something everyone is familiar with and updating a graphics driver can even cause additional issues if the new version is bugged in any way.
I didn't have this problem with anything but Godot so far. So if I had first encountered this issue with a game instead, I'd blame it on the game. And I guess that's what others will do as well. And they might write angry reviews that will stop potential players (or customers) from buying the game.
The important question is: will someone who wants to play (or even buy) a game made with Godot run into this issue?
Yes, as this issue affects both the editor and exported projects. We don't know a definitive way to fix this, and contributors work on a best-effort basis. Also, 4.0 is still in alpha stage currently and isn't meant for use in production.
I know. The point of my post was just to make sure this issue isn't closed accidently as being solved. I agree that it isn't really urgent to fix it.
I have done an update of the latest driviers of the radeon integrated graphics and the amd just install the necessary drivers without doing a minimal installation nor a full installation when I have done this suddenly I have noticed an improvement and I am not failing the godot or shows any error when it boots it does it directly from the rtx.
I give for my part solved the problem I think it was probolema of amd and its drivers.
Installing the latest AMD drivers fixed this for me as well. Windows 11, AMD Ryzen 7 5800H with Radeon Graphics, NVIDIA GeForce RTX 3060.
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
Update AMD Radeon diver can solve this problem
If any of you can still reproduce the issue, please test https://github.com/godotengine/godot/pull/73450 locally. A Windows build is included in that PR's description.
Update AMD Radeon diver can solve this problem
confirmed here : R7 4800H GTX 1650
got the driver from AMD website
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!!!
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"
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!
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.