Closed Be-ing closed 1 year ago
When running Weston on a X11 system to create a Wayland server, this does run for me with a GeForce GTX 1060 and Nvidia 470.141.03 drivers.
What do you mean by "running Weston on an X11 system"? X applications can run in Wayland via XWayland, but I'm not aware of the other way around existing?
I did the following, the app then runs inside the weston window using wayland as the protocol. I don't think i have a working Wayland or XWayland on my machine to try though.
$ sudo apt install weston
$ weston
... another terminal ...
$ WAYLAND_DISPLAY=wayland-0 RUST_BACKTRACE=full SLINT_BACKEND=winit-femtovg cargo run -p memory
It's possible this does end up with different pixel format options though, like with QtWayland how you pick the QT_XCB_GL_INTEGRATION
and QT_WAYLAND_CLIENT_BUFFER_INTEGRATION
options etc.
I could reproduce the issue with the nvidia driver 515.76 on an RTX A4000. Removing the with_vsync calls in the context_factory_fn functions solved the issue for me.
This points at https://github.com/rust-windowing/glutin/issues/1444.
Thanks for digging into this @Nico264! I tested checking out the v0.29.1 tag of the glutin repository and adding .with_vsync(true)
to the example in this branch and can reproduce the panic:
glutin on nvidia_wayland_panic via 🦀 v1.64.0
❯ RUST_BACKTRACE=1 cargo run -p glutin_examples --example window
Finished dev [unoptimized + debuginfo] target(s) in 0.03s
Running `target/debug/examples/window`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NoAvailablePixelFormat', glutin_examples/examples/window.rs:12:91
stack backtrace:
0: rust_begin_unwind
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
2: core::result::unwrap_failed
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1814:5
3: core::result::Result<T,E>::unwrap
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1107:23
4: window::main
at ./glutin_examples/examples/window.rs:12:28
5: core::ops::function::FnOnce::call_once
at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
As noted in https://github.com/rust-windowing/glutin/issues/1444, glutin's API has been overhauled for the upcoming 0.30 release which I confirm does fix the bug. The example in glutin's master branch does set vsync and I do not get the error message running it with my nVidia GPU on Wayland. So the solution for Slint would be updating to glutin 0.30.0, which could start now with the 0.30.0-beta.2 release.
I’m hoping for a new glutin release on crates.io so that we can upgrade.
The 0.30.0-beta.2 release is on crates.io already. A Slint branch could be started using that, then hold off merging it until glutin 0.30.0 is released.
Thanks - I somehow missed that. Agreed on the branch.
Maybe you missed that because crates.io doesn't show prereleases without some digging. lib.rs does though.
Yes, I noticed the same yesterday. I'd like to port to that after our next release (in the coming days).
Is that the same as https://github.com/slint-ui/slint/issues/1507 ?
Is that the same as https://github.com/slint-ui/slint/issues/1507 ?
Looks like it.
First attempt at glutin port: https://github.com/slint-ui/slint/pull/1942
SLINT_BACKEND=winit-femtovg cargo run -p memory
works on KDE Wayland with an nVidia GPU now that #1942 was merged. Though there's some other bug affecting the memory example:
Before the tiles are clicked, the Slint logo is drawn small, but after being clicked the first time, they are rendered with the proper size.
using NVIDIA Corporation GA106 [GeForce RTX 3060 Lite Hash Rate] (rev a1) with proprietary nVidia driver akmod-nvidia-515.76-1.fc36.x86_64 with Linux 5.19.14-200.fc36.x86_64
This is not reproducible with the same hardware on X11.