mirror of
https://github.com/theupriser/steamify-cachyos.git
synced 2026-10-03 17:41:58 +02:00
feat: Big Picture on NVIDIA starts on an empty Plasma session, so restored windows don't cover it
This commit is contained in:
1 parent
3eb22502ec
commit
80b1fac9c1
5 files changed
+26
-7
No files matched your search
+1
-1
@@ -7,7 +7,7 @@ one per merged pull request.
|
|||||||
|
|
||||||
## 2.9.7 - 2026-10-01
|
## 2.9.7 - 2026-10-01
|
||||||
|
|
||||||
- **feat: "Gaming on NVIDIA" (nvidia) replaces the SteamOS conversion on PCs with an NVIDIA GPU, where gamescope's gaming mode shows a corrupted picture (NVIDIA bug 5240452): Steam is installed when missing and starts at login on the Plasma desktop; the sub-option "Steam starts in Big Picture" (bigpicture, ticked along with it) starts it in Big Picture, unticked in its normal window (lib/nvidia.sh, services/steamify-steam-autostart.service). On a supported card (RTX 20 series or newer, chwd's legacy lists like the VRAM booster) it also puts nvidia-drm.modeset=1 and fbdev=1 on the kernel command line (Limine incl. its `+=` line, systemd-boot, GRUB) and the NVIDIA modules in the initramfs while every installed kernel has them (a pacman hook decides at every kernel change). The conversion and its options are hidden there unless already on**
|
- **feat: "Gaming on NVIDIA" (nvidia) replaces the SteamOS conversion on PCs with an NVIDIA GPU, where gamescope's gaming mode shows a corrupted picture (NVIDIA bug 5240452): Steam is installed when missing and starts at login on the Plasma desktop; the sub-option "Steam starts in Big Picture" (bigpicture, ticked along with it) starts it in Big Picture, unticked in its normal window, and Big Picture starts on an empty Plasma session (no windows of the last session on top of it) (lib/nvidia.sh, services/steamify-steam-autostart.service). On a supported card (RTX 20 series or newer, chwd's legacy lists like the VRAM booster) it also puts nvidia-drm.modeset=1 and fbdev=1 on the kernel command line (Limine incl. its `+=` line, systemd-boot, GRUB) and the NVIDIA modules in the initramfs while every installed kernel has them (a pacman hook decides at every kernel change). The conversion and its options are hidden there unless already on**
|
||||||
- **feat: single user mode also works on NVIDIA PCs, without the SteamOS conversion: it switches to SDDM and logs in to the Plasma session by itself (/etc/sddm.conf.d/zzz-steamify-autologin.conf), and no longer ticks the conversion where that isn't offered (lib/single-user.sh)**
|
- **feat: single user mode also works on NVIDIA PCs, without the SteamOS conversion: it switches to SDDM and logs in to the Plasma session by itself (/etc/sddm.conf.d/zzz-steamify-autologin.conf), and no longer ticks the conversion where that isn't offered (lib/single-user.sh)**
|
||||||
- **test: tests/nvidia-test.sh runs it against a fake RTX 5080 beside an iGPU, a stub pacman and systemctl, and a temp home (no root, VM or hardware); verified on a real RTX 5080: gamescope's session, a nested gamescope and a KWin-only session all showed artifacts or stutter, Big Picture on the Plasma desktop did not**
|
- **test: tests/nvidia-test.sh runs it against a fake RTX 5080 beside an iGPU, a stub pacman and systemctl, and a temp home (no root, VM or hardware); verified on a real RTX 5080: gamescope's session, a nested gamescope and a KWin-only session all showed artifacts or stutter, Big Picture on the Plasma desktop did not**
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -228,8 +228,9 @@ conversion (`gaming`, and its options `boot`, `single`, `glyphs`) isn't offered,
|
|||||||
off). `nvidia` ("Gaming on NVIDIA", `lib/nvidia.sh`) takes its place, hidden while the conversion is on (both would start
|
off). `nvidia` ("Gaming on NVIDIA", `lib/nvidia.sh`) takes its place, hidden while the conversion is on (both would start
|
||||||
Steam at login): it installs `steam` when missing (recorded in state `nvidia`, removed again only then) and enables the user
|
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
|
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`; unticked, Steam
|
`bigpicture` ("Steam starts in Big Picture", ticked along with it) rewrites the unit with `-gamepadui` and sets
|
||||||
starts in its normal window. The PC always boots into the desktop: there is no gamescope session. Takes effect at the next
|
`ksmserverrc [General] loginMode=emptySession` (`kset`, undone with `krevert bigpicture`), so windows of the last session
|
||||||
|
(Discord, a browser) aren't restored on top of Big Picture; unticked, Steam starts in its normal window. The PC always boots into the desktop: there is no gamescope session. Takes effect at the next
|
||||||
login.
|
login.
|
||||||
|
|
||||||
On a supported card (RTX 20 series or newer: not on chwd's legacy lists `/var/lib/chwd/ids/nvidia-*.ids`, the VRAM booster's
|
On a supported card (RTX 20 series or newer: not on chwd's legacy lists `/var/lib/chwd/ids/nvidia-*.ids`, the VRAM booster's
|
||||||
|
|||||||
+6
-1
@@ -74,6 +74,7 @@ nvidia_disable() {
|
|||||||
# shellcheck disable=SC2086 # a list of package names
|
# shellcheck disable=SC2086 # a list of package names
|
||||||
[[ -n "$pkgs" ]] && sudo pacman -Rns --noconfirm $pkgs >/dev/null 2>&1
|
[[ -n "$pkgs" ]] && sudo pacman -Rns --noconfirm $pkgs >/dev/null 2>&1
|
||||||
state_clear nvidia
|
state_clear nvidia
|
||||||
|
krevert bigpicture
|
||||||
nvidia_kernel_disable
|
nvidia_kernel_disable
|
||||||
ok "Steam no longer starts at login."
|
ok "Steam no longer starts at login."
|
||||||
}
|
}
|
||||||
@@ -83,10 +84,14 @@ bigpicture_status() { grep -qs -- '-gamepadui' "$(nvidia_unit_file)"; }
|
|||||||
bigpicture_enable() {
|
bigpicture_enable() {
|
||||||
# The unit comes from nvidia_enable (it runs first); without it there is nothing to change.
|
# The unit comes from nvidia_enable (it runs first); without it there is nothing to change.
|
||||||
[[ -f "$(nvidia_unit_file)" ]] || return 0
|
[[ -f "$(nvidia_unit_file)" ]] || return 0
|
||||||
nvidia_write_unit -gamepadui && ok "Steam starts in Big Picture at your next login."
|
nvidia_write_unit -gamepadui || return 1
|
||||||
|
# Windows of the last session (Discord, a browser) would be restored on top of Big Picture.
|
||||||
|
kset bigpicture ksmserverrc General loginMode emptySession
|
||||||
|
ok "Steam starts in Big Picture at your next login, on an empty desktop."
|
||||||
}
|
}
|
||||||
|
|
||||||
bigpicture_disable() {
|
bigpicture_disable() {
|
||||||
|
krevert bigpicture
|
||||||
[[ -f "$(nvidia_unit_file)" ]] || return 0
|
[[ -f "$(nvidia_unit_file)" ]] || return 0
|
||||||
nvidia_write_unit "" && ok "Steam starts in its normal window at your next login."
|
nvidia_write_unit "" && ok "Steam starts in its normal window at your next login."
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-2
@@ -12,8 +12,19 @@ source lib/common.sh; source lib/state.sh; source lib/login-manager.sh; source l
|
|||||||
# Runs as the user, and refuses anything under the real system folders: a test must never touch them.
|
# Runs as the user, and refuses anything under the real system folders: a test must never touch them.
|
||||||
sudo() { local a; for a in "$@"; do case "$a" in /etc/*|/usr/*|/boot/*|/var/*) echo "REFUSED sudo $*" >&2; return 1 ;; esac; done; "$@"; }
|
sudo() { local a; for a in "$@"; do case "$a" in /etc/*|/usr/*|/boot/*|/var/*) echo "REFUSED sudo $*" >&2; return 1 ;; esac; done; "$@"; }
|
||||||
info() { :; }; ok() { :; }; warn() { :; }; err() { echo "ERR $*"; }
|
info() { :; }; ok() { :; }; warn() { :; }; err() { echo "ERR $*"; }
|
||||||
kwriteconfig6() { local f g k v; while [[ $# -gt 0 ]]; do case "$1" in --file) f="$2";; --key) k="$2";; esac; [[ $# -ge 2 ]] && v="$2"; shift; done; printf '%s=%s\n' "$k" "$v" > "$f"; }
|
# KDE's config tools on plain files under the temp home (a relative file name is relative to ~/.config, as in KDE).
|
||||||
kreadconfig6() { local f k; while [[ $# -gt 0 ]]; do case "$1" in --file) f="$2";; --key) k="$2";; esac; shift; done; sed -n "s/^$k=//p" "$f" 2>/dev/null; }
|
kwriteconfig6() {
|
||||||
|
local f="" k="" v="" del=0
|
||||||
|
while [[ $# -gt 0 ]]; do case "$1" in --file) f="$2"; shift ;; --key) k="$2"; shift ;; --group) shift ;; --delete) del=1 ;; *) v="$1" ;; esac; shift; done
|
||||||
|
[[ "$f" == /* ]] || f="$HOME/.config/$f"; mkdir -p "$(dirname "$f")"
|
||||||
|
if [[ $del == 1 ]]; then sed -i "/^$k=/d" "$f" 2>/dev/null; else sed -i "/^$k=/d" "$f" 2>/dev/null; printf '%s=%s\n' "$k" "$v" >> "$f"; fi
|
||||||
|
}
|
||||||
|
kreadconfig6() {
|
||||||
|
local f="" k="" d="" r
|
||||||
|
while [[ $# -gt 0 ]]; do case "$1" in --file) f="$2"; shift ;; --key) k="$2"; shift ;; --default) d="$2"; shift ;; --group) shift ;; esac; shift; done
|
||||||
|
[[ "$f" == /* ]] || f="$HOME/.config/$f"
|
||||||
|
r="$(sed -n "s/^$k=//p" "$f" 2>/dev/null)"; printf '%s\n' "${r:-$d}"
|
||||||
|
}
|
||||||
# A pretend package database and systemd: what the tests assert on.
|
# A pretend package database and systemd: what the tests assert on.
|
||||||
PKGS=""; PACMAN_LOG="$T/pacman.log"; : > "$PACMAN_LOG"; ENABLED=0
|
PKGS=""; PACMAN_LOG="$T/pacman.log"; : > "$PACMAN_LOG"; ENABLED=0
|
||||||
pacman() {
|
pacman() {
|
||||||
@@ -83,8 +94,10 @@ bigpicture_enable
|
|||||||
check "Big Picture: Steam starts with -gamepadui" 'grep -q "^ExecStart=/usr/bin/steam -gamepadui$" "$UNIT" && bigpicture_status'
|
check "Big Picture: Steam starts with -gamepadui" 'grep -q "^ExecStart=/usr/bin/steam -gamepadui$" "$UNIT" && bigpicture_status'
|
||||||
nvidia_enable
|
nvidia_enable
|
||||||
check "turning Gaming on NVIDIA on again keeps Big Picture" 'bigpicture_status'
|
check "turning Gaming on NVIDIA on again keeps Big Picture" 'bigpicture_status'
|
||||||
|
check "Big Picture: Plasma starts with an empty session" '[[ "$(kreadconfig6 --file ksmserverrc --group General --key loginMode)" == emptySession ]]'
|
||||||
bigpicture_disable
|
bigpicture_disable
|
||||||
check "Big Picture off: Steam's normal window again" '! bigpicture_status && nvidia_status'
|
check "Big Picture off: Steam's normal window again" '! bigpicture_status && nvidia_status'
|
||||||
|
check "...and the session setting is back as it was (not set)" '[[ -z "$(kreadconfig6 --file ksmserverrc --group General --key loginMode)" ]]'
|
||||||
|
|
||||||
# --- turning it off
|
# --- turning it off
|
||||||
bigpicture_enable; nvidia_disable
|
bigpicture_enable; nvidia_disable
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ QtObject {
|
|||||||
changes: ["Steam is installed when it's missing", "Steam starts at login (a systemd user service)", "Off: the service is removed again; Steam is only removed if Steamify installed it"] },
|
changes: ["Steam is installed when it's missing", "Steam starts at login (a systemd user service)", "Off: the service is removed again; Steam is only removed if Steamify installed it"] },
|
||||||
bigpicture: { label: "Steam starts in Big Picture", hint: "The controller-friendly Steam, or the normal window",
|
bigpicture: { label: "Steam starts in Big Picture", hint: "The controller-friendly Steam, or the normal window",
|
||||||
body: "Steam opens in Big Picture at login, which works well with a controller on the TV. Untick it for Steam's normal window.",
|
body: "Steam opens in Big Picture at login, which works well with a controller on the TV. Untick it for Steam's normal window.",
|
||||||
changes: ["Steam is started with -gamepadui", "Off: Steam starts in its normal window"] },
|
changes: ["Steam is started with -gamepadui", "Plasma starts with an empty session, so old windows don't cover Big Picture", "Off: Steam starts in its normal window"] },
|
||||||
theme: { label: "SteamOS theme", hint: "Vapor look for the desktop, Add to Steam",
|
theme: { label: "SteamOS theme", hint: "Vapor look for the desktop, Add to Steam",
|
||||||
body: "The Vapor look of SteamOS for the desktop, with its panel, launcher icon and wallpaper.",
|
body: "The Vapor look of SteamOS for the desktop, with its panel, launcher icon and wallpaper.",
|
||||||
changes: ["cachyos-vapor global theme", "Add to Steam in right-click menus", "Nested Desktop, Steam keyboard window rule"] },
|
changes: ["cachyos-vapor global theme", "Add to Steam in right-click menus", "Nested Desktop, Steam keyboard window rule"] },
|
||||||
|
|||||||
Reference in new issue
Block a user