What just happened? A Valve graphics engineer may have just delivered one of the smartest quality-of-life upgrades Linux gaming has seen in a while: a fix that stops background apps from stealing precious VRAM from games running on 8GB graphics cards.

Natalie Vock, who works on Valve's Linux graphics stack and the RADV Vulkan driver, has developed a set of kernel patches and user-space tools to address poor VRAM prioritization on Linux. As a result, games get priority for fast local memory, while less important tasks are pushed into slower system RAM.

On Linux, the system does not always treat a foreground game as more important than a browser tab, chat app, or desktop effect when VRAM starts filling up.

Once memory pressure kicks in, some game data can be evicted into GTT, which is system RAM the GPU accesses over PCIe. That's a lot slower than dedicated VRAM, and it can lead to the kind of hitching and frame-time spikes 8GB card owners know all too well.

Vock's fix combines Linux kernel changes for DRM device memory cgroup support and TTM memory handling with two utilities: dmemcg-booster and plasma-foreground-booster.

The first manages the memory control side, while the second lets KDE Plasma identify the active fullscreen app and prioritize it accordingly. Users not running KDE are not completely out of luck, as newer versions of Gamescope can also tap into the new behavior.

In Vock's Cyberpunk 2077 test on an 8GB GPU, the game originally used roughly 6GB of VRAM while spilling 1.37GB into GTT. With the fixes in place, VRAM usage climbed to nearly 7.4GB and GTT dropped to 650MB, a reduction of about 53% in spillover to slower memory.

For now, the easiest way to try the fix is on CachyOS with KDE Plasma, where the required kernel work is already being integrated starting with version 7.0rc7-2.

The patches are aimed at AMD's open Linux graphics stack, though reports suggests parts of the work could also benefit Intel Xe GPUs, and an upstream patch has already been sent for nouveau, the open-source driver for Nvidia graphics cards.