Skip to content

Linux install never runs the shader compatibility scan; missing report is treated as a failed scan, so FSR/RenderScale is silently disabled and the Extra tab always shows Native #66

Description

@Petyok

Optimum version: 0.3.14 (source zip from 2026-08-27; the same tag before the 2026-09-01 update)
Install method: ./scripts/install-linux.sh --install-dir ~/Applications/optimum --non-interactive
Host: Arch Linux, Vintage Story 1.22.7, Intel HD 6000 (Mesa 26.2), .NET 10.0.11

Summary

On Linux the installed client never runs the shader compatibility scan, so <dataPath>/.optimum/shader-compatibility.json is never written. The game-side loader treats a missing report as a failed scan, which silently disables every optional shader feature — including RenderScale (FSR). The result for the user: the Extra tab always shows Render Scale = Native, changing the dropdown does nothing (and looks like "settings reset on every restart"), and FSR is never active. No warning anywhere.

The Windows package (built off-platform with make package-win) behaves correctly: Optimum.exe is the real launcher, the scan runs, the report is written, FSR works.

Evidence

1. The Linux install has no runtime launcher.

$ file ~/Applications/optimum/Optimum
ELF 64-bit LSB pie executable, x86-64 ...
$ strings ~/Applications/optimum/Optimum | grep -m1 '\.dll$'
Vintagestory.dll                      # apphost for the game, not for Optimum.dll
$ ls ~/Applications/optimum | grep -i '^Optimum'
Optimum  Optimum.Api.Contracts.dll  Optimum.desktop  optimum-launch.sh   # no Optimum.dll

install-linux.sh patches the assemblies in place at install time (Patching VintagestoryLib.vanilla.dll... in the install log; VintagestoryLib.vanilla.dll sits next to the patched VintagestoryLib.dll). ShaderCompatibilityScanner.Scan() / SaveReport() live in Optimum.Launcher/Program.cs, so with no launcher process they never execute.

2. Consequently the data path has no launcher state at all:

$ ls -a ~/.config/VintagestoryData/.optimum/     # after several weeks of use
ls: cannot access ...: No such file or directory
$ find ~ -name shader-compatibility.json -o -name optimum-launcher.log    # nothing

3. Game side: a missing report equals a failed scan.

sources/VintagestoryApi/Config/OptimumConfig.cs, LoadShaderCompatibilityReport():

_shaderCompatibilityScanFailed = true;          // pessimistic default
...
if (!File.Exists(reportPath)) return;           // ← missing file leaves ScanFailed == true

and

public static bool IsShaderFeatureDisabled(string feature) =>
    _shaderCompatibilityScanFailed || _shaderCompatibilityDisabledFeatures.Contains(feature);

public static float EffectiveRenderScale => IsShaderFeatureDisabled("RenderScale") ? 1.0f : RenderScale;

So ClientSettings.OptimumRenderScale is forced to 1.0 at startup regardless of ModConfig/optimum.json (mine has "RenderScale": 0.67), the Extra tab renders "Native", and onOptimumRenderScaleChanged returns early:

if (OptimumConfig.IsShaderFeatureDisabled("RenderScale")) return;

which the user perceives as "the setting resets every time I relaunch".

Repro

  1. Install on Linux via install-linux.sh.
  2. Put "RenderScale": 0.67 into <dataPath>/ModConfig/optimum.json (or pick Performance in the Extra tab).
  3. Launch, open Settings → Extra: Render Scale shows Native. Change it, restart: still Native. No log line explains why.

Workaround that confirms the diagnosis

Hand-writing the report the scanner would have produced for this mod set (CarryOn = Harmony render hooks, no external shader assets):

{ "ScanFailed": false, "Fingerprint": null,
  "DisabledFeatures": ["EntityLightBatch","EntityShaderStateCache","MapPageCache","Oit","ShaderPreprocessParallel"] }

into ~/.config/VintagestoryData/.optimum/shader-compatibility.json → next launch the Extra tab shows Performance, the choice persists, and FSR is visibly active. Measured on a 15 W Broadwell-U (i5-5350U + HD 6000): in singleplayer the CPU cores stopped dipping to 500 MHz under load (the iGPU no longer starves the shared package power budget), package temperature median 81 °C / max 87 °C over 7 minutes, zero thermal-throttle events, no stutter.

Suggested fixes

  1. Linux packaging: either ship and use the launcher (as on Windows/macOS) so the scan runs, or run ShaderCompatibilityScanner once from install-linux.sh / optimum-launch.sh and write the report into the data path. Note the scan has to be repeated when the mod set changes, which argues for the launcher route.
  2. Loader semantics: a missing report should not be reported as ScanFailed = true. Options: treat "no report" as "nothing disabled" (matches the Windows behaviour when the scan finds conflicts=0), or keep the pessimistic default but log a clear warning and show a hint in the Extra tab ("shader scan not run — FSR disabled") instead of silently rendering Native and ignoring the dropdown.

Happy to test a patched build on Linux — this box reproduces it deterministically.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behaviorinstallerInstall, packaging, or bootstraplinuxLinux-specific

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions