csd-background increasing memory usage when turning on display with AVIF image
Closed this issue · 3 comments
* csd version: 5.8.1+victoria
* Distribution: Mint 21.2 Cinnamon
* Graphics: AMD 5700 Mesa 23.1.8
Issue
When turning the display off and on again with an AVIF background image the process csd-background
uses more RAM.
It probably loads/holds the background image multiple times or theres a problem with the AVIF handler.
Screenshots taken after turning the display off and on:
And so on, there's no limit.
Memory usage depends on used AVIF image, I used https://raw.githubusercontent.com/link-u/avif-sample-images/master/fox.profile1.10bpc.yuv444.odd-width.odd-height.avif
When killing the process it respawns with initial memory usage.
Steps to reproduce
- Set an AVIF image as background (e.g. one from https://github.com/link-u/avif-sample-images)
- View RAM usage with gnome-system-monitor
- Turn display off and on
- View RAM usage with gnome-system-monitor and see it increased
Expected behaviour
- No increased RAM usage
I did some investigating on this. I was unable to even debug csd-background for memory leaks - as soon as I tried to set a wallpaper, the debugger itself would crash.. I even tried a different loader/library, same thing.
I found this:
strukturag/libheif#509
The fix for this is only available in version 1.13 - Mint 21 has 1.12, unfortunately, so I built a newer version myself, and it seems to eliminate these large memory jumps in csd-background.
I'm going to try and get a newer version backported to Mint 21, and I'll fix our cinnamon-settings Background page, which doesn't appear to recognize this format.
It was fairly easy to build - if you're interested I can provide some steps.
libheif 1.14.2 backported.