-
Notifications
You must be signed in to change notification settings - Fork 969
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
Issues with Linux + NVIDIA Optimus with dedicated displays (Reverse Prime) #1215
Comments
Thank you for filing such a detailed issue!
Selecting an ICD is the job of Vulkan Loader, not wgpu. We are just using whatever the loader shows us. So this sounds like a system configuration issue to me, rather than a library issue?
This is definitely undesired. What kind of crash is it? |
Same problem, it says vkcube: SYSTEM: Arch Linux GNOME (Wayland) PS: vkcube is running in xwayland mode, but it works |
This was a driver issue that we worked around in #1898. The Nvidia GPU should now get picked over the Intel one. |
@Tim-Paik please open a new issue since I think we've dealt with this one.
As far as I know, Reverse Prime doesn't work on Wayland.
Please try |
Yep, you're right, it's an upstream bug. Thanks for the reminder, vkcube-wayland doesn't work either |
Description
So on Linux with Optimus capable laptops there are 2 providers for Vulkan:
vulkan-intel
nvidia-utils
Issue here is that when using external monitors, I am using the NVIDIA GPU. When I am using only my laptops display, the NVIDIA GPU is turned off and therefore only the Intel GPU is active. This causes some unique behavior under the following circumstances:
If Vulkan-intel is installed AND I am plugged into an external monitor (NVIDIA GPU active), wgpu will attempt to load the Intel Vulkan provider when the rendering GPU is actually the NVIDIA one, causing a white screen followed by a crash.
If Vulkan-intel is NOT installed, and NVIDIA GPU is OFF, starting a wgpu application throws GraphicsAdapterNotFound.
NOTE: It is impossible to remove the nvidia-utils package on Arch Linux as it is a dependency of the NVIDIA driver. Where as the vulkan-intel package is an optional extra for Intel GPUs.
Repro steps
The following MUST be done on a a system with NVIDIA Reverse prime (External monitors connected directly to the NVIDIA GPU, with Intel GPU driving the internal laptop display)
Expected vs observed behavior
Simply put, the only step theoretically needed would be to check if the Intel and NVIDIA Vulkan providers are both installed, and pick the NVIDIA provider rather than the Intel one if the NVIDIA GPU is active in the system. This way, both the Intel and NVIDIA Vulkan providers can co-exist.
There is a way to do this with environment variables, however it is a bit messy.
Platform
OS: Arch Linux
System: Razer blade 2018 (Intel UHD630 + GTX 1060 Maxq)
X11 session (No Wayland)
The text was updated successfully, but these errors were encountered: