Frogging-Family / wine-tkg-git

The wine-tkg build systems, to create custom Wine and Proton builds
856 stars 155 forks source link

[Question] Proton: Wayland Vulkan driver enablement inside bundled WINE 9.0 through a registry key? #1104

Open GrabbenD opened 8 months ago

GrabbenD commented 8 months ago

Here's all requirements for enabling Vulkan rendering in Wayland from my understanding:

  1. Enable this feature manually:

  2. Confirm the right environment variables are used:

  3. Use 9.0-RC1/GIT of WINE:

This leads me to my question: How do you create the required registry key from step 1 in Proton-TKG?

cirk2 commented 8 months ago

Either manually in the regedit gui (wine regedit). Or by crating a file with the content:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Wine\Drivers]
"Graphics"="x11,wayland"

And then import it with wine regedit myfile.reg

GrabbenD commented 8 months ago

Thanks for taking a look @cirk2!

Bear with me as I'm quite confused 🙂 I haven't used WINE in years and I don't have it in my PATH as I compile ./proton-tkg which I use to start my games.

cirk2 commented 8 months ago

wine regedit only operates in the prefix it's executed in. Verification of using vulkan is possible by using something interacting with xorg windows like xprop or xeyes which will only interact with xwayland windows. If you use sway as window manager you can add for_window [shell="xwayland"] title_format "[XWayland] %title" to your config for a handy tag in the title.

You will also have to tell the configure scripts to enable the wayland driver in the _configure_userargs options:

_configure_userargs64="--with-wayland --with-x"
_configure_userargs32="--with-wayland --with-x"

in your wine-tkg.cfg (or rather proton-tkg.cfg when building proton-tkg).

GrabbenD commented 8 months ago

Has anyone managed to get this to work with Steam + Proton? Been trying for hours but Halo Infinite refuses to start (and the logs have no indication of why):

Steps:

Logs:

[BROKEN] Launch Options: `DISPLAY= %command%` ```log fsync: up and running. wine: Using setpriority to control niceness in the [-10,10] range /bin/sh\0-c\0DISPLAY= /home/monorepo/client/game/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=1240440 -- /home/monorepo/client/game/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/monorepo/client/game/.local/share/Steam/compatibilitytools.d/proton_tkg_experimental.wine.8.0.20231128.r0.g83a713801b9'/proton waitforexitandrun '/home/monorepo/client/game/.local/share/Steam/steamapps/common/Halo Infinite/HaloInfinite.exe'\0 chdir "/home/monorepo/client/game/.local/share/Steam/steamapps/common/Halo Infinite" ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. fsync: up and running. wine: Using setpriority to control niceness in the [-10,10] range ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. Setting breakpad minidump AppID = 1240440 Steam_SetMinidumpSteamID: Caching Steam ID: 76561198056731916 [API loaded no] ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. Setting breakpad minidump AppID = 1240440 SteamInternal_SetMinidumpSteamID: Caching Steam ID: 76561198056731916 [API loaded no] ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. pid 238245 != 238244, skipping destruction (fork without exec?) Game 1240440 created interface STEAMAPPS_INTERFACE_VERSION008 / Game 1240440 created interface STEAMHTMLSURFACE_INTERFACE_VERSION_005 / Game 1240440 created interface SteamUser020 / User Game 1240440 created interface SteamUtils009 / Game 1240440 method call count for IClientAppManager::GetCurrentLanguage : 2 Game 1240440 method call count for IClientAppManager::GetLaunchCommandLine : 1 Game 1240440 method call count for IClientAppManager::BIsDlcEnabled : 1 Game 1240440 method call count for IClientAppManager::IsAppDlcInstalled : 1 Game 1240440 method call count for IClientUtils::RecordSteamInterfaceCreation : 5 Game 1240440 method call count for IClientUtils::GetAppID : 6 Game 1240440 method call count for IClientUser::BIsSubscribedApp : 3 Game 1240440 method call count for IClientUser::GetSteamID : 1 Uploaded AppInterfaceStats to Steam ```
[WORKING] Launch Options: `%command%` ```log fsync: up and running. wine: Using setpriority to control niceness in the [-10,10] range /bin/sh\0-c\0/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=1240440 -- /home/monorepo/client/game/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/monorepo/client/game/.local/share/Steam/compatibilitytools.d/proton_tkg_experimental.wine.8.0.20231128.r0.g83a713801b9'/proton waitforexitandrun '/home/monorepo/client/game/.local/share/Steam/steamapps/common/Halo Infinite/HaloInfinite.exe'\0 chdir "/home/monorepo/client/game/.local/share/Steam/steamapps/common/Halo Infinite" ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. fsync: up and running. wine: Using setpriority to control niceness in the [-10,10] range ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. Setting breakpad minidump AppID = 1240440 Steam_SetMinidumpSteamID: Caching Steam ID: 76561198056731916 [API loaded no] ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. Setting breakpad minidump AppID = 1240440 SteamInternal_SetMinidumpSteamID: Caching Steam ID: 76561198056731916 [API loaded no] ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. ERROR: ld.so: object '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored. Fossilize INFO: Overriding serialization path: "/home/monorepo/client/game/.local/share/Steam/steamapps/shadercache/1240440/fozpipelinesv6/steamapprun_pipeline_cache". Fossilize INFO: Overriding serialization path: "/home/monorepo/client/game/.local/share/Steam/steamapps/shadercache/1240440/fozpipelinesv6/steamapprun_pipeline_cache". GameOverlay: started '/home/monorepo/client/game/.local/share/Steam/ubuntu12_32/gameoverlayui' (pid 238733) for game process 238599 12/13 22:18:03 Init: Installing breakpad exception handler for appid(gameoverlayui)/version(20231208003324)/tid(238733) 12/13 22:18:03 Init: Installing breakpad exception handler for appid(gameoverlayui)/version(1.0)/tid(238733) pid 238516 != 238515, skipping destruction (fork without exec?) Game 1240440 created interface STEAMAPPS_INTERFACE_VERSION008 / Game 1240440 created interface STEAMHTMLSURFACE_INTERFACE_VERSION_005 / Game 1240440 created interface SteamController007 / Game 1240440 created interface SteamInput001 / Game 1240440 created interface SteamUser020 / User Game 1240440 created interface SteamUtils009 / Game 1240440 method call count for IClientAppManager::GetCurrentLanguage : 2 Game 1240440 method call count for IClientAppManager::GetLaunchCommandLine : 1 Game 1240440 method call count for IClientAppManager::BIsDlcEnabled : 1 Game 1240440 method call count for IClientAppManager::IsAppDlcInstalled : 1 Game 1240440 method call count for IClientUtils::RecordSteamInterfaceCreation : 8 Game 1240440 method call count for IClientUtils::GetAppID : 10 Game 1240440 method call count for IClientUser::BIsSubscribedApp : 3 Game 1240440 method call count for IClientUser::GetSteamID : 1 Uploaded AppInterfaceStats to Steam (process:238733): GLib-GObject-CRITICAL **: 22:18:08.643: g_object_unref: assertion 'G_IS_OBJECT (object)' failed reaping pid: 238733 -- gameoverlayui ```

Halo Infinite is free to play on Stream if anyone wants to try this! Am I missing something?

GrabbenD commented 8 months ago

I've used advanced-customization.cfg but it looks like this uses a old version of WINE?

$ echo 'Running Proton..'; \
    export PROTON="$HOME/.steam/root/compatibilitytools.d/proton_tkg_experimental.wine.8.0.20231128.r0.g83a713801b9" && \
    export WINEPREFIX="$HOME/.steam/root/steamapps/compatdata/1240440/pfx" && \
    export WINE="$PROTON/files/bin/wine64" && \
    $PROTON/files/bin/wine --version

wine-experimental.wine.8.0.20231128.r0.g83a713801b9 ( TkG Plain )
# wine-tkg-git/proton-tkg/proton-tkg.cfg
#_proton_branch="experimental_8.0"
_custom_wine_source="https://gitlab.winehq.org/wine/wine.git"
_plain_version="master"

Feels like no matter what I try I always get WINE 8.0 (20231128) instead of WINE 9.0 (20231214) Any tips @Tk-Glitch?

Update 1: just confirmed this works without Proton (in Lutris)

Tk-Glitch commented 8 months ago

@GrabbenD You're building against proton experimental's wine, which is 8.0 based currently. You'll want to build against upstream to get 9.0.

Tk-Glitch commented 8 months ago

However upstream wine shouldn't be able run halo infinite due to its dependency on shared resources, not available upstream. So using Valve's 8.0 with shared resources and xwayland is pretty much the only way to play that game currently. When proton 9.0 based drops, we'll try to port shared resources over to upstream.

GrabbenD commented 7 months ago

You'll want to build against upstream to get 9.0.

What's the correct way of doing this @Tk-Glitch? Do I need to specify something else?

# wine-tkg-git/proton-tkg/proton-tkg.cfg
#_proton_branch="experimental_8.0"
_custom_wine_source="https://gitlab.winehq.org/wine/wine.git"
_plain_version="master"

However upstream wine shouldn't be able run halo infinite

Thanks for pointing it out! Apart from Halo Infinite, I'm also trying other games like High On Life which works with Wine 9.0 in Lutris :)

Tk-Glitch commented 5 months ago

I have added a toggle for use with compatible trees: https://github.com/Frogging-Family/wine-tkg-git/commit/efda785ee8c0169273636336ccd106bd3f3ee7ff This will only enable the flags to enforce related checks on the wine side, so if anything is missing it'll throw an error instead of silently ignoring wayland support.

Tk-Glitch commented 5 months ago

Just run ./proton-tkg.sh and select the 4th option to build against mainline with _wayland_driver="true" set in your wine-tkg-git/customization.cfg.