Skip to content
This repository was archived by the owner on May 1, 2026. It is now read-only.
This repository was archived by the owner on May 1, 2026. It is now read-only.

[Patch Request] dmemcg VRAM priority patches (v6) — fix VRAM eviction order for gaming #52

Description

@thekk1

Summary

Requesting inclusion of Natalie Vock's (pixelcluster, Valve contractor) dmemcg
patch series (v6) into the Bazzite kernel. These patches fix a longstanding
VRAM management issue in the Linux kernel where background applications can
displace game data from VRAM into the slower GTT region (system RAM via PCIe),
causing stuttering and performance degradation.

Problem

On systems with ≤8GB VRAM (e.g. RX 9060 XT, RX 7600, Steam Deck), the kernel
has no mechanism to prioritize which process's GPU memory allocations are
protected from eviction. A browser with many open tabs can cause game assets to
be evicted to GTT even while VRAM is partially free for lower-priority
processes. This results in gradual performance degradation during gaming
sessions.

The same issue affects the Steam Deck: while it uses unified memory physically,
the kernel and userspace treat VRAM and GTT as separate pools. Unnecessary
data movement between these pools causes real overhead that these patches
eliminate.

Solution

Six kernel patches modifying TTM allocation/eviction logic and adding DRM
device memory cgroup (dmemcg) controller support, combined with two userspace
utilities:

  • dmemcg-booster — systemd service that enables/configures dmem cgroup
    controllers to activate VRAM protection
  • plasma-foreground-booster — integrates with KDE Plasma to give the
    focused/foreground application (typically a game) highest VRAM priority;
    alternatively, newer Gamescope versions also support this

Measured Impact

In testing with Cyberpunk 2077 on an 8GB GPU:

  • VRAM utilization: ~6 GB → ~7.4 GB (+23%)
  • GTT spillover: 1.37 GB → 0.65 GB (−53%)

Patch Links

Current Adoption

  • CachyOS: included since kernel 7.0rc7-2, also in 6.19.12
  • Liquorix: included since 6.19-9
  • Bazzite: not yet included (this request)

Notes

  • Patches apply cleanly on top of 6.19.x
  • Requires accompanying userspace packages (dmemcg-booster,
    plasma-foreground-booster) — these would need to be added to the Bazzite
    image separately, but the kernel side is the prerequisite
  • The developer has noted the patch is still pre-mainline; once upstreamed
    into mainline Linux it will arrive automatically, but inclusion in
    kernel-bazzite in the meantime would benefit users on ≤8GB AMD GPUs and
    Steam Deck users significantly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions