You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can anyone help me? When trying smallvil, I found issues in winit.rs
I started a new project with cargo, copied smallvil files, and used this config:
[dependencies]
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
bitflags = "2.2.1"
[dependencies.smithay]
version = "^0.5"
The code runs fine in smithay's project, but in mine, winit.rs shows errors at line 71:
let (renderer, mut framebuffer) = backend.bind().unwrap();
I noticed different bind implementations in the two files.
So I changed:
let (renderer, mut framebuffer) = backend.bind().unwrap() -> let renderer = backend.renderer();
And removed &mut framebuffer in render_output.
There's also a warning about std::env::set_var("WAYLAND_DISPLAY", &state.socket_name) being unsafe, so I wrapped it in unsafe. Now the code runs, but has issues during execution.
2025-03-17T13:05:33.103260Z INFO input_seat{name="winit"}:add_keyboard{xkb_config=XkbConfig { rules: "", model: "", layout: "", variant: "", options: None } repeat_delay=200 repeat_rate=25}:input_keyboard: smithay::input::keyboard: Initializing a xkbcommon handler with keymap query
2025-03-17T13:05:33.105145Z INFO input_seat{name="winit"}:add_keyboard{xkb_config=XkbConfig { rules: "", model: "", layout: "", variant: "", options: None } repeat_delay=200 repeat_rate=25}:input_keyboard: smithay::input::keyboard: Loaded Keymap name="English (US)"
2025-03-17T13:05:33.105726Z INFO smithay::wayland::socket: Created new socket name=Some("wayland-2")
2025-03-17T13:05:33.105837Z INFO backend_winit: smithay::backend::winit: Initializing a winit backend
2025-03-17T13:05:33.132439Z INFO backend_winit{window=102177032735168}: smithay::backend::egl::display: Successfully selected EGL platform: PLATFORM_WAYLAND_KHR
2025-03-17T13:05:33.135201Z ERROR backend_winit{window=102177032735168}: smithay::backend::egl::ffi: [EGL] 0x3004 (BAD_ATTRIBUTE) eglCreateSyncKHR: EGL_BAD_ATTRIBUTE error: In eglCreateSyncKHR: EGL_SYNC_NATIVE_FENCE_FD_ANDROID specified valid fd butEGL_SYNC_STATUS is also being set
2025-03-17T13:05:33.136257Z INFO backend_winit{window=102177032735168}: smithay::backend::egl::display: EGL Initialized
2025-03-17T13:05:33.136276Z INFO backend_winit{window=102177032735168}: smithay::backend::egl::display: EGL Version: (1, 5)
.....
.....
2025-03-17T13:05:33.176985Z INFO new{name="winit" physical=PhysicalProperties { size: Size<smithay::utils::geometry::Raw> { w: 0, h: 0 }, subpixel: Unknown, make: "Smithay", model: "Winit" }}: smithay::output: Creating new Output name="winit"
2025-03-17T13:05:33.177042Z INFO smithay::wayland::output: Creating new wl_output output="winit"
2025-03-17T13:05:33.178559Z ERROR backend_winit{window=102177032735168}:egl{platform="PLATFORM_WAYLAND_KHR" version=(1, 5)}:egl_context{ptr=102177034300577}:renderer_gles2: smithay::backend::renderer::gles: [GL] GL_INVALID_FRAMEBUFFER_OPERATION error generated. Operation is not valid because a bound framebuffer is not framebuffer complete.
thread 'main' panicked at /home/alvin/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/smithay-0.5.1/src/backend/winit/mod.rs:338:22:
submitting without ever binding the renderer.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failed to connect to Wayland display: No such file or directory
failed to create display: No such file or directory
I can't figure out the error reasons. Hope someone can help find the problem and guide me to fix it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Can anyone help me? When trying smallvil, I found issues in
winit.rsI started a new project with cargo, copied
smallvilfiles, and used this config:The code runs fine in smithay's project, but in mine, winit.rs shows errors at line
71:let (renderer, mut framebuffer) = backend.bind().unwrap();I noticed different bind implementations in the two files.
So I changed:
And removed
&mut framebufferinrender_output.There's also a warning about
std::env::set_var("WAYLAND_DISPLAY", &state.socket_name)being unsafe, so I wrapped it inunsafe. Now the code runs, but has issues during execution.I can't figure out the error reasons. Hope someone can help find the problem and guide me to fix it.
This is full code
Beta Was this translation helpful? Give feedback.
All reactions