LGFae / swww

A Solution to your Wayland Wallpaper Woes
GNU General Public License v3.0
2.38k stars 70 forks source link

Consistent swww-daemon crashing after ~20 minutes [Hyprland] #310

Closed shinobiultra closed 6 months ago

shinobiultra commented 6 months ago

I've ran the swww-daemon -f xrgb in terminal to get the output and upon crashing it output this:

1233869ms [INFO]  (animation) BumpPool with: 305 buffers. Size: 2101640Kb
Protocol error 1 on object wl_shm_pool@15: Shrinking a pool (2145024000 to -2142887296) is forbidden
thread 'main' panicked at daemon/src/main.rs:187:25:
Protocol error 1 on object wl_shm_pool@15: Shrinking a pool (2145024000 to -2142887296) is forbidden
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 1233891ms [INFO]  (main) Removed socket at "/run/user/1000/swww-wayland-1.socket"

[1]  + 377804 exit 101   swww-daemon -f xrgb

I have 3 monitors (main 3440x1440@144), Arch Linux, nvidia-dkms (RTX 2060S), i5 14600K, absolutely cutting edge hypr{land-git,picker-git,...} (compiled with GCC -O3 -{march,mtune}=native -flto don't judge meeee it works tho!)

Any idea what might be happening there? Seems like there's some overflow of some growing buffer ("pool" I guess?)? No idea how that works, but if I could help with any coding (hope you have your electricity back tho!) I can try.

P.S. Upon launching the daemon, I get these weird errors:

      80ms [INFO]  (transition) BumpPool with: 1 buffers. Size: 6890Kb                                                                                                                                                                                                                                              
      81ms [INFO]  (transition) BumpPool with: 1 buffers. Size: 8100Kb
      93ms [INFO]  (transition) BumpPool with: 1 buffers. Size: 19350Kb
     157ms [ERROR] (animation) failed to unpack frame: buf has len 8294400, but expected len is 7056000
     159ms [ERROR] (animation) failed to unpack frame: buf has len 19814400, but expected len is 7056000
     365ms [INFO]  (animation) BumpPool with: 2 buffers. Size: 13781Kb80ms [INFO]  (transition) BumpPool with: 1 buffers. Size: 6890Kb                                                                                                                                                                                                                                              
LGFae commented 6 months ago

hope you have your electricity back tho!

Thanks! We've had a rough couple of weeks, but everything is fine for now!

Try running swww clear-cache and see if that helps. We've changed the format of some of our IPC mechanisms in master, and your cache might still have the old ones.

Even if that fixes the crash, I will have to ask you to also check that the BumpPool isn't really making more than, like, 3 buffers top. with 305 buffers we are literally using 2GB of memory.

shinobiultra commented 6 months ago

hope you have your electricity back tho!

Thanks! We've had a rough couple of weeks, but everything is fine for now!

Try running swww clear-cache and see if that helps. We've changed the format of some of our IPC mechanisms in master, and your cache might still have the old ones.

Even if that fixes the crash, I will have to ask you to also check that the BumpPool isn't really making more than, like, 3 buffers top. with 305 buffers we are literally using 2GB of memory.

Seems to be working so far! In case of an issue I'll report again. BumpPool seems to stay at 3, max of 4 temporarily.

LGFae commented 6 months ago

Nice! I've bumped up the master version, so that it wouldn't try to load the cache with an older version. I'll close this for now. Feel free to reopen it if the issue comes back.

shinobiultra commented 5 months ago

Hey there, so I am not sure whether it's related but I suppose so, so I'm reopening this weird swww crash issue.

Now, weirdly, after a bit of swww-daemon --format xrgb running, the monitors (I've got 3) get out of sync and what's more annoying, the wallpapers (I use animated gifs from waneella start overlapping randomly (see the screenshots of two of my monitors for both being out of sync and overlapping wallpapers).

swappy-20240602-155556 swappy-20240602-155602

Do you happen to have anything I could try / provide to help debug this issue? Should I start a new issue or is there any related one I just blindly missed?

Any help appreciated. No matter these issues (this happens after 20min or 1 hour or few hours sometimes, and restarting the daemon fixes it) I still enjoy swww dearly!

Cheers

P.S. I am not sure how to reopen the issue lol, sorry for incompetence :smile:

LGFae commented 5 months ago

Thanks for the kind words!

I think this should be a separate issue. We can try figuring this out there.