Skip to content
deynesdevPublic

About

Protonida — Run GTA VI on Linux (Wine/Proton + vkd3d-proton new structurizer + RB-tree wineserver) at 8.8-13.7 FPS on 6 GB RTX 4050

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Protonida

Xbox Series X|S compatibility layer tuned for Linux, Wine + vkd3d-proton, and 6 GB NVIDIA RTX GPUs

Platform GPU Rust License

Native x64 execution • RDNA 2 → DXIL shader translation • Hardware Ray-Traced GI & Reflections • Zero CPU emulation


Overview

Protonida is a standalone, Linux-first fork of the VIctory Xbox Series X|S compatibility layer, engineered to deliver Xbox Series S visual fidelity — including native hardware ray-traced global illumination (VICTORY_BVH_BUILDER=1) — and playable 20–30 FPS performance on Linux with 6 GB VRAM NVIDIA laptop GPUs (tested on an RTX 4050 Laptop + Ryzen 5 7535HS under Fedora 44, Wine Staging, and vkd3d-proton 3.2.0).

Disclaimer: This repository contains no game files, binaries, keys, or assets. You must supply your own legally obtained files. Protonida is not affiliated with or endorsed by any game developer, publisher, or console manufacturer.


Live Linux Captures (RTX 4050 Laptop 6 GB)

Hardware RTX - Character Lighting & Subsurface Scattering
Series S Hardware RTX (`BVH_BUILDER=1`) — native RTGI, hair rim lighting, skin SSS
Hardware RTX - Red Bounce & Reflections
Series S Hardware RTX (`BVH_BUILDER=1`) — red bounce lighting & specular sheen
Vice City Night Street
Vice City at Night — clean 720p Series S output on Linux + Wine + vkd3d-proton 3.2.0

Benchmarks

Test machine: Fedora 44 (Linux 7.2.15, /dev/ntsync) • AMD Ryzen 5 7535HS (6c/12t) • 30 GB RAM • NVIDIA RTX 4050 Laptop (6 GB VRAM, driver 580.196.07) • Wine Staging + patched RB-tree wineserver • vkd3d-proton 3.2.0 • 720p Series S profile.

Performance Progression

Milestone 3D World (~526–594 draws) Mid City (~1,250–1,911 draws) Heavy City (~2,550–2,700 draws) GPU Wait / Stall*
Initial Linux + vkd3d-proton 3.2.0 ~1.3 FPS (~770 ms) ~1.0 FPS (~1000 ms) ~0.8 FPS (~1250 ms) 100+ ms
Wine watch.rs/xmem.rs + RB-tree wineserver + 6 GB budget 3.3–3.6 FPS (278–303 ms) — 1.8–2.2 FPS (455–555 ms) ~110 ms
Port 1 + LATE_WAIT=2 + 720p (UPSCALER=6) + impostor skip 11.7 FPS (85.5 ms) — 4.6–5.2 FPS (192–217 ms) ~110 ms
CARD_BUFFERS_MIN_KB=64 + BufferSweep + parallel readbacks 17.3 FPS (57.7 ms) — 12.1 FPS (82.4 ms) 0–17 ms
Protonida — Series S + Screen-Space SH GI (BVH_BUILDER=0, SKIP_RT=1) 25.7–29.3 FPS (34.2–38.9 ms) 25.3 FPS (39.5 ms) 20.4 FPS (48.9 ms) 0.0 ms
Protonida — Series S + Hardware RTX (BVH_BUILDER=1, rtDynamicShadows=false) 27.0 FPS (37.1 ms) 20.9 FPS (47.7 ms) 17.2–18.7 FPS (53.5–58.1 ms) 0.0–0.4 ms

*GPU Wait / Stall is the CPU-side fence wait logged by victory_gpu::host (on the GPU) while waiting for the GPU to finish queued work — not raw GPU execution time. With async submission (VICTORY_LATE_WAIT=3 + VICTORY_ASYNC_SUBMIT=1), frames are currently CPU preparing-bound on Wine rather than GPU-stalled.


Progress, Stability & Known Issues

  • Story & in-game progression tested: Full boot → menus → opening cinematic & live 3D Vice City night/street scenes (500–2,800+ draws/frame) verified with both Series S Hardware RTX (VICTORY_BVH_BUILDER=1, all 53 BVH builder pipelines active) and Screen-Space SH GI (VICTORY_BVH_BUILDER=0). Extended story mission / free-roam playtesting and an uninterrupted MangoHud video capture are next in line.
  • Stability: Stable across repeated automated 90–140 s world/city runs on 6 GB VRAM once shaders are cached (0 DXGI device removals, 0 VRAM OOMs). Long-session (30+ min) stability testing is still in progress. First-time shader translation + vkd3d-proton pipeline compilation takes several minutes and causes temporary hitching until vkd3d-proton.victory.exe.cache warms up.
  • Input & Audio: GameInput keyboard and XInput controller input work (including scripted VICTORY_KEYS in release builds). Audio runs through Wine's standard audio backend.
  • Wine wineserver note: Benchmarks above use a locally patched RB-tree view-indexed + /dev/ntsync wineserver to cut VirtualProtect/GetWriteWatch IPC overhead. On unpatched stock Wine Staging, heavy-city CPU copies time is higher (~3–5 ms/frame slower depending on kernel/Wine version).
  • Known issues & visual trade-offs:
    • Heavy 2,500–2,800+ draw city scenes remain CPU preparing-bound on Linux/Wine (copies ~11–16 ms/frame from VirtualProtect/GetWriteWatch IPCs + per-draw CBV copies).
    • NVIDIA's 1,000,000-descriptor shader-visible heap cap prevents Renderer Port #5 (VICTORY_PORT_CBV=1) table raw_twins, so table CBVs are still copied into dynamic slots per draw (mitigated by VICTORY_TABLE_STAGES).
    • rtDynamicShadows="false" + ssroSampleCount="1" in settings.xml trade dynamic ray-traced shadows for higher FPS while keeping full hardware RTGI and RT reflections.
    • Distant octahedral billboard impostors render as flat panels and are skipped via VICTORY_SKIP_PIPELINES (removing broken flat distant panels at the cost of some distant billboard LODs).
    • VICTORY_OUTPUT=1280x720 requires VICTORY_UPSCALER=6 on Series S to avoid a FidelityFX jitter divide-by-zero.

What Makes Protonida Fast on Linux & 6 GB NVIDIA

Linux & Wine Engineering

  • Wine-native memory & write-watch tracking (watch.rs, xmem.rs): Tracks placeholder/watched reservations in-process to eliminate refused GetWriteWatch calls (293 → 0) and VirtualQuery hole scans (6,705 → 14), plus batched contiguous VirtualProtect(..., PAGE_READWRITE) unguarding (LoverCatys c0a3a1ff).
  • Wine hot-guard tuning (VICTORY_GUARD_HOT=1000, VICTORY_GUARD_REST=50000, MANY = 65,536): Cuts wineserver VirtualProtect IPC faults and guard refreshes without introducing stale-frame artifacts.
  • Opt-in Linux UFFD_FEATURE_WP_ASYNC + PAGEMAP_SCAN bridge (native/protonida_uffd.c, VICTORY_UFFD_WP=1): Experimental LD_PRELOAD bridge bypassing wineserver IPC (kept opt-in after benchmarking showed VirtualProtect + PUBLISHED is faster on multi-GiB MEM_MAPPED views).
  • Frametime percentile telemetry (p50 / p95 / p99 / max) & ring-buffer CSV (VICTORY_FRAME_DIAG): Logged every 5 seconds in victory_gpu::host alongside FPS, VRAM, descriptor stats (VICTORY_DESCRIPTOR_STATS=1), and optional async per-frame CSV output; plus opt-in swapchain VSync (VICTORY_VSYNC=1 + VKD3D_SWAPCHAIN_LATENCY_FRAMES=1, eliminating 2D/Bink intro cadence spikes).
  • 16 MB pipeline worker stacks: Prevents silent Wine 2 MB default thread stack overflows during shader translation.
  • Portable static libunwind (+crt-static) + AVX2 (x86-64-v3) + Thin LTO (codegen-units = 1): Zero llvm-mingw runtime DLL dependencies (libunwind.dll eliminated) and maximum CPU throughput across hot copy, hash, and descriptor loops.

NVIDIA 6 GB & Renderer Optimizations

  • Renderer Ports 1, 2, 6, and 7 (via avatarmanz/VIctory-7900XTX):
    • Port 1 (VICTORY_PORT_CONSTANTS=1): Maps the 185 MB graphics heap in place via OpenExistingHeapFromAddress (0 host refusals on vkd3d-proton 3.2.0).
    • Port 2 (VICTORY_PORT_DESCRIPTORS=1): Patches descriptor-table stores directly instead of scanning ~600,000 slots/frame.
    • Port 6 (VICTORY_PORT_GUARD=1): Shared RwLock write guards with per-block claims and parallel refresh planning.
    • Port 7 (VICTORY_PORT_JOURNAL=1): 64-way sharded journal locks + submit-time heap sync.
  • NVIDIA 1M-heap CreateCommittedResource storm fix: Eliminated 19,761 unnecessary per-view buffer allocations (OWN_MADE: 19,761 → 2, saving ~230 ms/frame).
  • Pooled SHARED_SPARE uploads & WIDE_JOB (256 KiB) (leonida c6c9da9f): Reuses L0 WRITE_BACK upload buffers up to 8 MiB and cuts copy/shadow overhead (copies 23.7–28.9 ms → ~19.4 ms).
  • Configurable capped-heap dynamic slots (VICTORY_DYNAMIC_SLOTS): Safely bounds dynamic slots on NVIDIA's 1M-capped view heap (default 262,144 preserves static slots 0..737,855).
  • BufferSweep span cache & parallel texture readbacks (XaviFortes/VIctory-RDNA) + safe VICTORY_INDIRECT_WINDOW=0 (Itsbatt 340a8f8).
  • Wine hot-block table expansion (MANY = 65,536) — prevents hot-guard table wipes during streaming.
  • NVIDIA dynamic descriptor word-search & early slot release (avatarmanz PR #237).
  • Optional RT pass skipping (VICTORY_SKIP_RT=1): Skips 15 unused ray-tracing compute passes and their VRAM allocations when running in non-RT mode.

Series S Graphics & Shader Correctness

  • Native Hardware Ray Tracing (VICTORY_BVH_BUILDER=1) + RT indoor ambient band (VICTORY_AMBIENT_RT) (avatarmanz 77137b98): All 53 BVH structure builder pipelines run natively on NVIDIA RTX via vkd3d-proton, while VICTORY_AMBIENT_RT=0.35,2.5,0.8 prevents crushed black indoor rooms without washing out RTGI detail.
  • Renderer Port 1 indirect ordering (VICTORY_PORT_CONSTANTS_ORDER) (avatarmanz 631400f5..15c3d0ea): Clamps in-place indirect arguments right before execution to eliminate tree/palm and lamp-lit room flicker.
  • DirectStorage black-face fix (VICTORY_PAGE_WRITES=3), dynamic table VIEW_INTEGER (HostHeap::dynamic_word), and split-submission slot release (fxceless e4245f3c / #1320, flamingo a1178ce8): Re-queues texture slots under DirectStorage writes, populates self.strides for dynamic table slots, and releases split-submission descriptor slots.
  • Targeted Wave32 compute auto-refresh (host_shader_fresh) & HostList::untouched() upload guard (leonida dd306a64): Automatically re-translates stale refused Wave64 compute pipelines (e.g. 6871d6e4b3ac9a10) without invalidating the shader cache, and guards plane_uploads/shared_uploads while keeping pooled uploads + Kelvaroq 6 GB VRAM budgets (VICTORY_CARD_BUFFERS_MB=256, VICTORY_TEXTURE_STAGE_MB=64, VICTORY_TEXTURE_BUDGET_MB=512).
  • Wave32 loose-LDS & ds_bpermute_b32 lowering (leonida 76c6f04c): Lowers Wave64 compute shaders that read/write LDS across divergent branches to NVIDIA Wave32 cleanly, plus CalculateLOD coordinate fix.
  • BC7 texture rotation fix (fxceless 06702fe / upstream #3111).
  • RDNA 2 fused v_mad_legacy_f32 with FTZ & zero-factor semantics (fxceless f6a09d3 / PR #1026).
  • SDWA 16-bit sign extension (fxceless 58de9bf / upstream #3124).
  • Distant billboard impostor skip (VICTORY_SKIP_PIPELINES): Ungated in release builds to remove broken flat distant panels.

Quick Start (Linux)

1. Cross-compile from Linux

Requires Rust with the x86_64-pc-windows-gnullvm target and clang/lld:

cargo build --release --target x86_64-pc-windows-gnullvm -p victory

2. GUI Launcher (Recommended)

Run the built-in GTK4 launcher (requires system Python 3 + PyGObject/GTK4, preinstalled on Fedora/GNOME):

./scripts/protonida-launcher.py

Provides main controls for Resolution (720p / 1080p / 1440p / 4K), Console Profile (Series S Lockhart vs Series X Anaconda), Ray Tracing (RTX) (auto-syncing VICTORY_BVH_BUILDER and settings.xml), MangoHud, a RAM-guarded Prebake Shaders button (victory shaders → victory warm with VICTORY_PREBAKE_BIG_MAX=2 + /proc/meminfo watchdog), and a collapsible Advanced drawer for all VICTORY_*, Wine, VRAM, guard, experimental UFFD WP, and skip-pipeline settings (saved to ~/.config/protonida/launcher.json).

3. CLI Launch Profiles

Series S Hardware RTX (Default — 17.2–27.0 FPS, native RTGI & reflections)

export WINEDLLOVERRIDES="d3d12,d3d12core,d3d11,dxgi,d3dcompiler_47=n;mscoree,mshtml="
export __GL_SHADER_DISK_CACHE_SIZE=4294967296

export VICTORY_OUTPUT=1280x720
export VICTORY_UPSCALER=6
export VICTORY_PORT_CONSTANTS=1 VICTORY_PORT_DESCRIPTORS=1 VICTORY_PORT_GUARD=1 VICTORY_PORT_JOURNAL=1
export VICTORY_PORT_DESCRIPTORS_EVERY=32 VICTORY_PORT_DESCRIPTORS_CHECK=2
export VICTORY_LATE_WAIT=3 VICTORY_LATE_WAIT_LISTS=1024 VICTORY_MERGE_RUNS=8192 VICTORY_ASYNC_SUBMIT=1
export VICTORY_INPLACE=1 VICTORY_INPLACE_MB=4096
export VICTORY_GUARD_REST=50000 VICTORY_GUARD_HOT=1000
export VICTORY_INDIRECT_WINDOW=0 VICTORY_SHOW_AFTER=0
export VICTORY_TEXTURE_BUDGET_MB=768 VICTORY_CARD_ROOM_FOR_TARGETS_MB=2304
export VICTORY_CARD_BUFFERS_MIN_KB=64 VICTORY_CARD_BUFFERS_MB=1024
export VICTORY_PIPELINE_WORKERS=2 VICTORY_PIPELINE_WAIT_MS=0

# Native hardware ray tracing
export VICTORY_BVH_BUILDER=1
export VICTORY_SKIP_RT=0
export VICTORY_AMBIENT=off

wine target/x86_64-pc-windows-gnullvm/release/victory.exe run \
  --console series-s \
  --execute 'Z:\path\to\game_scarlett_master.exe'

Max-FPS Series S (20–29.3 FPS, Screen-Space SH GI)

Swap the last three variables:

export VICTORY_BVH_BUILDER=0
export VICTORY_SKIP_RT=1
export VICTORY_AMBIENT=2.0
export VICTORY_AMBIENT_AIR=1.5

Tip for 6 GB RTX cards: In the title's settings.xml, setting rtDynamicShadows="false" and ssroSampleCount="1" keeps full hardware RTGI and RT reflections while eliminating heavy shadow-ray overhead.


Credits & Upstream Projects

Protonida stands on the shoulders of an incredible open-source community:


License

Licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE for details.

About

Protonida — Run GTA VI on Linux (Wine/Proton + vkd3d-proton new structurizer + RB-tree wineserver) at 8.8-13.7 FPS on 6 GB RTX 4050

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages