Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing wallpaper in Ubuntu Budgie causes memory leak #226

Closed
logb3e opened this issue Sep 29, 2019 · 9 comments
Closed

Changing wallpaper in Ubuntu Budgie causes memory leak #226

logb3e opened this issue Sep 29, 2019 · 9 comments
Labels
bug desktop specific upstream Involves an upstream library/API/service

Comments

@logb3e
Copy link

logb3e commented Sep 29, 2019

IMPORTANT: If you want to report several bugs or feature requests, please create separate bug reports for every single bug or feature request, don't bundle them into the same bug report.

To make a useful bug report, please fill the information below:

Version of Variety
0.7.1

Describe the bug
I have had Variety changing the desktop wallpaper every 30 seconds, which has been causing the memory usage shown against budgie-wm (in htop) to steadily increase. Leaving the machine idle (my user logged in) for a few hours has caused this to take up all available RAM.
It can be cleared again by logging out (no reboot needed), but then the process starts again with the next log-in. I have changed the wallpaper-changing frequency to once every 12 hours, and now the memory leak has slowed right down.
Context
Running Ubuntu Budgie 18.04.3 with Variety 0.7.1 on a Pentium (dual-core) motherboard with 8GB RAM. Variety is installed via the official PPA from Peter Levi's site. Same behavour on two different PCs newly installed from the same sources
Setting the wallpaper-change interval to 30 seconds, for example, causes the memory leak to be visible quickly. It happens each time Variety is running (started when the computer starts)

To Reproduce
Are there reliable steps to reproduce the behavior?

  1. Make the wallpaper change interval short (a few seconds)
  2. Monitor budgie-wm memory usage with htop
  3. The memory usage can be reset by logging out, but it repeats with the next log-in

Attach Variety's log file
If possible, please run variety -v in a terminal, reproduce the bug, quit Variety and attach this log file to the bug report: ~/.config/variety/variety.log. You may want to first manually check the log for exceptions, errors or warnings after you see the bug - if you can make an educated guess to what is happening, your bug report will be more helpful.

Do use the -v parameter - without it the log is useless.

Desktop environment and version
Ubuntu Budgie (18.04.3) with Budgie 10.4
variety.log

OS name and version
Please paste the output of cat /etc/issue && cat /etc/os-release?
Ubuntu 18.04.3 LTS \n \l

NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Screenshots
If applicable, add screenshots to help explain your problem.

Attached files
If it is particular images that trigger the bug, please attach them.

Additional context
images from online sources.

The Budgie desktop team have tested changing the wallpaper frequently without using Variety, and have seen no memory leak.

I have been using Variety for a few years, and have only seen this change in behaviour within about the last two months. I have also seen it with the 4.x kernel as well as the 5.x kernel in Ubuntu 18.04 LTS. Unfortunately, I did not note which set of updates to my systems caused this change in Variety's behaviour

Thank you.

@jlu5
Copy link
Member

jlu5 commented Sep 29, 2019

Hi,

The relevant code to change the wallpaper on GNOME and Budgie is https://github.com/varietywalls/variety/blob/master/data/scripts/set_wallpaper#L168-L172 (changing wallpaper path and display mode). We don't do anything further specific to Budgie, so if the actual memory leak is in budgie-wm itself I don't think there's anything we can fix in Variety.

@jlu5 jlu5 added bug upstream Involves an upstream library/API/service desktop specific labels Sep 29, 2019
@logb3e
Copy link
Author

logb3e commented Sep 30, 2019

I see what you mean... Variety is doing very little, and given the feedback from the Budgie desktop team, I would suspect perhaps even in Gnome 3 rather than budgie-wm. I'll follow up further with the Budgie team and see what they suggest

Thank you for the feedback

@Jacob-Vlijm
Copy link

@logb3e could you mention what settings you are exactly using? running it switching once per 10 seconds, can't reproduce.

@logb3e
Copy link
Author

logb3e commented Sep 30, 2019

@Jacob-Vlijm I'll do a full check on it all at home this evening, to confirm budgie, gnome and Variety versions, along with my Variety config, and then update here

@logb3e
Copy link
Author

logb3e commented Oct 17, 2019

@Jacob-Vlijm , @jlu5 ... I thought I should give you an update. I think I may have found the cause of the memory leak, and where it's happening. I think the "gsettings set org.gnome.desktop.background" function is sensitive to many non-standard ASCII or Unicode characters. I was trying out a simple wallpaper-changing script that calls this same seetings function, and I was still seeing an ongoing increase in memory usage attributed to budgie-wm in htop. I was looking in a few different logs, when I saw an entry with "... unexpected char "("" in it, which got me thinking. I checked the folder of images I have as backgrounds, and I saw that many of the more recent ones had brackets, spaces, commas, dots and some Unicode characters. I have now renamed all of the offenders so there are only standard ASCII characters (with underscores instead of spaces) and reinstalled Variety, and now the memory usage attributed to budgie-wm is stable (and low). I know this possible bug doesn't fall within either of your boundaries (Budgie or Variety), but I thought what I've found is interesting enough to let you know about it

@logb3e logb3e closed this as completed Oct 17, 2019
@Jacob-Vlijm
Copy link

@logb3e Oh, wow, that is interesting indeed! Thanks fro mentioning.

@logb3e
Copy link
Author

logb3e commented Oct 17, 2019 via email

@Kanchata
Copy link

Hi, I've seen this is older but happening to me and checking, i using budgie over Debian stable and i got same issue budgie-Wm incremental memory leaks and test about variety naming wallpaper photos used, and i need to say, may not the solution am not Dev's, but budgie-Wm keep in a reasonable memory use, thanks.

@logb3e
Copy link
Author

logb3e commented May 14, 2020

Just an update for info... last weekend, I upgraded to Ubuntu-Budgie 20.04 and removed Variety. I'm now using Wallstreet in Budgie, and the wallpaper changing is working fine... I've added in some images with spaces, etc. in the filenames, but so far, no issue! 20.04 looks good, and does seem to be performing better... very happy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug desktop specific upstream Involves an upstream library/API/service
Projects
None yet
Development

No branches or pull requests

4 participants