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

Dispatch awaits indefinitely on other desktop environments #9

Open
jfroy opened this issue Jan 25, 2024 · 4 comments
Open

Dispatch awaits indefinitely on other desktop environments #9

jfroy opened this issue Jan 25, 2024 · 4 comments

Comments

@jfroy
Copy link

jfroy commented Jan 25, 2024

cosmic-randr list hangs on Arch with plasma 6 rc1. It seems to be because the context.dispatch().await does not return in async fn list.

    async fn list(&mut self, kdl: bool) -> Result<(), Box<dyn std::error::Error>> {
        let _res = self.context.dispatch(&mut self.event_queue).await;

In async fn main, event_queue.roundtrip consistently returned 54 on my system when I tested.

rustc 1.72.0 (5680fa18f 2023-08-23)

@richardmrodriguez
Copy link

I have noticed that cosmic-randr list also hangs when running on Pop! on Wayland (the GNOME shell Wayland session, not the COSMIC session).

@mmstick mmstick changed the title Hangs on Arch Linux + plasma 6 rc 1 Dispatch awaits indefinitely on other desktop environments Jan 26, 2024
@martyfuhry
Copy link

It hangs in COSMIC on Wayland, as well.

@wash2
Copy link

wash2 commented Nov 20, 2024

I believe it hangs at https://github.com/pop-os/cosmic-randr/blob/8d0938029f223016fde11aef4c5233ddbfdb2796/lib/src/lib.rs#L64C34-L64C50 or

event_queue.dispatch_pending(data)
when calling dispatch_pending. It could be a bug in wayland_client, or maybe a small usage mistake in cosmic-randr, but I'm not sure yet.

@wash2
Copy link

wash2 commented Nov 20, 2024

Ahh it's actually the tachyonix channel that seems to fill up and then a callback blocks on the send while dispatching. Increasing the channel size should fix the issue, or using an unbounded channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants