Closed adigitoleo closed 2 years ago
Occurs also on 5.16.1 and 5.15.13 kernels (had to rollback due to other issues).
There was an issue in the past where sway or wayfire would ask swaybg to redraw unnecessarily, but I forgot what caused it; dwl might have the same problem? Try running WAYLAND_DEBUG=1 swaybg -c #ff0000
and post the resulting logs, to see if this is the case for you.
Building swaybg from git might limit the cost of this problem, since the the commit 5e2df3a600e07b71923c28a8cd51861289319c91 avoids rerendering frames if nothing has changed.
Indeed, it seems to be redrawing and destroying something continuously.
The part between discarded [unknown]...
messages is continuously repeated afterwards. I'll grab the git HEAD and see if it helps.
The issue is solved on git master, both for a simple color and for images. Thanks for the help. If you have some hints on what might have caused the rerendering, I can take a look in dwl and maybe report this over there.
The fix for the sway+wlroots issue was: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3402 which landed in 0.15.0 . There was also the following sway PR, superseded by the wlroots change https://github.com/swaywm/sway/pull/6709 . It looks like the problem on sway was caused by the compositor assuming that the client had changed some significant surface property, when it had actually only resent the same value as before.
Have moved to sway at the moment due to fatal pageflip errors in dwl that I don't have time to debug right now. I'll close this and maybe look into it on the dwl side later, thanks for the info.
Swaybg started using up to 100% CPU after upgrading to wlroots 0.15.0-4
Also upgraded kernel:
Happens also after shutting down and restarting the swaybg process (with or without setsid). Doesn't seem to depend on the
-m mode
.I can make it happen with simple stuff like
swaybg -c #ff0000
(seems to be ~65%, rather than ~100% when using an image).I'm using the dwl compositor, I'll try on sway if I get a chance.
Output of the example, for reference: