gENVW small helper script for Proton/FSR4/MangoHUD on CachyOS (`gaming_env_wrapper.sh`)

Hey,

I’ve been playing around with Proton, FSR4, HDR and MangoHUD on CachyOS and ended up writing a small helper script that might be useful for others too.

Instead of stuffing huge, unreadable environment strings into Steam launch options or fighting with Lutris → Steam → Proton env forwarding, this script lets you control everything with short toggles like:

HDR=1 FSR4=4.0.2 FPS=141 HUD=1 LSC=1 NVMD=1 NTS=1 CPU=16 GP=1 GM=1 \
$HOME/bin/gaming_env_wrapper.sh %command%

GitHub repo (with full README, toggle reference and details):


What problem does this solve?

  • Long Proton / DXVK / MangoHUD env strings in Steam are annoying to type and hard to maintain per game.

  • Lutris env vars don’t always reliably make it all the way through to Steam → Proton.

  • FSR4 on RDNA3/RDNA4 has some weird env naming quirks (PROTON_FSR4_RDNA3_UPGRADE vs PROTON_FSR4_UPGRADE) and it’s easy to forget which is which.

  • CachyOS has nice stuff like game-performance, but wiring it per game can be tedious.

  • The idea is: one script, with short toggles, that you can reuse across games and launchers.

    Feedback, ideas and wishes for specific toggles or behavior improvements are very welcome — if there’s a function you’d like to see added, feel free to suggest it.

The idea is: one script, with short toggles, that you can reuse across games and launchers.

What this script does

gaming_env_wrapper.sh is a pure shell wrapper that:

  • Reads short env toggles like HDR=1, FSR4=4.0.2, FPS=141, HUD=1, ASYNC=1, CPU=16, GP=1, GM=1, etc.
  • Translates them into the real env vars for Proton / DXVK / Wine / MangoHUD.
  • Knows about FSR4 quirks (RDNA3 vs RDNA4 env vars).
  • Can optionally wrap the game in game-performance (CachyOS) and/or gamemoderun if installed.
  • Finally execs the original game command (%command% from Steam).

No sudo, no system changes – it just sets env vars and runs the game.


Example usage (Steam)

In Steam → Properties → General → Launch Options, you can do:

HDR=1 FSR4=4.0.2 FSR4SHOW=1 FPS=117 HUD=1 LSC=1 NVMD=1 NTS=1 CPU=16 GP=1 GM=1 \
$HOME/bin/gaming_env_wrapper.sh %command%

Notes:

  • HDR=1 assumes Wayland HDR is set up. On X11, leave HDR off.
  • GP=1 uses game-performance if present.
  • GM=1 uses gamemoderun if present.

Interactive “wizard” mode

If you run the script directly in a terminal:

gaming_env_wrapper.sh
# or
$HOME/bin/gaming_env_wrapper.sh

it starts an interactive wizard that:

  • Tries to auto-detect your AMD GPU (RDNA2 / RDNA3 / RDNA4 / unknown) via lspci.
  • Asks if you want HDR, which FSR4 version to use, MangoHUD on/off + FPS limit, DXVK async, local shader cache, fake CPU topology, and whether to use game-performance / gamemoderun, etc.

At the end it prints a ready-to-paste Steam launch line, like:

=== Generated Steam launch options ===

HDR=1 FSR4=4.0.2 FPS=141 HUD=1 LSC=1 NVMD=1 NTS=1 CPU=16 GP=1 \
$HOME/bin/gaming_env_wrapper.sh %command%

Installation (simple version)

  1. Download the script:

    mkdir -p "$HOME/bin"
    cd "$HOME/bin"
    curl -LO https://raw.githubusercontent.com/furbakka/gaming_env_wrapper/main/gaming_env_wrapper.sh
    chmod +x gaming_env_wrapper.sh
    
  2. Make sure $HOME/bin is in your PATH (fish example):

    set -U fish_user_paths $HOME/bin $fish_user_paths
    
  3. Verify:

    which gaming_env_wrapper.sh
    

For the full toggle matrix (HDR/FSR4/FFSR/MangoHUD/async/NTS, etc.), RDNA detection behaviour and more examples, see the README in the GitHub repo: