feat: on a supported NVIDIA card the SteamOS conversion replaces Gaming on NVIDIA
Sync git.upriser.nl mirror / sync (push) Skipped

The conversion also sets up what Gaming on NVIDIA did there (kernel parameters, early modules, suspend memory, 32-bit libraries). Gaming on NVIDIA is only offered on older NVIDIA cards, or while it is on.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KkpbsMw4rQyBsxDG6ebHK2
This commit is contained in:
theupriserandClaude Sonnet 5.5 committed 2026-10-13 18:24:54 +02:00
1 parent 515019770f
commit 2811ecce1c
5 files changed
+29 -16

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ one per merged pull request.
## 2.11.2 - 2026-10-13
- **feat: the SteamOS conversion is offered on NVIDIA PCs again (GTX 16 / RTX 20 series or newer: Turing and later, the cards NVIDIA's open kernel driver supports): it builds and installs a patched gamescope from [steamify-gamescope-nvidia](https://github.com/theupriser/steamify-gamescope-nvidia) (GBM-allocated scan-out buffers, NVIDIA's corrupted gaming-mode picture, gamescope#2309; a few minutes to build) and sets `gamescope_drm_gbm_scanout=1` for the session (`lib/gamescope-nvidia.sh`). It and "Gaming on NVIDIA" exclude each other; single user mode works with either. Tested on an RTX 5080 (driver 615.78.08): Steam's gaming UI is clean with it and shows artifacts without. The package is pinned to one gamescope release: updating it is not automatic yet**
- **feat: the SteamOS conversion is offered on NVIDIA PCs again (GTX 16 / RTX 20 series or newer: Turing and later, the cards NVIDIA's open kernel driver supports): it builds and installs a patched gamescope from [steamify-gamescope-nvidia](https://github.com/theupriser/steamify-gamescope-nvidia) (GBM-allocated scan-out buffers, NVIDIA's corrupted gaming-mode picture, gamescope#2309; a few minutes to build) and sets `gamescope_drm_gbm_scanout=1` for the session (`lib/gamescope-nvidia.sh`). On those cards it replaces "Gaming on NVIDIA" (kernel parameters, early modules, suspend memory and the 32-bit libraries come with it); "Gaming on NVIDIA" is only offered on older NVIDIA cards, or while it is on (turn it off or swap it for the conversion; the two exclude each other); single user mode works with either. Tested on an RTX 5080 (driver 615.78.08): Steam's gaming UI is clean with it and shows artifacts without. The package is pinned to one gamescope release: updating it is not automatic yet**
- **feat: "Gaming on NVIDIA" also keeps video memory over suspend (`NVreg_PreserveVideoMemoryAllocations=1` in `/etc/modprobe.d/90-steamify-nvidia.conf`, the initramfs is rebuilt), enables `nvidia-suspend`/`nvidia-resume`/`nvidia-hibernate`, and installs `lib32-nvidia-utils` and `lib32-libxkbcommon` (32-bit games, the 32-bit MangoHud preload) on a supported card; off removes only what Steamify added. Untested on hardware yet**
+7 -5
View File
@@ -245,16 +245,18 @@ without. The patch is nine commits of [farnoy/gamescope](https://github.com/farn
that repository, builds the package as the user (`makepkg -sf`) and installs it with `pacman -U --ask 4` (the package provides and
conflicts with `gamescope`). It is opt-in inside gamescope: `gamescope_drm_gbm_scanout=1` in
`~/.config/gamescope-session/environment` and `~/.config/environment.d/99-steamify-gamescope-nvidia.conf`. The SteamOS conversion
(`gaming_enable`) does this on a supported card (`nvidia_supported`), so on those PCs it is offered next to "Gaming on NVIDIA"
and the two exclude each other (`toggle_component`, `backend.sh`, `AppState.qml`); single user mode works with either. Turning the
conversion off removes the setting and keeps the package. The package is pinned to the gamescope release the patch was made for
(`gaming_enable`) does this on a supported card (`nvidia_supported`), together with what "Gaming on NVIDIA" sets up there (the kernel
parameters, the early modules, suspend memory, the 32-bit libraries: `nvidia_kernel_enable`, `nvidia_extras_enable`). So on a
supported card the conversion replaces "Gaming on NVIDIA": that one is only offered on older NVIDIA cards, or while it is already on
(to turn it off, or swap it for the conversion; the two exclude each other: `toggle_component`, `backend.sh`, `AppState.qml`).
Single user mode works with either. Turning the conversion off removes the setting and those settings, and keeps the packages. The package is pinned to the gamescope release the patch was made for
(`UPSTREAM_VERSION` in that repository): pacman does not update it, and Steamify does not rebuild it yet.
So with an NVIDIA GPU (PCI vendor 0x10de, display class, its driver providing `nvidia_drm`: `nvidia_present`) the SteamOS
conversion (`gaming`, and its options `boot`, `single`, `glyphs`) is only offered on a supported card (GTX 16 / RTX 20 series or newer, Turing and later,
`nvidia_supported`) with the patched gamescope described below, or when it is already on (so it can be turned off).
`nvidia` ("Gaming on NVIDIA", `lib/nvidia.sh`) is the alternative, and excludes the conversion (both would start
Steam at login): it installs `steam` when missing (recorded in state `nvidia`, removed again only then) and enables the user
`nvidia` ("Gaming on NVIDIA", `lib/nvidia.sh`) is for older NVIDIA cards (and for PCs where it is already on), and excludes the
conversion (both would start Steam at login): it installs `steam` when missing (recorded in state `nvidia`, removed again only then) and enables the user
unit `steamify-steam-autostart.service` (`services/`, `ExecStart=/usr/bin/steam @ARGS@`, Plasma only). Its sub-option
`bigpicture` ("Steam starts in Big Picture", ticked along with it) rewrites the unit with `-gamepadui` and sets
`ksmserverrc [General] loginMode=emptySession` (`kset`, undone with `krevert bigpicture`), so windows of the last session
+9 -1
View File
@@ -61,12 +61,20 @@ gsn_env_disable() {
gsn_enable() {
# Only on a supported NVIDIA card; elsewhere the stock gamescope is right.
nvidia_supported || return 0
# What NVIDIA's DRM stack wants (lib/nvidia.sh): modeset/fbdev on the kernel command line, the modules in the
# initramfs, video memory kept over suspend, the 32-bit libraries. Takes effect at the next boot, like the session.
nvidia_kernel_enable || return 1
nvidia_extras_enable || return 1
gsn_install_package || return 1
gsn_env_enable
ok "gamescope draws NVIDIA's picture through GBM (gamescope_drm_gbm_scanout=1) from the next gaming mode start."
}
gsn_disable() {
# The setting goes; the patched package stays, like the other packages (steam, gamescope-session-cachyos).
# The setting goes, and what nvidia_*_enable added; the packages stay (patched gamescope, 32-bit libraries), like
# the other packages of the conversion (steam, gamescope-session-cachyos).
gsn_env_disable
nvidia_supported || return 0
nvidia_extras_disable
nvidia_kernel_disable
}
-4
View File
@@ -206,8 +206,6 @@ detect_components() {
component_available "$c" && component_selectable "$c" && ! is_action "$c" &&
[[ " ${NO_PRESELECT[*]} " != *" $c "* ]] && WANTED[$c]=1
done
# On NVIDIA "Gaming on NVIDIA" is the default; the conversion (a patched gamescope, built here) is a choice.
nvidia_present && WANTED[gaming]=0 WANTED[glyphs]=0
machine_available && WANTED[cec]=1
fi
}
@@ -286,8 +284,6 @@ defaults_list() {
sel=false; component_selectable "$c" && sel=true
on=false
[[ "$sel" == true && " ${NO_PRESELECT[*]} " != *" $c "* ]] && on=true
# (On NVIDIA the conversion is a choice: "Gaming on NVIDIA" is preselected, see show_menu's first run.)
[[ "$c" == gaming || "$c" == glyphs ]] && nvidia_present && on=false
[[ "$c" == cec ]] && machine_available && on=true
items+="${items:+,}{\"id\":$(json_str "$c"),\"label\":$(json_str "${LABEL[$c]%%:*}")"
items+=",\"hint\":$(json_str "$( [[ "${LABEL[$c]}" == *:* ]] && echo "${LABEL[$c]#*: }")")"
+12 -5
View File
@@ -37,9 +37,11 @@ nvidia_present() {
return 1
}
# Shown on NVIDIA PCs. It and the SteamOS conversion exclude each other (both
# would start Steam at login): the menu unticks one when the other is ticked.
nvidia_available() { nvidia_present; }
# The SteamOS conversion with the patched gamescope (lib/gamescope-nvidia.sh) replaces this on a supported card, so
# this is for older NVIDIA cards, and for a PC where it is already on (so it can be turned off, or swapped for the
# conversion). It and the conversion exclude each other (both would start Steam at login): the menu unticks one when
# the other is ticked.
nvidia_available() { nvidia_present && { ! nvidia_supported || nvidia_status; }; }
bigpicture_available() { nvidia_available; }
nvidia_status() {
@@ -76,14 +78,19 @@ nvidia_disable() {
user_systemctl disable --now "$NVIDIA_UNIT" >/dev/null 2>&1
rm -f "$unit"
user_systemctl daemon-reload
nvidia_extras_disable
# Swapped for the SteamOS conversion (turned on first, in the same run): it needs the same settings, they stay.
gaming_status 2>/dev/null || nvidia_extras_disable
pkgs="$(state_get nvidia installed_pkgs)"
if gaming_status 2>/dev/null; then
local p; pkgs=" $pkgs "
for p in $NVIDIA_LIB32_PKGS; do pkgs="${pkgs// $p / }"; done
fi
# Only what Steamify installed; games and the Steam folder stay.
# shellcheck disable=SC2086 # a list of package names
[[ -n "$pkgs" ]] && sudo pacman -Rns --noconfirm $pkgs >/dev/null 2>&1
state_clear nvidia
krevert bigpicture
nvidia_kernel_disable
gaming_status 2>/dev/null || nvidia_kernel_disable
ok "Steam no longer starts at login."
}