Files
larp/docs/linux.md

6.8 KiB

Running larp on Linux (Proton / Wine)

larp.exe compiles on Linux as a Windows x86_64-pc-windows-msvc binary via cargo-xwin, then runs through umu-launcher and Steam Proton (vkd3d-proton).

Proprietary and Copyrighted Files

This repository contains zero game files, Windows system DLLs, MSVC/Windows SDK redistributables, or GPU vendor binaries. You must supply your own:

  • Game files: your own Xbox Series title directory (for example, game_scarlett_master.exe and its archives).
  • Proton: installed locally through Steam (Proton - Experimental recommended).
  • Windows cross-compilation SDK: downloaded locally at build time by cargo-xwin into your user cache (never committed to the repo).
  • Native d3dcompiler_47.dll: fetched locally into your Proton prefix at setup time via winetricks (linux/setup.sh).
  • Optional NVIDIA DLSS / AMD FSR DLLs: nvngx_dlssg.dll / nvngx_dlssd.dll come from your installed NVIDIA driver's Wine directory, while nvngx_dlss.dll (or AMD FidelityFX DLLs) must be supplied from your own game or SDK copy.

Runtime caches, saves, logs, and the Proton prefix are always kept outside the repository because of .larp-root (~/.local/share/larp and ~/.cache/larp by default, or LARP_HOME if configured).


Requirements

Nix / NixOS

The included flake.nix provides every non-Rust build and runtime dependency (cargo-xwin, unwrapped clang-cl, lld-link, dxc, umu-run, winetricks, cabextract). You only need rustup with the toolchain from rust-toolchain.toml and x86_64-pc-windows-msvc:

rustup toolchain install 1.98.1 --profile minimal --target x86_64-pc-windows-msvc

The scripts under linux/ automatically enter nix develop when nix is installed and any tool is missing (set LARP_NO_NIX_AUTO=1 to disable).

Arch / Fedora / Debian & Ubuntu

Install the cross-compile and Proton runtime dependencies with your package manager:

  • Arch Linux: pacman -S clang lld llvm cargo-xwin directx-shader-compiler umu-launcher winetricks cabextract
  • Fedora: dnf install clang lld llvm cargo-xwin directx-shader-compiler umu-launcher winetricks cabextract
  • Debian / Ubuntu: install clang, lld, llvm, winetricks, cabextract, umu-launcher (or Steam runtime), cargo install cargo-xwin, and dxc from the DirectXShaderCompiler releases.
  • All distros: install the pinned Rust target via rustup toolchain install 1.98.1 --profile minimal --target x86_64-pc-windows-msvc.

Install Proton - Experimental through Steam (or set PROTONPATH=/path/to/proton). On X11/Wayland multi-GPU systems (e.g., Intel/AMD iGPU + discrete NVIDIA), ensure Vulkan ICDs are installed for your discrete GPU.


Quickstart

  1. Cross-compile larp.exe and replacement DXIL shaders:

    ./linux/build.sh --install-toolchain
    

    Pass --diag for diagnostics builds or --tracy for Tracy builds.

  2. Prepare runtime directories, Proton prefix, native d3dcompiler_47.dll, and NVIDIA DLSS links:

    ./linux/setup.sh
    

    If using NVIDIA DLSS upscaling, pass --dlss-dir /path/to/folder/with/nvngx_dlss.dll (or copy nvngx_dlss.dll into ~/.local/share/larp/dlss/). Run ./linux/setup.sh --check at any time for a read-only status summary.

  3. Launch the title:

    ./linux/run.sh /path/to/game/game_scarlett_master.exe
    

    Full output is written to play.log inside your data directory and streamed to the terminal (--no-tail disables streaming; --dry-run skips --execute).


Persistent Configuration (~/.config/larp/linux.env)

Copy linux/config.example.env to ~/.config/larp/linux.env to store your local game path, custom data directory (LARP_HOME), Proton path, or preferred LARP_* defaults without modifying tracked files:

mkdir -p ~/.config/larp
cp linux/config.example.env ~/.config/larp/linux.env

Once configured, you can start the game simply with:

./linux/run.sh

linux/run.sh automatically exposes non-standard directories (and any resolved symlink targets, such as external DLSS DLLs) to Proton's steamrt4 container via PRESSURE_VESSEL_FILESYSTEMS_RW.


GPU & Driver Notes

NVIDIA

  • Enables PROTON_FORCE_NVAPI=1, VKD3D_FILTER_DEVICE_NAME=NVIDIA, DXVK_FILTER_DEVICE_NAME=NVIDIA, and persistent NVIDIA GL/Vulkan shader caches outside the repo.
  • Enables LARP_UPSCALER=dlss, LARP_UPSCALER_SCALE=balanced, and LARP_REFLEX=boost when nvngx_dlss.dll is present, plus LARP_FRAME_GENERATION=2x (LARP_FRAME_GENERATOR=dlss) when nvngx_dlssg.dll is linked.
  • VKD3D_CONFIG=pipeline_library_app_cache keeps compiled pipelines in larp's own disk cache instead of duplicating them in vkd3d-proton.cache.

AMD

  • Defaults AMD_VULKAN_ICD=RADV.
  • If you supply amd_fidelityfx_loader_dx12.dll and point LARP_FSR_PATH at its folder (as a Z:\... Windows path), linux/run.sh enables FSR upscaling automatically.

First-Run Shader Pre-Warming & Controls

  • Two-stage pipeline pre-warming: on a cold first launch, larp pre-warms roughly ~60,000 startup pipelines while holding title input on the landing screen (Compiling pipelines bar at the top). Press Cross (X) / A / Enter after input unlocks to start loading, which triggers a second render-phase batch (~23,500 pipelines). Both batches cache to disk for fast subsequent launches.
  • Overlays & windowing:
    • F9: Toggle performance overlay.
    • F10: Toggle live larp settings menu (writes to settings.ini).
    • Alt+Enter: Toggle borderless fullscreen (LARP_DISPLAY_MODE=borderless can also be used safely at startup).
  • Controllers & KB+M: DualSense/DualShock 4 controllers work natively over Bluetooth/USB HID; once a controller button is pressed, keyboard-to-pad fallback steps aside automatically.

Troubleshooting

  • Host ray tracing says disabled / Load4 shader compile error: run ./linux/setup.sh so native Microsoft d3dcompiler_47.dll is installed in the Wine prefix. Wine's builtin d3dcompiler_47.dll (vkd3d-shader) cannot compile RWByteAddressBuffer::Load4.
  • int3 / 0x80000003 crash at startup with custom resolution: leave LARP_RESOLUTION unset on Series X builds. The title allocates a fixed 64 MiB 4K backbuffer arena and asserts if lower resolutions leave too much of that arena unused; larp scales the window automatically.
  • Blank/frozen window under X11 compositors (picom, etc.) or tiling WMs: toggle fullscreen with your window manager or Alt+Enter so the compositor unredirects the swap chain window.
  • Debugging stalls or black frames: launch with LARP_STALL_S=5 (dumps all thread stacks on stalls) or LARP_CAPTURE=/tmp/larp-capture (saves presented PNGs), e.g. LARP_STALL_S=5 ./linux/run.sh.