sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.13k stars 71 forks source link

⚠Vortex 1.8.0 requires build of Proton based on Wine 8.4 or above #792

Closed pikdum closed 1 year ago

pikdum commented 1 year ago

System Information

Issue Description

Looks like the pre-release Vortex 1.8.0 is being picked up. It will install, but then crash on startup.

Logs

[224:0419/175453.799:ERROR:network_change_notifier_win.cc(221)] WSALookupServiceBegin failed with: 0
[400:0419/175454.429:ERROR:dxva_video_decode_accelerator_win.cc(1433)] DXVAVDA fatal error: could not LoadLi
brary: msvproc.dll: Module not found. (0x7E)
[224:0419/175454.469:ERROR:(-1)] Check failed: false.
[472:0419/175456.072:ERROR:network_change_notifier_win.cc(221)] WSALookupServiceBegin failed with: 0
Wed Apr 19 05:54:56 PM CDT 2023 INFO - startVortex - Starting Vortex without options
wineserver: using server-side synchronization.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely

logging started
info: next step processing=undefined, nextStepId=undefined
info: next incomplete preset not yet set
[216:0419/175501.097:ERROR:network_change_notifier_win.cc(221)] WSALookupServiceBegin failed with: 0
[388:0419/175501.724:ERROR:dxva_video_decode_accelerator_win.cc(1433)] DXVAVDA fatal error: could not LoadLi
brary: msvproc.dll: Module not found. (0x7E)
wine: Call from 0000000170032278 to unimplemented function KERNEL32.dll.DiscardVirtualMemory, aborting
[216:0419/175501.859:ERROR:(-1)] Check failed: false.
[216:0419/175501.861:ERROR:network_service_instance_impl.cc(541)] Network service crashed, restarting servic
e.
wine: Call from 0000000170032278 to unimplemented function KERNEL32.dll.DiscardVirtualMemory, aborting
[216:0419/175502.129:ERROR:(-1)] Check failed: false.
[216:0419/175502.131:ERROR:network_service_instance_impl.cc(541)] Network service crashed, restarting servic
e.
wine: Call from 0000000170032278 to unimplemented function KERNEL32.dll.DiscardVirtualMemory, aborting
[216:0419/175502.371:ERROR:(-1)] Check failed: false.
[216:0419/175502.372:ERROR:network_service_instance_impl.cc(541)] Network service crashed, restarting servic
e.
wine: Call from 0000000170032278 to unimplemented function KERNEL32.dll.DiscardVirtualMemory, aborting
[216:0419/175502.637:ERROR:(-1)] Check failed: false.
[216:0419/175502.639:ERROR:network_service_instance_impl.cc(541)] Network service crashed, restarting servic
e.
wine: Call from 0000000170032278 to unimplemented function KERNEL32.dll.DiscardVirtualMemory, aborting
[216:0419/175502.921:ERROR:(-1)] Check failed: false.
[216:0419/175502.923:ERROR:network_service_instance_impl.cc(541)] Network service crashed, restarting servic
e.
wine: Call from 0000000170032278 to unimplemented function KERNEL32.dll.DiscardVirtualMemory, aborting
[216:0419/175503.195:ERROR:(-1)] Check failed: false.
[216:0419/175503.197:ERROR:network_service_instance_impl.cc(541)] Network service crashed, restarting servic
e.
wine: Call from 0000000170032278 to unimplemented function KERNEL32.dll.DiscardVirtualMemory, aborting
[216:0419/175503.452:ERROR:(-1)] Check failed: false.
[216:0419/175503.456:ERROR:network_service_instance_impl.cc(541)] Network service crashed, restarting servic
e.
wine: Call from 0000000170032278 to unimplemented function KERNEL32.dll.DiscardVirtualMemory, aborting
wine: Call from 0000000170032278 to unimplemented function KERNEL32.dll.DiscardVirtualMemory, aborting
pikdum commented 1 year ago

I've verified that Vortex 1.7.8 will install + run as expected, by patching steamtinkerlaunch locally:

$ cd ~/stl/prefix/
$ sed -i '13956s/".*/vortex-setup-1.7.8.exe/' steamtinkerlaunch
sonic2kk commented 1 year ago

This is very unfortunate. It seems like Vortex 1.8.0 is not compatible with the Wine version in use.

This will probably depend on a Wine update of some sort to fix, see:

[...] unimplemented function KERNEL32.dll.DiscardVirtualMemory

Not much can currently be done, but thanks for reporting!

sonic2kk commented 1 year ago

It would be interesting to try older/newer Wine/Proton builds, such as Proton 8.0-1c (based on Wine 8.0) or an older build (such as Proton 7.0-6) to see if this is either an incompatibility introduced by Vortex 1.8.0, or a "regression" in Wine (may be an improvement to Wine that has indirectly affected Vortex).

sonic2kk commented 1 year ago

It may also be possible to build a custom version of Proton-tkg based on Wine staging (8.6 at time of writing) and see if that can run Vortex 1.8.0, in case this is something already implemented in a newer version of Wine that Proton hasn't picked up yet.

sonic2kk commented 1 year ago

It looks like this DiscardVirtualMemory method was implemented in Wine 8.4.

Brendan Shanks (4): [...] kernelbase: Implement DiscardVirtualMemory()

Should be possible to build a version of Proton-tkg based on Wine staging and checking if that lets Vortex load.

If that works, this could be hosted somewhere (might ask Frostworx for permissions on the steamtinkerlaunch-tweaks repo and host it there) one potential solution I can see is this:

  1. When downloading Vortex, check if we're using 1.8.0
  2. If we are, check if the current Wine version is based on Wine 8.4 or above (should be possible with /path/to/wine --version, STL might already have a built-in function for this, too)
  3. If we're not using 8.4 or above, log/warn that the version of Wine in use is incompatible with Vortex, and that a compatible version will be used/downloaded if not already available
  4. Switch to using the custom Proton-tkg based on Wine-staging and use that to run Vortex

One problem with this is if the user has a version of Wine installed already that is based on Wine 8.4 or above, then they'll get "bloated" with this tkg build. I guess checking all installed versions is feasible as well though.


If this can be implemented and fixes the issue, I'll document that on stable STL a version of Proton based on Wine 8.4 or above is required, and if a Tkg build works then I will host one somewhere and link to that. I'm not planning another release of STL for a while and this (ideally) should be fixable manually, so I don't think there's much problem with stipulating some required tinkering when using a tinker tool :wink:

It is still possible that the implementation of DiscardVirtualMemory may not be enough for Vortex, or that it may fall over elsewhere. But the changelog for 8.4 do note that it was implemented. Should anything further fail that isn't already implemented somewhere with Wine then it is likely an issue to be reported upstream somewhere.

sonic2kk commented 1 year ago

I am going to change the issue title to mention that Wine 8.4 or above may be required.

By the way, sorry for the title changing, I try not to do that unless a title is really bad (there was nothing wrong with your original title), as I think it can be a little disrespectful. My main reason for editing it is to make it clearer to users who come to the issue tracker that a problem is being investigated, in the hope of avoiding duplicate issues :-)

sonic2kk commented 1 year ago

Tested Proton 8.0-1 and it isn't working at all, it gives a hard crash (maybe dotnet incompatibility or something). GE-Proton7-53 does not work and gives the error you reported, with DiscardVirtualMemory not being implemented. Interestingly, Proton Experimental gives the same warning.

This worries me slightly as Proton 8 may implement this DiscardVirtualMemory method. It may have a patch applied to enable it.

I will try a custom build of Proton-tkg and see if it works.

P.S. noticed STL doesn't handle Vortex Wine output all that great. For me the vwrun.txt didn't seem to print much. Will take a look at improving this...

sonic2kk commented 1 year ago

We have success using Proton-tkg based on Wine 8.6! I used this CI build for it. This is on a desktop PC running vanilla Arch Linux.

image

On the first launch, I did get this error from Vortex, but I was not able to re-create it so I think it was just a one-off (occasionally Vortex fails to start for me silently, the Wine process just hands or it hangs on its "Loading extensions" screen)

image

I have not tested mod compatibility at all, but Vortex itself works fine. In terms of generally navigating around it feels the same as 1.7.8.

It seems the issue here is just that a newer Wine build is required.

sonic2kk commented 1 year ago

Assuming that mod compatibility works, the question now is how we best want to manage this.

There is the command-line option for adding a custom Proton version if you'd like to do this for your script, with steamtinkerlaunch acp /home/username/.local/share/Steam/compatibilitytools.d/ProtonFolderName - This will make Proton-tkg a recognised version by SteamTinkerLaunch. Then in the global config, USEVORTEXPROTON can be set to the Proton folder name.

However this is a hardcoded solution and may not be good long-term for anyone, including if this was done by SteamTinkerLaunch itself. Generally, resolving Wine compatibility issues are left up to the user, as this is a tinker tool. On Steam Deck specifically downloading this tool may lead to bloat as it is over a gig, and every gigabyte counts. Plus it is not necessarily a good idea to do this either, as users who already have Vortex installed will need to manually change their Proton version anyway. For fresh installs, STL automatically uses the latest GE I believe (we shouldn't be using Proton, but this was implemented before Wine-GE was a thing :shrug:).

ProtonUp-Qt has support when its Advanced Mode is enabled for downloading builds of Proton-tkg based on Wine Master, which can be more straightforward than trying to find the right CI (I found it a little confusing too, I had to look through some issues to figure out the right one to use).


Probably the best resolution here is to tell users to manually change the Proton version. It can be done from the Global Menu, STL should pick up the new Proton versions but if it doesn't a reboot/clearing /dev/shm/steamtinkerlaunch should do the trick. Some users say things like they "don't know what Proton is" when issues like this come up, but we cannot help those people. I often have to repeat with different phrasing that STL is not for novice users.

Manual intervention is sometimes required when gaming, gaming on Linux is no exception, and when using a tool for tinkerers I don't think it's unreasonable to say "use this bleeding edge build or equivalent".


This still assumes that mod compatibility is in-tact and that this one unimplemented Wine method is what broke Vortex compatibility, but this needs tested from someone who uses Vortex.

sonic2kk commented 1 year ago

I updated the Vortex wiki page with some general guidance for Vortex 1.8.0: https://github.com/sonic2kk/steamtinkerlaunch/wiki/Vortex#note-for-vortex-180

Once a build of GE-Proton is based on a new enough Wine version (i.e. Proton Bleeding Edge has the required patches/is based on a newer Wine-staging), I will remove this guidance.


I am not sure if any action is needed on the STL front for this. It is common enough for newer GE-Proton versions to be required or occasionally even older ones. Part of why STL offers the option to switch Proton versions is for these very cases where Proton version juggling is required. Vortex could also update tomorrow to break Wine totally with no path to resolve the issue (we got lucky here I think, Vortex has been known to break between updates with dotnet especially and then magically fix itself). So I think trying to check for and force newer Proton versions is a bit of a fools errand, STL would end up indefinitely chasing a newer build of Wine/Proton to fix Vortex, when really that should be up to the user I think.

I'd be interested in hearing any thoughts you have as well :-)

sonic2kk commented 1 year ago

Given that a newer Proton version fixed the issue for me, if #797 is resolved in the same way, I will close this issue as I don't believe this to be an STL bug, just another case of a program breaking under Wine. STL gives users the tools to resolve these issues if solutions are available.

sonic2kk commented 1 year ago

Just tried GE-Proton8-1 and it still isn't enough to run Vortex, it's still missing DiscardVirtualMemory. Seems like a build of TkG is going to be required for a while.

Proton 8.0-2c doesn't work either.


I will close this but keep the issue pinned, and link to it on the Vortex wiki.

sonic2kk commented 1 year ago

GE-Proton8-2 may include this patch. Wine-GE-Custom includes it. Interestingly it appears that this DiscardVirtualMemory stub was required because of Chromium, which means other Chromium-based applications (i.e. Electron applications, including Vortex) may also have this requirement.

I am testing now to see if Vortex works with GE-Proton8-2.

sonic2kk commented 1 year ago

Success! Vortex 1.8.1 beta launches when using GE-Proton8-2. For those using other tools, Wine-GE should fix the issue as well for builds that include this patch: https://github.com/GloriousEggroll/wine-ge-custom/commit/ef4e70bdb46381c8543ad26858a58d29fda7002b - This was backported for GE-Proton as well from GE-Proton8-2 and above.

As this stub is required for the Chromium backend and seemingly nothing else, Vortex should still work as expected. TkG should no longer be required.