hyprwm / hyprpaper

Hyprpaper is a blazing fast wayland wallpaper utility with IPC controls.
https://wiki.hyprland.org/Hypr-Ecosystem/hyprpaper/
BSD 3-Clause "New" or "Revised" License
761 stars 55 forks source link

Failed to read image file.png because of: out of memory #38

Closed mertoalex closed 1 year ago

mertoalex commented 1 year ago

OS: gentoo (kernel 6.1.1) GPU: NVIDIA GeForce 9600 GT (nouveau)

when I try to open hyprpaper after opening Hyprland, It gives this error

┌──(mertoalex㉿gentoocore2duo)-[~]
└─$ hyprpaper
[LOG] Welcome to hyprpaper!
built from commit 0c2386861afbb10c8c5eb6de868fa2a519df2907 (    add --no-fractional arg)
[CRITICAL] Failed to read image /home/mertoalex/wallpapers/desktop-1920x1080aaa.png because of:
out of memory

┌──(mertoalex㉿gentoocore2duo)-[~]
└─$ cat ~/.config/hypr/hyprpaper.conf                                                                                                                                                                                    1 ⨯
preload = /home/mertoalex/wallpapers/desktop-1920x1080aaa.png
wallpaper = DVI-I-1, /home/mertoalex/wallpapers/desktop-1920x1080aaa.png

┌──(mertoalex㉿gentoocore2duo)-[~]
└─$ hyprctl monitors
Monitor DVI-I-1 (ID 0):
        1600x900@60.000000 at 0x0
        description: BNQ BenQ VL2040Z K3E01744019 (DVI-I-1 via DVI-A)
        make: BNQ
        model: BenQ VL2040Z
        serial: K3E01744019
        active workspace: 2 (2)
        reserved: 0 0 0 0
        scale: 1.00
        transform: 0
        focused: yes
        dpmsStatus: 1

┌──(mertoalex㉿gentoocore2duo)-[~]
└─$ hyprctl hyprpaper preload /home/mertoalex/wallpapers/desktop-1920x1080aaa.png
Couldn't connect to /tmp/hypr/d4e2a0fd1635d90043e38d47931e7132ebcde559_1675183675/.hyprpaper.sock. (3)

┌──(mertoalex㉿gentoocore2duo)-[~]
└─$ hyprctl hyprpaper wallpaper DVI-I-1,/home/mertoalex/wallpapers/desktop-1920x1080aaa.png
Couldn't connect to /tmp/hypr/d4e2a0fd1635d90043e38d47931e7132ebcde559_1675183675/.hyprpaper.sock. (3)

┌──(mertoalex㉿gentoocore2duo)-[~]
└─$ file /home/mertoalex/wallpapers/desktop-1920x1080aaa.png
/home/mertoalex/wallpapers/desktop-1920x1080aaa.png: JPEG image data, JFIF standard 1.01, aspect ratio, density 1x1, segment length 16, progressive, precision 8, 1920x1080, components 3

image

vaxerski commented 1 year ago

nvidia is not officially supported. Can you run on any other gpu?

I have never seen this happen

mertoalex commented 1 year ago

I don't have any other gpu and I can't opened my linux with just cpu, idk why

mertoalex commented 1 year ago

btw, idk why but if my linux starting to use swap, some programs doing weird error on my computer maybe hyprpaper too did this weird error by swap using error, I should restart for fix this

mertoalex commented 1 year ago

image didn't fixed, not a swap error

mertoalex commented 1 year ago

image wait, I think this error isn't about swap I get this error too when I get weird errors from other programs

vaxerski commented 1 year ago

maybe you are actually out of memory?

mertoalex commented 1 year ago

image image idk

ignamartinoli commented 1 year ago

I'm getting the same error with this image on

sicro@sicro ~ $ uname -a
Linux sicro 6.1.9-gentoo #1 SMP Thu Feb  2 00:43:49 -03 2023 x86_64 AMD Ryzen 7 PRO 4750U with Radeon Graphics AuthenticAMD GNU/Linux
benev0 commented 1 year ago

I am getting the same issue from an image with an image converted from the .jpg extensio.

hyprpaper 
[LOG] Welcome to hyprpaper!
built from commit 44a38bfedc009bcc05eed571e80a397a80075a9f (    fix wp-fs-v1 impl, adhere to the spec)
[CRITICAL] Failed to read image /home/benev0/.config/hypr/wallpaper.png because of:
out of memory
mertoalex commented 1 year ago

I switched to swww (and it works), so I think I can close this issuse

buraksirma commented 1 year ago

I also get this error when the image size is 6,9 mb when i try a image which is 8,7 kb it works without the problem.

makerio90 commented 1 year ago

I also get this error when the image size is 6,9 mb when i try a image which is 8,7 kb it works without the problem.

same here with files >1MB

SkylerLipthay commented 1 month ago

For posterity: This error is thrown by cairo_image_surface_create_from_png for various, surprising reasons. In my case, it was because wallpaper file was named wallpaper.png but was really a JPEG, not a PNG. Thank you to this StackOverflow answer.