Problem
When using often FileChooser dialog repeatedly xdg-desktop-portal-gnome takes a lot of memory( VRAM memory leak).
It can take several gigs very quickly
Open a browser (Brave or Chrome) and then try to save pictures or other documents from the page displayed - no actual saving is required / just getting the dialog window is sufficient to cause the memory increase . After 6 additional triggering of FileChooser dialog ;
Process is therefore sometimes killed by OOM killer :
janv. 11 10:44:50 faithnomore kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service/app.slice/xdg-desktop-portal-gnome.service,task=xdg-desktop-por,pid=659367,uid=1000
janv. 11 10:44:50 faithnomore systemd[658535]: xdg-desktop-portal-gnome.service: A process of this unit has been killed by the OOM killer.
janv. 11 10:44:51 faithnomore systemd[658535]: xdg-desktop-portal-gnome.service: Failed with result 'oom-kill'.
janv. 21 08:25:37 faithnomore kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service/app.slice/xdg-desktop-portal-gnome.service,task=xdg-desktop-por,pid=1484702,uid=1000
févr. 02 07:14:16 faithnomore kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service/app.slice/xdg-desktop-portal-gnome.service,task=xdg-desktop-por,pid=2980,uid=1000
févr. 02 07:14:16 faithnomore systemd[2034]: xdg-desktop-portal-gnome.service: A process of this unit has been killed by the OOM killer.
févr. 02 07:14:16 faithnomore systemd[2034]: xdg-desktop-portal-gnome.service: Failed with result 'oom-kill'.
Cause
Memory leak issue;
Not yet known.
Related Issues
Screenshot and FileChooser portals leak memory (#91) · Issues · GNOME / xdg-desktop-portal-gnome · GitLab mentions :
" The PR was merged. Right now I can’t reproduce the huge leaks you found but some smaller one were fixed.
Note that the file chooser in Gtk 4 leaks internally and I believe it was fixed in a recent commit for 4.13.x"
Fix commit is : Fix some memory leaks (!132) · Merge requests · GNOME / xdg-desktop-portal-gnome · GitLab
Workarounds
Restart xdg-desktop-portal-gnome