-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Windows 11 Unable to find a GPU (with workaround using DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1) #12739
Comments
Ok, even easier than manually setting that environment variable before fn main() {
set_var("DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1", "1");
App::new().add_plugins(DefaultPlugins)
.run();
} |
From PR that you linked:
Could you try updating drivers? |
As I mentioned I believe I already tried that at the time, but I'll try again when I get home after work today. |
Also without this flag I have graphical artifacts in full screen games. And windowed games aren't starting. But looks like I have driver from windows update, not from AMD. |
Windows update usually contains official drivers from AMD or Nvidia. They're not Microsoft drivers. OEMs work with Microsoft to have their drivers included in Windows Update so their users don't have to manually update anything and they get a seamless experience (which, on my laptops, is actually true most of the time). |
It usually have dated versions of Drivers. And my adrenalin software was telling me that I have wrong version. I've reinstalled driver from official package, and now Bevy games are starting no problem without this ENV variable. But I guess it still would be nice to port workaround from godot. Or add it as retry if regular detection fails. |
I think it would be best if Bevy's function Or dev is supposed to use And on Linux also if app was launched from menu it won't have terminal. But I'd suggest letting app developer handler error and provide inside Bevy's API some helper functions to show Message Box in platform independent way would be nice. |
I assume that we need to but it sound hacky either way. Sadly I'm unable to find any documentation about this variable in the internet. I guess only source of knowledge would be opensource Linux AMD drivers |
That's plausible, but unlikely given how undocumented this switch is.
I disagree. It's just configuring the Vulkan system to actually inform us of the real GPUs instead of pretending there's only one. Ok so maybe it's a little hacky, but only slightly, especially if we respect any user-specified settings.
Is it a driver thing or a Vulkan thing? I just assumed it was a Vulken-specified switch implemented in the driver, in which case the Vulkan docs/spec should give some info. But I haven't looked. |
Bevy version
0.13.1
[Optional] Relevant system information
cargo 1.79.0-nightly (d438c80c4 2024-03-19)
OS: Windows 11 Version 10.0.22631 Build 22631
CPU: AMD Ryzen 5 4600H
GPU: GTX 1660 Ti
Device: 2021 Omen 15 gaming laptop (15-en0016ax)
What you did
cargo run
What went wrong
Additional information
I previously had this same issue with Godot 4.0 (because they switched to a Vulkan renderer). Eventually I found somewhere that doing
set DISABLE_LAYER_AMD_SWITCHABLE_GRAPHICS_1=1
before running Godot made it work. I have no idea what that variable does or why it works. On a whim I decided to try it with Bevy as well and lo and behold it works also. So I guess it must be a Vulkan variable then? Very strange.I believe I got my drivers up-to-date when I had this issue with Godot, but I'll check after I get home from work today.
The problem no longer occurs for me with newer versions of Godot. It seems maybe they're just setting that environment variable automatically on Windows. One of their graphics programmers said that flag simply causes the GPUs to present separately instead of combined into one switchable one.
The text was updated successfully, but these errors were encountered: