-
Notifications
You must be signed in to change notification settings - Fork 943
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
Intel vulkan adapter is marked cannot present in intel-only prime mode. #2129
Comments
This was recently added in d48bc62. |
On my laptop, the intel GPU is the primary one to which all the displays are connected. xrandr lists 0 outputs for the nvidia device:
|
I think that IF wgpu is the right place to fix it, the change to make is to gate the workaround on both the optimus layer AND the presence of an nvidia GPU. It also likely should be gated on driver version once there's an upstream fix. It looks like there's a "partial" fix that landed in mesa 21.1.0, but my laptop is still on 21.0.3 Gating the workaround on the presence of an nvidia GPU would give us the following cases: prime intel only
prime on-demand
prime nvidia only
Bevy should work in all case with that change, since it request a HighPerformance device. There's still a bevy bug that it doesn't request surface compat even though it should. Making wgpu fail less-often in that case is a workaround in some ways. |
Checking both criteria sounds fine to me. |
Looks like this got fixed in 28ba9d8 |
Description
The Optimus detection code relies only on the presence of the optimus Vulkan layer. When this layer is found, the intel adapter is marked as unusable to present surfaces. This is incorrect when prime is in intel-only or on-demand mode, as in those cases the intel adapter is absolutely the correct adapter.
This causes the examples (which request surface compatibility) to fall back to OpenGL mode. In code which doesn't specifically request surface compatibililty, like Bevy, this causes the application to panic when attempting to set up the swap chain.
Platform
Ubuntu 20.04 (vendor-installed) on a Dell precision 3551. Prime is in intel-only mode.
The text was updated successfully, but these errors were encountered: