- Python 68.6%
- Roff 18%
- Makefile 11.6%
- Shell 1.8%
gamevram
A cgroups (v1) management tool for gaming usage, specifically prioritising VRAM allocation.
About
This package creates per-user cgroups for VRAM priority handling. It contains a tool for users to use to add or remove processes from their priority group or to launch a program in the priority group.
It works without systemd, but should also be fine with it. Just don't install it alongside anything else which manages dmem sub-cgroups else things may become confused.
Mainly, you'll want to launch VRAM-heavy games with it: run foobar via
gamevram launch foobar. With a front end such as Steam, you have the
choice of setting the individual launch commands to (most likely) gamevram launch %command%, but you can also just launch Steam itself via gamevram
instead.
This should be used with Linux kernel 7.0 or later, or an earlier one with patches applied. (They can definitely be applied to 6.18.)
See here for background information and the list of patches.
Persistence
Per-user cgroups, once created, will persist until reboot or power-off. Per-program priority won't persist at all; it's transient, only for that particular instance and any which it launches.
Setup
You can create the cgroups by running sudo gamevram.setup as a normal
user if you want. This should be automatic, though...
X desktop environments
Setup will happen automatically via an Xsession.d script.
"gamevram (Wayland init)" will appear in your desktop environment's list of auto-startable applications. You can disable this, but see the Wayland section.
Wayland desktop environments
"gamevram (Wayland init)" will appear in your desktop environment's
list of auto-startable applications. You need this to be run on login in
order to be able to use gamevram to set priority.
Dependencies
| python3 | tested with 3.13, but should be fine with most older 3.x |
| yad or zenity | for displaying errors if not in a terminal window |
| sudo | to run gamevram.setup during session setup |
CONFIG_CGROUP_DMEM=y |
Linux kernel config; you almost certainly have this enabled already |