Wry cannot create windows on Arch Linux with Nvidia
Describe the bug
Wry cannot properly create windows on my machine. When using Wayland, wry logs with a wayland protocol error and then aborts. When using X11, either natively or via xwayland, Wry logs a "failed to create GBM buffer" error and shows a window containing a white screen.
Steps To Reproduce
Checkout wry-v0.43.1 and run cargo run --example simple or env GDK_BACKEND=x11 cargo run --example simple
Expected behavior
The window should be created and its contents visible.
Screenshots Wayland:
warning: method `try_register_uri_scheme` is never used
--> src/webkitgtk/web_context.rs:122:6
|
105 | pub trait WebContextExt {
| ------------- method in this trait
...
122 | fn try_register_uri_scheme<F>(&mut self, name: &str, handler: F) -> crate::Result<()>
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: `wry` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 36.11s
Running `target/debug/examples/simple`
Gdk-Message: 08:48:07.371: Error 71 (Protocol error) dispatching to Wayland display.
X11 and XWayland:
warning: method `try_register_uri_scheme` is never used
--> src/webkitgtk/web_context.rs:122:6
|
105 | pub trait WebContextExt {
| ------------- method in this trait
...
122 | fn try_register_uri_scheme<F>(&mut self, name: &str, handler: F) -> crate::Result<()>
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: `wry` (lib) generated 1 warning
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.10s
Running `target/debug/examples/simple`
Failed to create GBM buffer of size 800x600: Invalid argument
Platform and Versions (please complete the following information): OS: Arch Linux Rustc: 1.81.0 Desktop Env: Plasma 6.1.5 and Gnome 47.0.1 webkit2gtk: 2.46.0 nvidia: 560.35.03
Additional context
Tauri issue: https://github.com/tauri-apps/tauri/issues/10702
The WEBKIT_DISABLE_DMABUF_RENDERER fix works.
Seems like an issue with webkit2gtk since I get the exact same error when running their MiniBrowser for version 4.1.