Memory leak caused by keyboard and mouse inputs in some games
Affected version
- Archlinux
- Mutter 42.3
- Wayland session (it doesn't happen on a X11 session)
- AMD RX 6600 XT with Mesa 22.1.2 drivers
Bug summary
The gnome-shell
process seems to leak memory when some games receive keyboard and mouse inputs. The memory usage doesn't grow when idling in the games.
So far I could only reproduce the issue with First Person Shooter games like Xonotic (native Linux game), Unreal Tournament "1999" (running through Proton) and Unreal Tournament 2004 (native version).
Games like SuperTuxKart and RVGL don't seem to be affected.
After playing Xonotic for 30 minutes, gnome-system-monitor reported a gnome-shell
memory usage increase of almost 200 MB.
This happens whether the game is running in fullscreen mode or not, or through XWayland or not.
I was hesitant to open this bug in the gnome-shell tracker instead, but it looked more like a Mutter issue, sorry if I'm wrong.
Steps to reproduce
- Start Xonotic in a Gnome Wayland session.
- Play for a while (don't stay idle).
- Notice the
gnome-shell
memory usage increase over time. - Quit the game, the
gnome-shell
memory usage doesn't decrease (or barely).