mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-03 17:41:58 +02:00
feat: VRAM booster for every supported GPU, not only the Steam Machine
This commit is contained in:
1 parent
fd162c1e2e
commit
3f97c85c3c
8 files changed
+53
-40
No files matched your search
+11
-5
@@ -1,9 +1,10 @@
|
||||
#!/bin/bash
|
||||
# "VRAM booster" menu item (vram), a sub-option of Steam Machine support
|
||||
# ticked along with it (opt-out), like SteamOS 3.9's dGPU VRAM management:
|
||||
# the game in front keeps its VRAM, background apps are evicted first, so a
|
||||
# game on the 8 GB GPU doesn't spill into system RAM and stutter. The kernel
|
||||
# side is the dmem cgroup controller (7.2); CachyOS packages the userspace
|
||||
# "VRAM booster" menu item (vram), ticked by default, like SteamOS 3.9's
|
||||
# dGPU VRAM management: the game in front keeps its VRAM, background apps
|
||||
# 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
|
||||
# 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,6 +13,11 @@
|
||||
|
||||
VRAM_PKGS=(dmemcg-booster plasma-foreground-booster)
|
||||
|
||||
vram_available() {
|
||||
# cgroupfs files have size 0, so read it.
|
||||
grep -q . /sys/fs/cgroup/dmem.capacity 2>/dev/null || vram_status
|
||||
}
|
||||
|
||||
vram_status() {
|
||||
pacman -Q "${VRAM_PKGS[@]}" >/dev/null 2>&1 &&
|
||||
systemctl is-enabled -q dmemcg-booster-system.service 2>/dev/null &&
|
||||
|
||||
Reference in new issue
Block a user