Public bug reported:

On a ThinkPad T16 Gen 4 with Intel Arrow Lake-U graphics (PCI ID
8086:7D41, driven by i915), GPU-backed shared memory (/proc/meminfo
Shmem) grows continuously throughout a Wayland session, from ~800 MB at
login to ~29–30 GB after 3+ days of normal use. When shmem fills
physical RAM, the kernel OOM fires and cascades through user
processes — or systemd-oomd fires first. Either way the GNOME session is
terminated.

The shmem is entirely attributed to gnome-shell's systemd cgroup
([email protected]/session.slice/[email protected]). At
OOM time, gnome-shell shows ~15 GB of swap usage while Firefox (the
largest active application) shows only ~1 GB. This is consistent with
Mutter — as the Wayland compositor — accumulating DMA-BUF references to
client framebuffers without releasing them as clients repaint or close
windows.

Kernel OOM dumps confirm the objects cannot be reclaimed:

Purging GPU memory, 0 pages freed, 0 pages still pinned, 2872 pages left
available.

"Still pinned" indicates active reference counts > 0 — the i915 shrinker
cannot touch them. The accumulated objects are shmem-backed GEM buffer
objects that were imported from Wayland clients via DMA-BUF.

Steps to reproduce

1. Log into a Wayland session on an Arrow Lake-U system running Ubuntu 24.04 
(mutter 46.2, kernel 6.17.0-1017-oem)
2. Use the system normally with Firefox, Thunderbird, and other Wayland clients 
for 2–3 days without logging out
3. Monitor: watch -n 60 "grep Shmem /proc/meminfo"

Expected: Shmem stays roughly constant (or rises and falls as
applications open/close)

Actual: Shmem grows monotonically at roughly 500–700 MB/hour, reaching
~30 GB over 3 days

Evidence

oomd candidate list at kill time:
Path: /user.slice/.../session.slice/[email protected]
        Swap Usage: 15.7G
Path: /user.slice/.../app.slice/snap.firefox.firefox-....scope
        Swap Usage: 1.0G
Path: /user.slice/.../app.slice/snap.thunderbird.thunderbird-....scope
        Swap Usage: 849.6M

oomd kill reason:
Killed .../[email protected] due to memory used (29155434496) /
total (33111437312) and swap used (19380744192) / total (32212250624) being
more than 60.00%

Kernel OOM kill cascade (separate event, different boot):
Apr 18 20:17:16 kernel: oom-kill: task=megasync, pid=2667754, oom_score_adj=200
Apr 18 20:17:16 kernel: Out of memory: Killed process 2667754 (megasync)
Apr 18 20:17:16 kernel: Purging GPU memory, 0 pages freed, 0 pages still pinned
Apr 18 20:17:16 kernel: oom-kill: task=gnome-terminal-, pid=2667440
Apr 18 20:17:17 kernel: oom-kill: task=pipewire-pulse, pid=2664730
Apr 18 20:17:17 kernel: oom-kill: task=easyeffects, pid=2665368
Apr 18 20:18:28 kernel: oom-kill: task=gjs, pid=2665639
(gjs death crashes gnome-shell, terminating the session)

System information

- Ubuntu 24.04.x
- Mutter 46.2
- Kernel: 6.17.0-1017-oem (linux-oem-24.04b)
- GPU: Intel Arrow Lake-U, PCI ID 8086:7D41, driver: i915
- Machine: Lenovo ThinkPad T16 Gen 4 (21QEC), oem-sutton-damian-meta installed
- Session type: Wayland
- RAM: 32 GB, swap: 32 GB (zram or file — confirmed fills completely before OOM)

Notes

- Problem is session-scoped: logging out and back in resets shmem to ~800 MB
- Problem did not reproduce within a single hour; requires multi-day 
accumulation
- Kernel 6.17.0-1017-oem (which targets Arrow Lake i915 fixes LP: #2144537, LP: 
#2137615) does not resolve it
- Suspect: Mutter is not releasing imported DMA-BUF handles when Wayland 
clients repaint or disconnect, leaving GEM reference counts elevated and 
preventing i915 from reclaiming objects

** Affects: mutter (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to mutter in Ubuntu.
https://bugs.launchpad.net/bugs/2148793

Title:
  GPU shmem accumulates in gnome-shell cgroup over multi-day sessions,
  causing OOM — Arrow Lake-U (i915, 8086:7D41)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2148793/+subscriptions


-- 
desktop-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to