-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
swaymsg waiting && sway 100% cpu usage #1152
Comments
Been running your command in a loop for a while, CPU usage seems nominal. Something else is probably the cause. |
I managed to reproduce the same issue after running it in a loop for about 10 minutes or so, also from the archlinux community version. Using #!/bin/bash
i=0
while true; do
echo "$i"
swaymsg -t get_tree > /dev/null
((i++))
done it freezes at 989, but does not cause any spike in CPU usage for me.
is spammed in sway's output. I tried with the master branch as well, and the same thing happens. |
Interesting, maybe the fds aren't closed properly. |
Does #1153 fix the problem for you? |
That fixes it, but I think the real issue is that client->fd is being set to -1 before the call to ipc_client_disconnect, so the cleanup functions in there aren't being called properly. |
Ah, good point. |
Fix dangling file descriptors (fixes #1152)
Hi, first of all thank for your cool work.
I'm using archlinux and using sway 0.12.1-1 from community,
so here the issue:
while I was trying to put the focused window title inside conky using swaymsg -t get_tree with an interval of 0.5sec it appear that after 4 to 5 min swaymsg does not respond anymore while sway get a 100% cpu usage.
this being the half working script used by conky
I don't know if using swaymsg this way is what I should do but since I can't use Xlib to get wayland window title and wayland does not allow me to see the focused window title, this is the only way I found.
The text was updated successfully, but these errors were encountered: