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.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). - 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
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, 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 says
disabled/Load4shader compile error: run./linux/setup.shso native Microsoftd3dcompiler_47.dllis installed in the Wine prefix. Wine's builtind3dcompiler_47.dll(vkd3d-shader) cannot compileRWByteAddressBuffer::Load4. 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.