stayintarkov / SIT.Manager.Avalonia

MIT License
39 stars 23 forks source link

Issues running SIT on linux #178

Closed jubiman closed 6 months ago

jubiman commented 6 months ago

Whenever I get in a raid on linux, I get openGL errors:

01d0:err:d3d:wined3d_debug_callback 0000000069631720: "GL_INVALID_OPERATION in glUseProgram(transform feedback active)".
01d0:err:d3d:wined3d_debug_callback 0000000069631720: "GL_INVALID_OPERATION in glDispatchCompute(no active compute shader)".

2024-04-12 00-46 _-92 7, 0 5, 367 2_0 0, -1 0, 0 0, 0 3_6 47 (0)

To be sure I downloaded the SPT Aki installer for linux using Lutris on the same prefix, and that works fine: 2024-04-12 01-00 _228 5, -6 8, 199 2_0 0, 0 8, 0 0, 0 6_8 02 (0)

I'm not sure if this is an issue with the way tarkov is launched from the manager, or if it is an issue with the SIT client mod. I have tried a lot of environment variables and I also copied some arguments from the official SPT Aki launcher repo, but nothing has worked so far.

jubiman commented 6 months ago

I managed to get it running after manually copying most environment variables I have on lutris that I found in the launcher script from the SPT installation:

_process.StartInfo.FileName = "gamemoderun";
// force-gfx-jobs native is a workaround for the Unity bug that causes the game to crash on startup.
// Taken from SPT Aki.Launcher.Base/Controllers/GameStarter.cs
_process.StartInfo.Arguments = $"\"mangohud\" \"{_configService.Config.WineRunner}\" \"{ExecutableFilePath}\" -force-gfx-jobs native {arguments}"; 
_process.StartInfo.UseShellExecute = false;

string winePrefix = Path.GetFullPath(_configService.Config.WinePrefix);
if (!Path.EndsInDirectorySeparator(winePrefix))
{
winePrefix = $"{winePrefix}{Path.DirectorySeparatorChar}";
}
_process.StartInfo.EnvironmentVariables.Add("WINEPREFIX", winePrefix);
_process.StartInfo.EnvironmentVariables.Add("WINEESYNC", "1");
_process.StartInfo.EnvironmentVariables.Add("WINEFSYNC", "0");
_process.StartInfo.EnvironmentVariables.Add("WINE_FULLSCREEN_FSR", "1");
_process.StartInfo.EnvironmentVariables.Add("DXVK_NVAPIHACK", "0");
_process.StartInfo.EnvironmentVariables.Add("DXVK_ENABLE_NVAPI", "1");
_process.StartInfo.EnvironmentVariables.Add("WINEARCH", "win64");
_process.StartInfo.EnvironmentVariables.Add("MANGOHUD", "1");
_process.StartInfo.EnvironmentVariables.Add("MANGOHUD_DLSYM", "1");
_process.StartInfo.EnvironmentVariables.Add("__GL_SHADER_DISK_CACHE", "1");
_process.StartInfo.EnvironmentVariables.Add("__GL_SHADER_DISK_CACHE_PATH", winePrefix);
_process.StartInfo.EnvironmentVariables.Add("DXVK_STATE_CACHE_PATH", winePrefix);
_process.StartInfo.EnvironmentVariables.Add("WINEDLLOVERRIDES", "\"d3d10core,d3d11,d3d12,d3d12core,d3d9,d3dcompiler_33,d3dcompiler_34,d3dcompiler_35,d3dcompiler_36,d3dcompiler_37,d3dcompiler_38,d3dcompiler_39,d3dcompiler_40,d3dcompiler_41,d3dcompiler_42,d3dcompiler_43,d3dcompiler_46,d3dcompiler_47,d3dx10,d3dx10_33,d3dx10_34,d3dx10_35,d3dx10_36,d3dx10_37,d3dx10_38,d3dx10_39,d3dx10_40,d3dx10_41,d3dx10_42,d3dx10_43,d3dx11_42,d3dx11_43,d3dx9_24,d3dx9_25,d3dx9_26,d3dx9_27,d3dx9_28,d3dx9_29,d3dx9_30,d3dx9_31,d3dx9_32,d3dx9_33,d3dx9_34,d3dx9_35,d3dx9_36,d3dx9_37,d3dx9_38,d3dx9_39,d3dx9_40,d3dx9_41,d3dx9_42,d3dx9_43,dxgi,nvapi,nvapi64=n;winemenubuilder=");
}

I am looking for a way to nicely implement this in the settings similar to lutris has it.

P.S. I love you rubber ducky

artehe commented 6 months ago

Is there a way we could just have like a tick box that says using Lutris in the settings and then the manager would be able to go off and find the settings Lutris has and load them that way?

Linux has needed some love for a while so thanks for looking into this 😄 I'm open to most things as I know that it's not the best at the moment

jubiman commented 6 months ago

I'm currently looking to implement a separate "Linux Settings" page which is similar to the lutris settings page: image I will make a draft PR whenever I have an outlining (mainly the visuals) and from thereon I will be implementing the logic.

Plootie commented 6 months ago

I suspected that lutris booted stuff with custom wine parameters due to a previous bug that was encountered but i didn't know where to look for these :D