v0.1.12 — Patch gamescope-session-plus so refresh-rate selection actually reaches gamescope
The real bug behind every "60 Hz stuck in Gaming Mode" report:
- DeckShift installs `gamescope` from Arch's `extra` repo (upstream
Valve binary). That binary does NOT have `--custom-refresh-rates`.
The flag is a ChimeraOS-fork (`gamescope-plus`) addition that
never landed upstream, and the fork is not packaged in AUR for
64-bit Arch.
- The AUR `gamescope-session-git` script (OpenGamingCollective,
ex-ChimeraOS) was written assuming gamescope-plus. It feature-
detects via `gamescope_has_option "--custom-refresh-rates"` and
silently drops the value when missing.
- Net effect: CUSTOM_REFRESH_RATES from the env conf reaches the
session script but never reaches the gamescope binary. Every
refresh-rate selection in the DeckShift TUI since the project
began has been a paper fix; gamescope just launched at the
EDID-preferred mode (usually 60 Hz).
- v0.1.8's comma-list "fix" was correct on paper but the value
never reached the binary, so it didn't actually do anything on
Omarchy. The Framework Desktop user wasn't reporting a hardware-
specific bug — they were the first user to notice a bug that
affected everyone, because their 170 Hz monitor made the regression
obvious. On a 165 Hz Acer Nitro you'd just never notice 60 vs 165
in Steam BPM.
Fix: ./deckshift.sh now patches the installed gamescope-session-plus
in place, adding an elif fallback that uses `--nested-refresh` (a flag
present in every gamescope version) with the highest value from the
CUSTOM_REFRESH_RATES list as the launch rate. Marked with a
DECKSHIFT-NESTED-REFRESH-FALLBACK sentinel comment for idempotency,
re-applied on every install so AUR upgrades that clobber the file
don't silently regress refresh-rate handling.
Implementation: new patch_gamescope_session_plus() function in
deckshift.sh, called from setup_session_switching() after the AUR
install completes. Uses Python regex with a function-based replacement
(re.sub with a string-form replacement was the first attempt and got
caught by Python's backslash processing turning `\n` in the `tr`
argument into a real newline — function callbacks bypass that, so the
literal `\n` reaches the shell as intended).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
52c883b780
commit
a3cb6f28e4
@@ -10,6 +10,12 @@ Lineage: forked from [Super-Shift-S-Omarchy-Deck-Mode](https://git.no-signal.uk/
|
||||
|
||||
## What's New
|
||||
|
||||
### v0.1.12 — Refresh-rate selection actually reaches gamescope now
|
||||
|
||||
- **The real bug:** Omarchy installs `gamescope` from Arch's `extra` repo (upstream Valve binary), but the AUR `gamescope-session-git` script (OpenGamingCollective / ex-ChimeraOS fork) was written assuming the ChimeraOS-fork `gamescope-plus` binary that ships `--custom-refresh-rates`. The fork isn't packaged for 64-bit Arch — we can't install it cleanly. The session script feature-detects via `gamescope_has_option "--custom-refresh-rates"`, finds it absent, and **silently drops the `CUSTOM_REFRESH_RATES` value before it reaches gamescope**. Net effect: every refresh-rate selection in the DeckShift TUI since the project began has been a no-op. Gaming Mode has been launching at the EDID-preferred mode (usually 60 Hz) regardless of what the user picked. v0.1.8's "60 Hz fix" was correct on paper but never actually reached the binary on Omarchy.
|
||||
- **The fix:** `./deckshift.sh` now patches `/usr/share/gamescope-session-plus/gamescope-session-plus` in place, adding an `elif` branch that falls back to `--nested-refresh` (a flag present in every gamescope version) with the highest value from the `CUSTOM_REFRESH_RATES` list as the launch rate. The patch is marked with a `DECKSHIFT-NESTED-REFRESH-FALLBACK` sentinel comment for idempotency, and is re-applied on every install so AUR upgrades that clobber the file don't silently regress refresh-rate handling.
|
||||
- **What you should do after upgrading:** re-run `./deckshift.sh` once. Future-you, if you ever see Gaming Mode stuck at 60 Hz after a `pacman -Syu` that touched `gamescope-session-git`, just re-run the installer — the patch reapplies cleanly.
|
||||
|
||||
### v0.1.11 — Multi-monitor handling: disable an auxiliary monitor before Gaming Mode
|
||||
|
||||
- New env var `OUTPUT_CONNECTOR_TO_DISABLE` (single connector or comma list). When set, `switch-to-gaming` runs `hyprctl keyword monitor <conn>,disable` for each listed connector *before* SDDM restart, while Hyprland is still alive. The disable is runtime-only — when the user returns from Gaming Mode, the new Hyprland reads its static config fresh and the monitor comes back automatically.
|
||||
|
||||
Reference in New Issue
Block a user