swaywm / swaybg

Wallpaper tool for Wayland compositors
MIT License
490 stars 31 forks source link

swaybg crashes when connecting/disconnecting external monitor #47

Closed cristobaltapia closed 1 year ago

cristobaltapia commented 1 year ago

Hi, I am experiencing a problem with swaybg each time that I plug or unplug an external monitor. The background images simply disappear. If I run swaybg in the terminal I get the following output (with both monitors):

$ swaybg -c "#ff0000"
2022-11-07 21:15:53 - [swaybg-1.1.1/main.c:340] Found config * for output DP-1 (Dell Inc. DELL P2219H 9Y3B8W2)
2022-11-07 21:15:53 - [swaybg-1.1.1/main.c:340] Found config * for output eDP-1 (Sharp Corporation 0x1421 0x00000000)
Bus error (core dumped)

... and with one monitor only:

$ swaybg -c "#ff0000"
2022-11-07 21:29:06 - [swaybg-1.1.1/main.c:340] Found config * for output eDP-1 (Sharp Corporation 0x1421 0x00000000)
Bus error (core dumped)

I am using Archlinux. Swaybg version is 1.1.1

How can I get more useful information for debugging?

cristobaltapia commented 1 year ago

It turned out to be a problem with one of the tmpfs being 100% full (/run/user/1000). After assigning more RAM to it, all my problems disappeared :) .

Sorry for bothering. Closing now.

mstoeckl commented 1 year ago

It turned out to be a problem with one of the tmpfs being 100% full (/run/user/1000). After assigning more RAM to it, all my problems disappeared :) .

Nevertheless, thank you for reporting this and identifying the cause. As of commit 848ff54d37359a636078d6b6c6c815bf49bdbce4, swaybg now uses a different way of allocating buffers so that even if /run/user/1000 is full, swaybg will continue to work.