-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Panic on Linux Wayland #367
Comments
I'm well aware, so I just raised an issue in KAS after I tried the wgpu's example. I also tried to check the code of KAS, but I couldn't find any difference from the demo I wrote myself. If I have to say something different, it may be this:
I set compatible_surface to Some(&surface) instead of None, because that would cause |
Doing the same in KAS is awkward because the adapter is shared and created before any surface or window. It's not immediately clear how to solve this — delay construction of the adapter, or perhaps changes to wgpu are required? |
Because it panics at surface.configure, I’m actually not sure if it’s an error caused by compatible_surface (even though it does panic in my demo) |
Now that I've identified the culprit as
|
It's not "shared", it's simply a hint of the last known value. The window's target size must be specified when constructing it, which can only be calculated with a known scale factor (unless you use Wayland's method of scaling up from an "unscaled size" which requires re-sizing and isn't quite accurate). Both options are rough hacks. So it looks like your issue may be solvable by delaying |
I guess there are two lessons out of this:
|
Since I'm new to rust, if you solve this problem, please also tell me how, I'd like to learn! |
@Tim-Paik from what I understand:
I don't exactly understand what this message means; it could be due to the Could you please set |
I do use a notebook with dual graphics cards, but I haven't installed software like optimus-manager. I tried using other backends in my demo above, and it turns out that the reason for using GL is simple: everything else will panic When I set KAS_BACKENDS to GL, things start to change:
I tried to get it in my demo, in wgpu::PresentMode, AutoNoVsync/AutoVsync/Fifo can run normally (GL backend) I tried changing this to Fifo: kas/crates/kas-wgpu/src/window.rs Line 141 in 3c41cc9
then
|
I used Mailbox to work around a different bug, but probably Fifo is the better supported mode.
No idea what that is... But, did you see my previous question about tweaking |
Among other parameters, alpha_mode seems to only support [Opaque] (Auto) , format supports [Rgba8UnormSrgb, Bgra8UnormSrgb, Rgba16Float], usage only supports RENDER_ATTACHMENT. If you want to use Mailbox, can AutoNoVsync solve that problem? |
These are what KAS uses anyway.
This was selected to work around a bug; |
command:
I extracted some logs that may be useful:
System: Archlinux
DE: GNOME + Wayland
If anything else is needed, I'm happy to provide it
The text was updated successfully, but these errors were encountered: