How to Fix Shader Recompilation Issues in Monster Hunter Wilds on Linux

Monster Hunter Wilds shader recompilation Linux

Monster Hunter Wilds delivers a breathtaking hunting experience, but Linux users have reported frustrating shader recompilation stutters and occasional crashes. These issues stem from the way Vulkan pipelines are handled under Proton, but with the right configuration you can drastically reduce or eliminate the problem. This guide consolidates proven solutions to get Wilds running smoothly on Linux, covering everything from Proton selection to advanced cache controls.

Whether you’re on Steam Deck, a desktop with NVIDIA or AMD graphics, or a bleeding-edge rolling release, the steps below will help you reclaim a fluid framerate and enjoy the hunt without interruption.

Understanding the Shader Recompilation Problem

Modern Windows games translate DirectX calls to Vulkan through DXVK (for DX11) or VKD3D (for DX12). Each time a new graphical effect appears on screen, the Vulkan driver compiles a specialized shader pipeline. On Windows, game developers often precompile these pipelines during loading screens or background threads. Under Linux, the translation layer may not fully replicate that behavior, leading to repeated recompilation every time you launch the game or enter a new area.

This manifests as noticeable hitches, freezes, or even temporary black screens. The severity varies depending on your GPU, driver version, and Proton build. Fortunately, you can tame this process with a few targeted tweaks.

System Requirements and Preparation

Before diving into fixes, ensure your setup meets the baseline for a good experience. Monster Hunter Wilds is demanding, and Linux adds its own overhead.

Hardware and Drivers

  • GPU: NVIDIA GTX 1660 / AMD RX 580 or better (RTX 3060 / RX 6700 XT recommended).
  • RAM: 16 GB minimum, 32 GB for high settings.
  • Storage: SSD strongly recommended; shader caching benefits greatly from fast read/write speeds.
  • Drivers: Use the latest proprietary NVIDIA driver (545 or newer) or Mesa 23.1+ for AMD. Enable the vkBasalt or gamescope utilities if you plan to use HDR or scaling.

Proton Version

Always test with Proton Experimental first, as Valve frequently merges Wilds-specific fixes. If that fails, GE-Proton (GloriousEggroll) often includes additional patches and media codec support. As of writing, GE-Proton 9-1 or later is recommended. Install it via ProtonUp-Qt or manually from the release page.

Step-by-Step Fixes for Shader Stuttering

Follow these methods in order, testing after each until your issue resolves.

1. Force Proton to Use a Persistent Shader Cache

By default, Proton stores compiled shaders in your Steam library’s shadercache folder. Ensure this feature is enabled and the cache isn’t being cleared. Add these launch options for Monster Hunter Wilds in Steam:

PROTON_ENABLE_NVAPI=1 DXVK_STATE_CACHE_PATH=/path/to/cache %command%

Replace /path/to/cache with a persistent location, e.g., ~/.local/share/Steam/steamapps/shadercache/1234560 (use the correct AppID). This tells DXVK to reuse compiled pipelines across sessions.

2. Enable Asynchronous Shader Compilation (DXVK_ASYNC)

DXVK_ASYNC allows the game to continue rendering while shaders compile in the background, replacing stutters with brief visual artifacts. It’s not a perfect solution, but many find it acceptable. Add the following to your launch options:

DXVK_ASYNC=1 %command%

Note: DXVK_ASYNC is technically unsupported and may cause rare graphical glitches. Disable it if you encounter flickering textures.

3. Pre-Compile Shaders with Fossilize

Steam’s Fossilize system can compile shaders before you launch the game. Right-click Monster Hunter Wilds in your library, select PropertiesInstalled Files, then click Verify integrity of game files. This triggers a background shader pre-caching pass. Wait for the process to finish before playing.

You can also manually run the fossilize.sh script found in ~/.steam/steam/steamapps/common/SteamLinuxRuntime_soldier/run if you’re comfortable with the command line.

4. Use VKD3D_CONFIG for DX12 Games

Monster Hunter Wilds uses DirectX 12, so VKD3D configuration is crucial. Add these variables to your launch options to optimize pipeline compilation:

VKD3D_CONFIG=no_upload_hvv,force_host_memory %command%

The no_upload_hvv flag disables host-visible VRAM uploads that can cause stalls, while force_host_memory uses system RAM for some buffer transfers, smoothing out spikes.

5. Steam Deck / Gamescope Tweaks

On Steam Deck, use Gamescope with these flags to reduce stutter:

gamescope -w 1280 -h 800 -f -- mangohud %command%

This forces a fixed resolution and fullscreen mode, which helps the compositor avoid mode switches during shader compilation. Also set the Deck’s VRAM to 4 GB in BIOS if you haven’t already.

Additional Tweaks for Stability

Beyond shader fixes, these adjustments can further smooth your experience.

Graphics Settings

  • Set Texture Quality to High, not Ultra, to reduce VRAM pressure.
  • Disable Motion Blur and Depth of Field; they contribute to frame time inconsistency.
  • Lower Shadow Quality to Medium. Shadows are a frequent shader recompilation trigger.
  • Set Resolution Scaling to 90% or enable FSR 2.0 if needed.

Kernel and Environment Tweaks

For advanced users, consider these Linux-specific changes:

  • Switch to the linux-zen kernel for better desktop responsiveness.
  • Set the CPU governor to performance before launching: echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor.
  • Install gamemode and add gamemoderun %command% to your launch options.

Disable Compositing

Compositors like KWin or Mutter can introduce frame pacing issues. Before launching Wilds, temporarily disable compositing. On KDE, press Alt+Shift+F12. On GNOME, you can’t fully disable it, but setting CLUTTER_PAINT=disable-clipped-redraws:disable-culling may help.

Frequently Asked Questions

Why does Monster Hunter Wilds recompile shaders every time on Linux?

The game was designed for DirectX 12, and under Proton the Vulkan translation layer must generate new pipelines for each unique combination of rendering states. If the shader cache isn’t persistent or the game clears it, this recompilation repeats on each launch. Steam’s Fossilize system is meant to prevent this, but sometimes the cache invalidation logic differs from Windows.

Can I force pre-compiled shaders in Monster Hunter Wilds?

Yes, indirectly. Steam’s background shader processing downloads pre-compiled cache from Valve’s servers when available. Ensure Allow background processing of Vulkan shaders is enabled in Steam’s Settings → Downloads. You can also share a friend’s shader cache if they play on the same hardware and Proton version. Place the .foz files in the game’s shadercache folder.

What is the best Proton version for Monster Hunter Wilds?

At the time of writing, GE-Proton 9-1 provides the best balance of performance and compatibility. It includes patches for video playback and controller support that may not yet be in Proton Experimental. Always check the ProtonDB page for the latest community recommendations.

How do I fix stuttering caused by shader compilation?

Start by enabling DXVK_ASYNC in the launch options. Then ensure your shader cache path is set correctly and that Fossilize is active. If stuttering persists, lower shadow and texture settings to reduce the number of new pipelines generated. Finally, consider using a newer kernel and gamemode for smoother scheduling.

Leave A Reply