Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workaround] Sucessfully running torch via wine #514

Open
3 tasks done
EternalBlueFlame opened this issue Oct 13, 2022 · 3 comments
Open
3 tasks done

[Workaround] Sucessfully running torch via wine #514

EternalBlueFlame opened this issue Oct 13, 2022 · 3 comments

Comments

@EternalBlueFlame
Copy link

EternalBlueFlame commented Oct 13, 2022

  • Verify that this issue is related to Torch and not a Torch plugin or the vanilla game
  • Ensure that the issue is reproducible for testing (provide a link to a test world if necessary)
  • Is this a suggestion?

Torch Version: 1.3.2.207-master SE Version: 1.201.013

Observed Behavior

App runs stable and appears to be fully functional.
There's a few bugs that can be worked around, and I would consider it playable.

Linux Exclusive Bugs and their workarounds

  • Newly created instances do not appear until after restarting torch.
  • Some settings don't persist from world creation and have to be set again from the instance config.
  • Sometimes instance config settings don't persist into starting the instance until after they have been saved and torch has been restarted.
  • Mod load order seems to load in reverse, for example item 12 will load before item 11.
  • WPF theme is fully reliant on system GTK theme, or in my case, lack thereof. This should be expected though.
    torchtest
    torchtest

Steps to Reproduce

NOTE: be sure to get the latest version of winetricks or step 3 will break. The PPA installer on ubuntu is outdated, here's a guide for that:
https://wiki.winehq.org/Winetricks

INSTALL:

  1. WINEPREFIX="/path/to/prefix" /path/to/wine reg ADD 'HKCU\Software\Wine\DllOverrides' '/f' '/v' 'd3d9' '/t' 'REG_SZ' '/d' 'native'
  2. WINEPREFIX="/path/to/prefix" /path/to/wine reg add "HKCU\\SOFTWARE\\Microsoft\\Avalon.Graphics" /v DisableHWAcceleration /t REG_DWORD /d 1 /f
  3. WINEPREFIX="/path/to/prefix" WINE="/path/to/wine" winetricks dotnet48 d3dcompiler_47 vcrun2013 vcrun2019
  4. extract torch zip to "/path/to/prefix/drive_c/torch-server"

to run:
cd "/path/to/prefix/drive_c/torch-server/"
WINEPREFIX="/path/to/prefix" /path/to/wine ./Torch.Server.exe
This test was done with wine 7.2-2, based on the dependencies, likely works on most versions 6 and later.
For steam mods, you need to use Proton or wine-GE 7.0 or later, otherwise the mods sometimes fail to download from the workshop.
https://github.com/GloriousEggroll/wine-ge-custom/releases

For running in lutris, disable all DXVK and anticheat options, in my test Esync, Fsync, and FSR were also disabled, but those should work fine if the host system supports them.
Under system options enable "disable lutris runtime", disable "prefer system libraries", and enable CLI mode.

Other Information

I'm mostly bringing this up as an issue thread in hopes it could be added to documentation since it makes cloud hosting, and other options more accessible at little to no loss.
If someone wants to make a lutris installer or the like as well, all the better.
If you just want to leave this as a sticky issue for anyone else trying to do this madness, that also works.

Additional credits to this reddit post for the registry changes which made a huge difference.
https://www.reddit.com/r/linux4noobs/comments/firqs9/getting_windows_wpf_applications_to_run_with_wine/

//Edit 1: fixed a typo in the run command.
//Edit 2: added a note about making sure winetricks was updates, also added a custom wine folder for the winetricks call
//Edit 3: added note for more reliable steam mod loading
//Edit 4: expanded on linux exclusive bugs and their workarounds.
//Edit 5: fixed a category header.

Sorry for all the edits.

@EternalBlueFlame
Copy link
Author

Update to this: upon some more in-depth testing, wine 7.2-2 seems to give me issues with steam mods off and on, while there seem to be no problems for mod.io or running vanilla.
Switching to wine-GE-proton (or lutris-GE-proton, which is basically the same thing) seems to have fixed steam downloads without breaking anything else.

I'll update my original post, but that seemed significant enough to merit an additional note in case anyone was following the thread.
I apologize for any inconvenience caused.

@djk
Copy link

djk commented Oct 29, 2022

Thanks for writing this up, I was going to try it myself at some point.

I've run into issues getting it running using your instructions. I'm using Wine-GE-Proton7-32 as I'll be wanting to use Steam mods.

Error I'm getting is:

wineserver: using server-side synchronization.
wine: RLIMIT_NICE is <= 20, unable to use setpriority safely
002c:fixme:winediag:LdrInitializeThunk wine-staging 7.0 is a testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact version when filing bug reports on winehq.org.
0024:fixme:mscoree:parse_supported_runtime sku=L".NETFramework,Version=v4.8" not implemented
0024:fixme:mscoree:parse_supported_runtime sku=L".NETFramework,Version=v4.8" not implemented
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
012c:fixme:thread:NtSetInformationThread Can't set other thread's platform description

Unhandled Exception:
System.TypeLoadException: Could not load type of field 'Torch.Server.Initializer:_server' (8) due to: Could not load file or assembly 'VRage, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

I expect this has probably got something to do with dotnet not installing:

Executing load_dotnet48
------------------------------------------------------
warning: This package (dotnet48) is broken in wine-5.12-15403-g27d3440bc8e. Broken since 5.12. Upgrade to >=5.18. See https://bugs.winehq.org/show_bug.cgi?id=49532 for more info. Use --force to try anyway.

How did you get around this? Adding --force didn't work. Seems odd that it thinks wine is version 5.12-15403-g27d3440bc8e when it's the bleeding edge version 7.something.

@EternalBlueFlame
Copy link
Author

EternalBlueFlame commented Nov 30, 2022

How did you get around this? Adding --force didn't work. Seems odd that it thinks wine is version 5.12-15403-g27d3440bc8e when it's the bleeding edge version 7.something.

You need to manually update/download winetricks and use that to install dotnet48, you shouldn't even need force then, the version provided by the typical apt/pkg repos is vastly outdated.
as for the version it sees, i believe it's looking at system default wine? Take that with a grain of salt.
prefix the command with something like WINE="/path/to/wine" and it should work off whatever version you point at.

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

No branches or pull requests

2 participants