diff --git a/lib/menu.sh b/lib/menu.sh index f081141..7c3d48c 100644 --- a/lib/menu.sh +++ b/lib/menu.sh @@ -113,6 +113,8 @@ feature_outdated() { # On, but set up by an older version of that feature (compared as # versions: 2.10.0 is newer than 2.9.0). local have want + # "Gaming on NVIDIA" is on: the SteamOS conversion replaces it, as an update of what the PC has (lib/nvidia.sh). + [[ "$1" == gaming ]] && nvidia_migration_pending && return 0 [[ "${CURRENT[$1]:-0}" == 1 ]] || return 1 have="$(state_get features "$1" "$FEATURE_BASELINE")" [[ "$have" == off ]] && have="$FEATURE_BASELINE" @@ -182,6 +184,8 @@ detect_components() { component_available "$c" || continue { feature_outdated "$c" || feature_new "$c"; } && WANTED[$c]=1 done + # "Gaming on NVIDIA" was on: its replacement, the SteamOS conversion, comes with the defaults of a first run. + nvidia_migration_pending && WANTED[glyphs]=1 # The kernel pin is no longer needed (the power-off fix), and HDMI # refresh boost needed the pin: whatever is left of either is unticked, # so a normal run removes it. diff --git a/lib/nvidia.sh b/lib/nvidia.sh index 449a9d6..fac2c2b 100644 --- a/lib/nvidia.sh +++ b/lib/nvidia.sh @@ -41,6 +41,12 @@ nvidia_present() { # A PC that has this on keeps it until the conversion is turned on, which calls nvidia_swap_out. nvidia_available() { return 1; } +nvidia_migration_pending() { + # "Gaming on NVIDIA" is on (set up before 2.11.2) and the SteamOS conversion that replaces it isn't: the menu ticks the + # conversion and shows it as an update, so a normal run moves the PC over (nvidia_swap_out in gsn_enable). + nvidia_present && nvidia_status && ! gaming_status 2>/dev/null +} + nvidia_swap_out() { # The conversion takes over: Steam no longer starts by itself on the desktop at login (both would start it). Steam, the # packages and the NVIDIA settings stay: the conversion needs them too. The state stays for the conversion's own disable. diff --git a/ui/qml/AppState.qml b/ui/qml/AppState.qml index 6148d9c..8448ba3 100644 --- a/ui/qml/AppState.qml +++ b/ui/qml/AppState.qml @@ -101,7 +101,8 @@ Item { if (it.kind !== "toggle") continue; if (hidden(it)) { if (it.on) p.push({ id: it.id, action: "off" }); continue; } if (it.parent && !want[it.parent]) { if (it.on) p.push({ id: it.id, action: "off" }); continue; } - if (want[it.id] && !it.on) p.push({ id: it.id, action: "on", isNew: !!it["new"] }); + // (An item that is off but flagged "update" replaces what the PC has: the conversion for "Gaming on NVIDIA".) + if (want[it.id] && !it.on) p.push({ id: it.id, action: it.update ? "update" : "on", isNew: !!it["new"] }); else if (!want[it.id] && it.on) p.push({ id: it.id, action: "off" }); else if (want[it.id] && (reapply || it.update)) p.push({ id: it.id, action: reapply ? "again" : "update" }); }