Skip to content

Fix WINEDLLPATH and Hybrid Graphics Detection#29

Merged
weter11 merged 2 commits intomainfrom
fix-winedllpath-and-hybrid-graphics-11629917232130255560
Mar 8, 2026
Merged

Fix WINEDLLPATH and Hybrid Graphics Detection#29
weter11 merged 2 commits intomainfrom
fix-winedllpath-and-hybrid-graphics-11629917232130255560

Conversation

@weter11
Copy link
Owner

@weter11 weter11 commented Mar 8, 2026

This change fixes two major issues in the launch pipeline:

  1. WINEDLLPATH visibility: Bundled DLLs in Wine-TKG runners were not being found by Wine because WINEDLLPATH was not set. We now scan the runner's root for known DLL subdirectories and add them to WINEDLLPATH.
  2. Hybrid Graphics detection: On systems with both integrated and discrete (NVIDIA) GPUs, Vulkan often defaults to the iGPU. We now detect this configuration and inject the necessary PRIME render offload environment variables to force the discrete GPU.

PR created automatically by Jules for task 11629917232130255560 started by @weter11

- Added `detect_prime_env` utility to `src/utils.rs` for NVIDIA Optimus/hybrid graphics detection.
- Modified `WineTkgRunner` in `src/infra/runners/wine_tkg.rs` to build and set `WINEDLLPATH`, ensuring bundled DXVK/VKD3D-Proton DLLs are visible to Wine.
- Integrated automatic PRIME/Optimus GPU selection into the launch environment.
- Improved proton version resolution in `WineTkgRunner` to correctly identify runner paths.

Co-authored-by: weter11 <14630689+weter11@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

- Integrated accurate WINEDLLPATH construction using resolved DLL providers from the launch context.
- Added `force_builtin_d3d` support to `build_dll_overrides` to ensure clean WineD3D transitions.
- Improved graphics policy mapping in `WineTkgRunner` to respect `D3D12ProviderPolicy`.
- Auto-inject PRIME/Optimus environment variables for hybrid graphics setups.
- Updated unit tests to reflect `build_dll_overrides` signature changes.

Co-authored-by: weter11 <14630689+weter11@users.noreply.github.com>
@weter11 weter11 merged commit 43d5dae into main Mar 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant