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

Failed to receive answer: io error: Resource temporarily unavailable (os error 11) when plugging or unplugging display #26

Closed
quexten opened this issue Sep 14, 2022 · 6 comments · Fixed by #43
Labels
bug Something isn't working

Comments

@quexten
Copy link

quexten commented Sep 14, 2022

I'm running swww version 0.4.3 on Arch, using Sway as the compositor.
Running sway init and then setting an image as the background works, when using my laptop display alone, or using my laptop's display plus an external display that is plugged in.

However, when the swww daemon is running and I plug / unplug the display, the daemon gets into a state where it can not be communicated with.

Setting the background with:
swww img --transition-speed=1 --transition-step=1 ~/Pictures/my_wallpaper.png
results in:
Failed to receive answer: io error: Resource temporarily unavailable (os error 11)

Running swww kill results in the same error.

I can only get it running again by killing the process, and removing the socket manually.

@quexten
Copy link
Author

quexten commented Sep 15, 2022

I did a bit more investigation and, after adding a new display, a debug output gets printed:
(main) swww::daemon: New background with output: OutputInfo {...}

The process (in no-daemon mode) seems to be stuck in a syscall.
Specifically, this is the output of strace:
futex(0x55ba5a44f070, FUTEX_WAIT_BITSET_PRIVATE, 2, NULL, FUTEX_BITSET_MATCH_ANY

@LGFae
Copy link
Owner

LGFae commented Sep 21, 2022

Hello. Thanks for the detailed report!

Really sorry for the time it took me to respond. Unfortunately, I am still really full of stuff for this and next week, so it might take a while until I have a more thorough look at this. I do want to solve it as fast as possible, since it must make using swww on a notebook you carry around to plug in other monitors a pain.

@Matias-Hall
Copy link

Matias-Hall commented Sep 29, 2022

I managed to get a stack trace of the daemon before and after unplugging the monitor. It confirms the fact that it hangs at a futex syscall.

Normal stack trace
Stack trace after unplugging monitor

Ps. Also using Arch with Sway as the compositor.

@a-priestley
Copy link

I'm having this issue, but for me it happens when my system idles. Using swayidle, I'm calling for my monitor to go into power-saving mode.
This seems to be in line with what you all are describing with plugging in additional monitors. Only for me, I'm effectively unplugging and plugging the existing monitor back in.

@quexten
Copy link
Author

quexten commented Oct 16, 2022

I tried the patch and it seems to work very nicely :)

@LGFae
Copy link
Owner

LGFae commented Oct 16, 2022

I tried the patch and it seems to work very nicely :)

Thanks for confirming! I always like to leave things running in my machine for a couple of days before merging, just to make sure nothing explodes when using it for real.

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

Successfully merging a pull request may close this issue.

4 participants