protonscr

[winewayland.drv] Stormworks main menu semi-transparent + ~1 FPS with PROTON_USE_WAYLAND=1 on NVIDIA+Intel hybrid (missing wl_surface_set_opaque_region on Vulkan subsurface)

protonclosed
ValveSoftware/Proton#10151 · opened 2026-09-16 by macenkodenis · updated 2026-09-16 · 1 comments · github
Mmacenkodenis 2026-09-16 github

System Information
OS: CachyOS Linux
Desktop: KDE Plasma 6, Wayland session (KWin compositor)
GPU (display): Intel UHD Graphics (CML GT2) — drives KWin compositor
GPU (render): NVIDIA RTX 2070 — renders game via DRI_PRIME=1
NVIDIA drivers tested: 615.71.09, 610.57.04, 595.x (bug present in all)
Kernel tested: 7.2.4, 7.2.3
Proton versions tested: GE-Proton 11-4, 11-5, 11-6
Game: Stormworks: Build and Rescue (App ID: 573090)
Bug Description
When launching Stormworks with PROTON_USE_WAYLAND=1 (native Wine Wayland backend via winewayland.drv), the 3D main menu becomes semi-transparent after the splash screen, with FPS dropping to approximately 1 frame per 1–2 seconds. The desktop and other windows are visible through the game window. GPU utilization is very low during this state.

With PROTON_USE_WAYLAND=0 (XWayland): the transparency bug does not occur. The main menu works correctly.

Launch Options Used
DRI_PRIME=1 PROTON_USE_WAYLAND=1 %command%
Root Cause (Confirmed)
The bug was traced to winewayland.drv never calling wl_surface_set_opaque_region on the Vulkan client subsurface (wayland_client_surface).

Confirmation test:

WAYLAND_DEBUG=1 PROTON_USE_WAYLAND=1 DRI_PRIME=1 steam -applaunch 573090 2>&1 | grep "opaque_region" | tee /tmp/opaque_test.txt
Result: file is completely empty. wl_surface_set_opaque_region is never called for the entire duration of the game session.

Root cause chain:

WAYLAND_CreateClientSurface() in winewayland.drv/wayland_surface.c creates a wl_subsurface for Vulkan rendering but never calls wl_surface_set_opaque_region
Neither Mesa WSI nor NVIDIA WSI set the opaque region on the surface
KWin receives an ARGB8888 buffer with an empty opaque region and enables alpha blending for the entire surface
Stormworks (like most Win32 games) leaves alpha=0 in the render target (normal on Windows where DWM ignores alpha for non-layered windows)
KWin blends the surface with alpha=0 → semi-transparency; direct scanout is impossible → ~1 FPS
Relevant source location: dlls/winewayland.drv/wayland_surface.c, function WAYLAND_CreateClientSurface() — wl_surface_set_opaque_region is never called on client->wl_surface.

Additional Tests Performed
__NV_DISABLE_EXPLICIT_SYNC=1 — does not fix the issue
WINE_LAYERED_OVERLAY_ALPHA=1 — does not fix the issue
PROTON_USE_WAYLAND=0 — workaround: bug does not occur
Environment variables confirmed to be correctly applied to the game process via /proc/PID/environ.

Suggested Fix
In WAYLAND_CreateClientSurface() (dlls/winewayland.drv/wayland_surface.c), after creating the Vulkan wl_surface, add an opaque region covering the full surface area. This should be updated whenever the surface is resized.

Alternatively, set the opaque region in the Vulkan WSI layer after vkCreateSwapchainKHR is called, when the swapchain dimensions are known and VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR is requested.

Current Workaround
Remove PROTON_USE_WAYLAND=1 from launch options. XWayland path does not exhibit this bug. But withput it there is an another bug in game. (another reasone, another bugreport)

Kkisak-valve maintainer 2026-09-16 github

Hello @macenkodenis, PROTON_USE_WAYLAND is not part of mainline Proton. This issue needs to be evaluated by the maintainers of the third party build that added it.

Closing as invalid.