- Upgrade the known 2013 compiler from Microsoft SDK after verifying its hash. - Warn about the outdated DLL and document shader model 5.1 failures.
7.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.exeand its archives). - Proton: installed locally through Steam (
Proton - Experimentalrecommended). - Windows cross-compilation SDK: downloaded locally at build time by
cargo-xwininto your user cache (never committed to the repo). - Native
d3dcompiler_47.dll: fetched locally into your Proton prefix at setup time viawinetricks(linux/setup.sh). If winetricks installs the known 2013 version, setup upgrades its 64-bit DLL from Microsoft's Windows SDK because it cannot compile shader model 5.1. - Optional NVIDIA DLSS / AMD FSR DLLs:
nvngx_dlssg.dll/nvngx_dlssd.dllcome from your installed NVIDIA driver's Wine directory, whilenvngx_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 (devenv, direnv, or nix develop)
The included devenv.nix, devenv.yaml, .envrc, and flake.nix provide every non-Rust build and runtime dependency (cargo-xwin, unwrapped clang-cl, lld-link, dxc, umu-run, winetricks, cabextract, shellcheck). 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
Choose whichever workflow you prefer:
devenv: rundevenv shellin the repository root, or invoke the bundled commands (larp-build,larp-setup,larp-run,larp-check).direnv: rundirenv allowonce so entering the repository directory loadsdevenvautomatically (falling back touse flakewhendevenvis not installed).nix develop/ scripts directly: the scripts underlinux/automatically enternix developwhennixis installed and any tool is missing (setLARP_NO_NIX_AUTO=1to 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, anddxcfrom 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
-
Cross-compile
larp.exeand replacement DXIL shaders:./linux/build.sh --install-toolchainPass
--diagfor diagnostics builds or--tracyfor Tracy builds. -
Prepare runtime directories, Proton prefix, native
d3dcompiler_47.dll, and NVIDIA DLSS links:./linux/setup.shIf using NVIDIA DLSS upscaling, pass
--dlss-dir /path/to/folder/with/nvngx_dlss.dll(or copynvngx_dlss.dllinto~/.local/share/larp/dlss/). Run./linux/setup.sh --checkat any time for a read-only status summary. -
Launch the title:
./linux/run.sh /path/to/game/game_scarlett_master.exeFull output is written to
play.loginside your data directory and streamed to the terminal (--no-taildisables streaming;--dry-runskips--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, andLARP_REFLEX=boostwhennvngx_dlss.dllis present, plusLARP_FRAME_GENERATION=2x(LARP_FRAME_GENERATOR=dlss) whennvngx_dlssg.dllis linked. VKD3D_CONFIG=pipeline_library_app_cachekeeps compiled pipelines inlarp's own disk cache instead of duplicating them invkd3d-proton.cache.
AMD
- Defaults
AMD_VULKAN_ICD=RADV. - If you supply
amd_fidelityfx_loader_dx12.dlland pointLARP_FSR_PATHat its folder (as aZ:\...Windows path),linux/run.shenables FSR upscaling automatically.
First-Run Shader Pre-Warming & Controls
- Two-stage pipeline pre-warming: on a cold first launch,
larppre-warms roughly~60,000startup pipelines while holding title input on the landing screen (Compiling pipelinesbar at the top). Press Cross (X) /A/Enterafter input unlocks to start loading, which triggers a second render-phase batch (~23,500pipelines). Both batches cache to disk for fast subsequent launches. - Overlays & windowing:
F9: Toggle performance overlay.F10: Toggle livelarpsettings menu (writes tosettings.ini).Alt+Enter: Toggle borderless fullscreen (LARP_DISPLAY_MODE=borderlesscan 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 disabled / shader compile errors: run
./linux/setup.shto install the native Microsoftd3dcompiler_47.dll. Wine's builtin may fail onRWByteAddressBuffer::Load4; the old 2013 Microsoft DLL can instead fail withX3506: unrecognized compiler target 'cs_5_1'orvs_5_1. Setup recognizes that exact old version and upgrades it to Windows SDK 10.0.28000.2705, saving the original asd3dcompiler_47.dll.old-2013. Other native DLL versions are left untouched. Checkplay.logforhost ray tracing: onafter starting the game; DLL presence alone does not confirm shader compilation. int3/0x80000003crash at startup with custom resolution: leaveLARP_RESOLUTIONunset 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;larpscales the window automatically.- Blank/frozen window under X11 compositors (
picom, etc.) or tiling WMs: toggle fullscreen with your window manager orAlt+Enterso the compositor unredirects the swap chain window. - Debugging stalls or black frames: launch with
LARP_STALL_S=5(dumps all thread stacks on stalls) orLARP_CAPTURE=/tmp/larp-capture(saves presented PNGs), e.g.LARP_STALL_S=5 ./linux/run.sh.