feat: VRAM booster only for GPUs with at least 2 GB of their own VRAM

This commit is contained in:
theupriser committed 2026-09-27 12:55:40 +02:00
1 parent 3f97c85c3c
commit b0947d7a2f
4 files changed
+11 -6

No files matched your search

+1 -1
View File
@@ -234,7 +234,7 @@ gamescope and the Plasma desktop. Primary target: the Valve Steam Machine
new major kernel.
- VRAM booster (`vram`, `lib/vram-booster.sh`, top-level, ticked by
default, 2.3.0; only available when `/sys/fs/cgroup/dmem.capacity` lists a
region): CachyOS's `dmemcg-booster` (system + user service) and
VRAM region of at least 2 GB): CachyOS's `dmemcg-booster` (system + user service) and
`plasma-foreground-booster`, like SteamOS 3.9's VRAM management. The
latter only starts with `kcgroupsrc [Foreground Booster] autostart=true`
(set with `kset`). Disable removes only the packages it installed
+2 -1
View File
@@ -7,7 +7,8 @@ one per merged pull request.
## 2.3.0 - 2026-09-27
- **feat: VRAM booster for every supported GPU, not only the Steam Machine**
- **feat: VRAM booster only for GPUs with at least 2 GB of their own VRAM**
- `3f97c85` **feat: VRAM booster for every supported GPU, not only the Steam Machine**
- `fd162c1` **feat: New badge for default sub-options added in this version**
- `54ebddf` **feat: VRAM booster for the Steam Machine**
+2 -1
View File
@@ -244,7 +244,8 @@ most of the VRAM (8 GB on the Steam Machine) can be pushed into system RAM
by the desktop and other apps, and stutter. The kernel side is the `dmem`
cgroup controller (7.2); amdgpu and Intel's xe register their VRAM with it,
NVIDIA's driver doesn't. The **VRAM booster** option is only shown when
`/sys/fs/cgroup/dmem.capacity` lists a region (or it's already on), and is
`/sys/fs/cgroup/dmem.capacity` lists a VRAM region of at least 2 GB (a
dedicated GPU; an integrated one registers a small carve-out) or it's already on, and is
ticked by default; new in 2.3.0, so setups with the SteamOS conversion on
get it ticked. CachyOS packages the userspace side, which it installs:
+6 -3
View File
@@ -4,7 +4,7 @@
# are evicted first, so a game that needs most of it doesn't spill into
# system RAM and stutter. The kernel side is the dmem cgroup controller
# (7.2; amdgpu and xe register their VRAM, NVIDIA's driver doesn't), so it's
# only offered when the kernel lists a region. CachyOS packages the userspace
# only offered when the kernel lists a VRAM region of at least 2 GB. CachyOS packages the userspace
# side: dmemcg-booster (a system service that enables the controller and
# sets the limits, plus a user service) and plasma-foreground-booster, which
# tells it which window is in front on the desktop. The latter only starts
@@ -12,10 +12,13 @@
# Sourced by steamify.sh; not meant to be run on its own.
VRAM_PKGS=(dmemcg-booster plasma-foreground-booster)
VRAM_MIN_BYTES=$((2 * 1024 * 1024 * 1024))
vram_available() {
# cgroupfs files have size 0, so read it.
grep -q . /sys/fs/cgroup/dmem.capacity 2>/dev/null || vram_status
# Only for a GPU with its own VRAM: an integrated GPU registers a small
# carve-out too, but mostly uses system RAM, so there's little to boost.
awk -v min="$VRAM_MIN_BYTES" '$1 ~ /\/vram$/ && $2 >= min { found = 1 } END { exit !found }' \
/sys/fs/cgroup/dmem.capacity 2>/dev/null || vram_status
}
vram_status() {