Skip to content
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

GUI freezes upon interacting with a widget under Wayland #2297

Closed
2 tasks done
Dirleye opened this issue Feb 26, 2024 · 8 comments
Closed
2 tasks done

GUI freezes upon interacting with a widget under Wayland #2297

Dirleye opened this issue Feb 26, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@Dirleye
Copy link

Dirleye commented Feb 26, 2024

Is there an existing issue for this?

  • I have searched the existing issues.

Is this issue related to iced?

  • My hardware is compatible and my graphics drivers are up-to-date.

What happened?

Moving the cursor over a widget freezes the application, which I then have to manually close.
This is a desktop application using default settings other than a custom window size, though the example programs behave the same way.
I'm using an Nvidia GPU with the latest drivers. Setting std::env::set_var("WINIT_UNIX_BACKEND", "x11"); to force XWayland worked with Iced 0.10, but now has no effect.

I would appreciate guidance on where to look to find the route of this issue.
Thank you.

What is the expected behavior?

Application runs without freezes.

Version

crates.io release

Operating System

Linux

Do you have any log output?

No response

@Dirleye Dirleye added the bug Something isn't working label Feb 26, 2024
@Dirleye
Copy link
Author

Dirleye commented Feb 26, 2024

This is definitely an Nvidia issue as it works with lavapipe for Vulkan software rendering, though this introduces a load of its own unrelated issues.
I'm still not sure where to go to follow this up though.

@GenericConfluent
Copy link

I ran into this earlier today, also being on Wayland with NVIDIA. I decided to do some debugging and this is not an issue with iced, it's a winit problem. Which I confirmed by writing a short test exec with winit and wgpu (I tested with both Hyprland and river).

It seems to be related to the CursorLeft event but I don't know why (except it's not like the iced apps work as long as the cursor is in the window when it starts, iced is frozen from the beginning). Stuff seems to work fine so long as the cursor is sitting within the bounds of the window, after that the event loop freezes and you can't close the window normally (make sense since not event processing is happening). The issue may have come as a result of EventLoop 3.0 Changes but that's just a guess on my part, since my experience with winit is limited.

It also doesn't look like there is an issue open for this yet.

@GenericConfluent
Copy link

This can be fixed by moving to a more recent commit of winit. The crates.io version is insufficient.

@blueOkiris
Copy link

blueOkiris commented Mar 21, 2024

Neither updating winit nor wgpu is working for me.
I'm on Nvidia 550, but still they don't work.

Using:
winit = { git = "https://github.com/rust-windowing/winit.git", branch = "master" }
wgpu = { git = "https://github.com/gfx-rs/wgpu.git", rev = "744454b9e2eff65cd14dea7c456f2cbd5e7bcd5f" }

Tho this is one commit back bc the current latest wgpu commit upgrades web-sys, so you can't use that one w/ latest iced yet

@ids1024
Copy link
Contributor

ids1024 commented Mar 22, 2024

Are you on the 550.67 driver that was released a couple days ago, or an earlier 550 driver?

https://www.nvidia.co.uk/download/driverResults.aspx/223635/en-us mentions "Fixed a bug that caused wgpu applications to hang on Wayland".

@blueOkiris
Copy link

blueOkiris commented Mar 22, 2024

Ah that's probably it. I updated to 550, but only 550.54. I'll see if I can get the latest on my distro (NixOS)
EDIT: I can. I'll update and see if that fixes the issue.

@Dirleye
Copy link
Author

Dirleye commented Mar 22, 2024

This is indeed fixed with the 550.67 driver for me.
@blueOkiris if it's working well for you too I'll close?

@Dirleye
Copy link
Author

Dirleye commented Mar 27, 2024

I'll assume it's all good now, thanks for the help everyone.

@Dirleye Dirleye closed this as completed Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants