godot icon indicating copy to clipboard operation
godot copied to clipboard

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

Open fonixgm opened this issue 3 years ago • 27 comments


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 avatar Feb 06 '22 14:02 fonixgm

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

fonixgm avatar Feb 06 '22 14:02 fonixgm

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

Calinou avatar Feb 06 '22 14:02 Calinou

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.

fonixgm avatar Feb 06 '22 14:02 fonixgm

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).

bruvzg avatar Feb 06 '22 14:02 bruvzg

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

fonixgm avatar Feb 06 '22 14:02 fonixgm

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.

bruvzg avatar Feb 06 '22 15:02 bruvzg

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.

fonixgm avatar Feb 06 '22 15:02 fonixgm

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.

ChristianB84 avatar Apr 11 '22 12:04 ChristianB84

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.

Mikadini avatar Apr 16 '22 11:04 Mikadini

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?

Calinou avatar Jun 17 '22 10:06 Calinou

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 :))

akien-mga avatar Jun 17 '22 10:06 akien-mga

I have tried alpha 10 but the error persists.

image

fonixgm avatar Jun 17 '22 10:06 fonixgm

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.

Ramedes avatar Jun 19 '22 18:06 Ramedes

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.

Calinou avatar Jun 19 '22 19:06 Calinou

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.

Ramedes avatar Jun 19 '22 21:06 Ramedes

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.

ChristianB84 avatar Jul 09 '22 14:07 ChristianB84

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.

fonixgm avatar Aug 06 '22 22:08 fonixgm

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 Screenshot 2022-08-07 001403

fonixgm avatar Aug 06 '22 22:08 fonixgm

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.

ChristianB84 avatar Aug 07 '22 20:08 ChristianB84

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.

Calinou avatar Aug 07 '22 21:08 Calinou

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.

ChristianB84 avatar Aug 08 '22 16:08 ChristianB84

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.

lmReef avatar Sep 21 '22 20:09 lmReef

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

arocull avatar Sep 24 '22 15:09 arocull

Update AMD Radeon diver can solve this problem

Redwarx008 avatar Sep 30 '22 21:09 Redwarx008

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.

Calinou avatar Feb 16 '23 18:02 Calinou

Update AMD Radeon diver can solve this problem

confirmed here : R7 4800H GTX 1650

got the driver from AMD website

MonT97 avatar Mar 02 '23 06:03 MonT97

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!!!

abderman avatar Mar 06 '23 10:03 abderman

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"

yarre-uk avatar Apr 17 '23 11:04 yarre-uk

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!

snailrhymer avatar May 14 '23 21:05 snailrhymer

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.

TATAPNHOB avatar Jul 02 '23 11:07 TATAPNHOB