An Open Source Dev Has Put Together a Fix for AMD GPU’s VRAM Mismanagement on Linux
Natalie Vock (pixelcluster), a developer who works on low-level Linux code and as an independent contractor for Valve, has published a fix for a VRAM management problem that has been making life difficult for Linux gamers on AMD GPUs with 8GB of VRAM or less.
She has put together a combination of kernel patches and userspace utilities that stop background apps from stealing VRAM away from whatever game you’re playing.
The underlying issue is that when VRAM runs out, the kernel driver has no way to tell which memory matters more. A game and a browser tab look identical from the driver’s perspective, so when something has to give, game memory often takes the hit.
It then ends up in GTT, a chunk of system RAM that the GPU can access, but over the PCIe bus rather than directly.
The fix is built on the dmem cgroup controller that she co-developed with Maarten Lankhorst from Intel and Maxime Ripard from Red Hat. It is already in the mainline Linux kernel, and it lets the driver treat foreground apps as higher priority when handing out VRAM.
That alone was not enough, though. Natalie has also written six kernel patches to fix a specific gap where VRAM pressure would cause new memory allocations to skip those protections entirely and end up in GTT anyway.
Two userspace utilities handle the rest: dmemcg-booster sets up the groundwork so the kernel protections actually activate, and a fork of KDE Plasma’s Foreground Booster keeps track of which app is in the foreground so it gets first dibs on VRAM.
What this means for Linux gamers
Instead of performance slowly degrading over a session, games should now hold steady for as long as their own VRAM usage stays within budget. Natalie notes that most modern titles tend to stay within 8GB, so owners of 8GB GPUs should be in a much better spot with today’s games.
While this applies to any GPU running the amdgpu driver, Intel GPUs on the xe driver have the necessary kernel support too, though real-world testing there is still pending.
Additionally, the developer has submitted a patch for nouveau, the open source NVIDIA driver.
How to get it
The six kernel patches are not in the mainline kernel, so getting them requires some extra steps depending on your setup. CachyOS users on Linux 7.0rc7-2 or later are already covered.
On other Arch-based distros, both utilities are in the AUR. For the kernel side, you can either pull the CachyOS kernel package from the repository or install linux-dmemcg from the AUR, which compiles Natalie’s development branch.
The six patch files are also linked directly in the announcement blog for anyone who wants to apply them to a custom kernel build.
For those not on an Arch-based system, the realistic options are applying the patches manually to a self-compiled kernel or waiting for your distro to pick them up. Natalie has said her post will be updated if and when the work gets packaged by other distributions.
Suggested Read ๐: The Linux 7.0 Release is Here!
![]()
