-
Notifications
You must be signed in to change notification settings - Fork 1.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
Enabling the wgpu feature results in a panic "The surface isn't supported by this adapter" #5269
Comments
I agree we shouldn't panic here. Maybe @Wumpf wants to take a look at some point? 🙏 |
yep, we definitely shouldn't crash and instead try to forward an error if needed As to actual source of the issue (and how to show it better): this might be a tricky one. This piece of log output seems to come directly from wayland
And searching for this a bit brings up people recommending to downgrade the nvidia driver from 560 to 555, e.g. here |
Is it possible to force Egui/eframe with wgpu to use xwayland as a test? Some environment variable perhaps? Also, vkcube and glxgears both work fine under Wayland with both Intel and nvidia graphics. This indicates to me that both basic platform APIs work (at least to some extent). So it seems like the issue could be on the wgpu side. |
Hmm yeah then it is probably something that wgpu could do different. There's unfortunately quite many wayland issues there that are waiting for contributors to look into (the maintainers either don't have local repro cases (that includes myself) or no high priority to look into these (most of the time both)). You could try with |
So uh, tried this again. It isn't happening any more (at least in hybrid mode, with and without Though according to As I'm on Arch Linux (which is rolling release) that could be from some update or other. In this case the only difference I can find is that I'm now on KDE Plasma 6.2.1 and Kernel 6.11.3. Mesa is the same version. I did not note down the nvidia driver version before, but now it is 560.35.03-16. |
Unsetting WAYLAND_DISPLAY does not make the program use X for some reason (program is not listed in output of Building eframe without the |
Aha, in pure Intel mode it still fails. That is interesting. If WGPU incorrectly uses the nVidia GPU when it is not supposed to (as indicated above, in hybrid mode) that could definitely cause issues. As the programs exits too quickly, it is hard to know. I tried to set a breakpoint to where it crashes and use nvidia-smi to see if anything was using the nVidia GPU at that point, but nvidia-smi comes up blank (so unclear). However, if I run |
Huh, strange why would docs fail for 0.29 Oo. They're up for 0.28 and the struct hasn't changed. Yes, indeed you should be able to adjust which gpu is choosen by changing the power_preference. |
Docs were fixed by this: #5204 But we'd need to make a new patch release for the docs to show up |
Setting There should be a way (either automatically by egui/eframe or by the application) to fall back to opengl if vulkan isn't working. Possibly this also means being able to fall back to glow if wgpu isn't working and you compiled in support for both. A prerequisite for this is to not panic though (I would rather not mess around with
I will try to look into that soon, I'm currently dealing with a rather nasty cold, so it may take a few days. |
Yeah I think that "this surface doesn't have any formats" should be an exclusion criteirum for an adapter. That ofc still leaves the separate issue of the surface mysteriously not advertising any formats. |
Unfortunately
I have not tested messing with this programatically. |
for reference, found this issue on |
Describe the bug
Enabling the
wgpu
feature causes the program to crash immediately at startup. This can be reproduced on thehello world
example even.The full backtrace is:
To Reproduce
Steps to reproduce the behavior:
examples/hello_world
directorywgpu
feature foreframe
inCargo.toml
cargo run
Expected behavior
Program should start without errors. Or at least not panic (return an Error instead). And that error should be less cryptic. (I'm not a GPU expert, I'm trying to make a simple GUI.).
I don't know what the error means, but it should probably select a suitable surface instead of an unsupported surface. Whatever a surface is in this context.
Screenshots
Desktop (please complete the following information):
prime-run
to run on the nVidia GPU).Additional context
The text was updated successfully, but these errors were encountered: