Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] sway background problems
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Fri Jul 01, 2022 12:04 am    Post subject: [SOLVED] sway background problems Reply with quote

Hi, I'm running Sway.

Sometimes it wouldn't load wallpapers chosen randomly from a folder, so I checked the log:

Code:
2022-06-30 20:59:07 - [swaybg-1.1.1/background-image.c:44] Failed to read background image: out of memory.
Sway was compiled without gdk_pixbuf support, so only
PNG images can be loaded. This is the likely cause.


I checked and I have jpeg in my USE flags on /etc/portage/make.conf:

Code:
USE="elogind -systemd swaybar wayland X xorg dbus hwaccel jpeg git ssh threads persist postproc cups text bluetooth icu nss pulseaudio minizip -kde gui curl gnuplot opengl readline vulkan googledrive cairo egl pdf acpi alsa speex v4l lua screencast x264 npm gtk3 -doc udev -networkmanager pipewire truetype"


I also created the file /etc/portage/package.use/sway with

Code:
gui-wm/sway -swaybar swaybg swayidle swaylock swaymsg tray wallpapers X


After running doas emerge -auDN @world and rebooting the problem persists.

Any clue on why is this happening?


Last edited by sicr0 on Fri Jul 01, 2022 9:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1439
Location: Earth

PostPosted: Fri Jul 01, 2022 12:45 am    Post subject: Reply with quote

Quote:
Sway was compiled without gdk_pixbuf support, so only

the message is a good hint:

from my sway emerge logs:

Found pkg-config: /usr/bin/x86_64-pc-linux-gnu-pkg-config (1.8.0)
Run-time dependency json-c found: YES 0.16
Run-time dependency libpcre2-8 found: YES 10.40
Run-time dependency wayland-server found: YES 1.20.93
Run-time dependency wayland-client found: YES 1.20.93
Run-time dependency wayland-cursor found: YES 1.20.93
Run-time dependency wayland-egl found: YES 18.1.0
Run-time dependency wayland-protocols found: YES 1.25
Run-time dependency wlroots found: YES 0.16.0-dev
Run-time dependency xkbcommon found: YES 1.4.1
Run-time dependency cairo found: YES 1.16.0
Run-time dependency pango found: YES 1.50.7
Run-time dependency pangocairo found: YES 1.50.7
Run-time dependency gdk-pixbuf-2.0 found: YES 2.42.8
Run-time dependency pixman-1 found: YES 0.40.0
Run-time dependency glesv2 found: YES 3.2
Run-time dependency libevdev found: YES 1.12.1
Run-time dependency libinput found: YES 1.20.1
Run-time dependency xcb found: YES 1.15
Run-time dependency libdrm found: YES 2.4.111
Run-time dependency libudev found: YES 250
Run-time dependency bash-completion found: YES 2.11
Run-time dependency fish found: YES 3.5.0-55-g80fe0a7fc-dirty

emerge x11-libs/gdk-pixbuf and re-emerge gui-wm/sway

greetings
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Fri Jul 01, 2022 12:51 am    Post subject: Reply with quote

From the ebuild:
gui-wm/sway/sway-1.7.ebuild:
    25  DEPEND="
    36      swaybar? ( x11-libs/gdk-pixbuf:2 )
    45      wallpapers? ( x11-libs/gdk-pixbuf:2[jpeg] )
    72      local emesonargs=(
    76          $(meson_feature swaybar gdk-pixbuf)
From that, I would conclude that if you set USE=-swaybar, you may be disabling gdk-pixbuf support. Your error message suggests that you want gdk-pixbuf, so you should not set USE=-swaybar.
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Fri Jul 01, 2022 3:51 am    Post subject: Reply with quote

Hi Hu, so I changed my /etc/portage/make.conf] and /etc/portage/package.use/sway to

Code:
USE="elogind -systemd wayland X xorg dbus hwaccel jpeg git ssh threads persist postproc cups text bluetooth icu nss pulseaudio minizip -kde gui curl gnuplot opengl readline vulkan googledrive cairo egl pdf acpi alsa speex v4l lua screencast x264 npm gtk3 -doc udev -networkmanager pipewire truetype"


Code:
gui-wm/sway swaybar swaybg swayidle swaylock swaymsg tray wallpapers X


So now I have swaybar flag activated as you said I should but the problem is still present
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Fri Jul 01, 2022 3:53 am    Post subject: Reply with quote

CooSee, I emerged that package and rebooted but to no avail
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Fri Jul 01, 2022 9:33 am    Post subject: Reply with quote

swaybg-1.1.1 has a gdk-pixbuf use flag, that is not set on by default.

I'm pretty sure the original message had nothing to do with sway per se, even though it said sway, it should have read swaybg.

With a quick check

Code:
/tmp/swaybg-master $ grep -rB1 -A2 compiled
background-image.c-#if !HAVE_GDK_PIXBUF
background-image.c:            "\nSway was compiled without gdk_pixbuf support, so only"
background-image.c-            "\nPNG images can be loaded. This is the likely cause."
background-image.c-#endif // !HAVE_GDK_PIXBUF

_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1439
Location: Earth

PostPosted: Fri Jul 01, 2022 1:11 pm    Post subject: Reply with quote

Anon-E-moose wrote:
swaybg-1.1.1 has a gdk-pixbuf use flag, that is not set on by default.

I'm pretty sure the original message had nothing to do with sway per se, even though it said sway, it should have read swaybg.

With a quick check

Code:
/tmp/swaybg-master $ grep -rB1 -A2 compiled
background-image.c-#if !HAVE_GDK_PIXBUF
background-image.c:            "\nSway was compiled without gdk_pixbuf support, so only"
background-image.c-            "\nPNG images can be loaded. This is the likely cause."
background-image.c-#endif // !HAVE_GDK_PIXBUF


seems about right - never thought of that, because i always use the same backround anyway https://0x0.st/oQzo.png :lol:

please add gdk-pixbuf to your make.conf and emerge @world

greetings
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
sicr0
Apprentice
Apprentice


Joined: 23 Mar 2022
Posts: 179

PostPosted: Fri Jul 01, 2022 9:35 pm    Post subject: Reply with quote

Thanks CooSee! That fixed it
Back to top
View user's profile Send private message
CooSee
Veteran
Veteran


Joined: 20 Nov 2004
Posts: 1439
Location: Earth

PostPosted: Fri Jul 01, 2022 10:07 pm    Post subject: Reply with quote

you're welcome :D

and also thanks @Anon-E-moose

greetings
_________________
" Die Realität ist eine Illusion, die durch Mangel an ehrlicher Kommunikation entsteht "
---
" Der Mensch ist von Natur aus neugierig, was am Ende übrig bleibt ist die Gier "
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum