ValveSoftware / Proton

Compatibility tool for Steam Play based on Wine and additional components
Other
23.88k stars 1.04k forks source link

IL-2 Sturmovik: Battle of Stalingrad (307960) #3106

Open ambrop72 opened 4 years ago

ambrop72 commented 4 years ago

Compatibility Report

System Information

I confirm:

Symptoms

Occasionally the game does not start at all and Steam says it's running until ~2 minutes later when it finally understands it's not running. In this state I see wine processes (wineserver, winedevice) but not the game executable (IL-2.exe). And occasionally my system completely freezes when the game is starting just as the black window appears.

Most of the time the game starts fine. The mouse is jerky but that's a cosmetic issue. I try to start a a single mission, it gets all up to when the loading is done, then I press Start, and the game crashes.

The backtrace is seen in the attached log steam-307960.log. I have determined that it is crashing because the game calls strlwr on a read-only string "idle", and the Wine implementation tries to write into read-only memory. Using vanilla Wine (Steam running in Wine, not Proton), I was able to work around this issue by patching Wine like this:

--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -79,7 +79,10 @@ int CDECL MSVCRT__strlwr_s_l(char *str, MSVCRT_size_t len, MSVCRT__locale_t loca

     while (*str)
     {
-        *str = MSVCRT__tolower_l((unsigned char)*str, locale);
+        char lowered = MSVCRT__tolower_l((unsigned char)*str, locale);
+        if (*str != lowered) {
+            *str = lowered;
+        }
         str++;
     }

With this the gameplay started, but there was an error about failing to run the LogParser which I fixed using winetricks dotnet35sp1 (I don't know if that would be needed with Proton).

Reproduction

Install the game, start it and try a single mission.

SunnyOd commented 1 year ago

@SunnyOd I was wondering where you were ;) This game is .. wow! I grabbed a related game, IL-2 Sturmovik: Cliffs of Dover Blitz to sit on until it gets a VR upgrade ( any day now I'm betting ) and runs on Proton ( less certain but I'm hoping ). It's ultra cheap at Humble right now. I'm sold on VR flight sim!

@JJones780 I've been wanting to get into VR but since ditching windows and moving to linux it's not been very clear as to how stable/viable it is on linux. What are your thoughts? Using a Quest 2 or Index or something else?

I've got Cliffs of Dover too. I couldnt get it to run before. Are you saying your Stalingrad fix works for Cliffs too?

JJones780 commented 1 year ago

I'm 100% Linux these days. I'm only dipping my toes into VR with an ol' Vive setup I got for $150. Even then... I'm not sure this is good for my productivity ;) I tell myself I'm getting into VR dev.

MS bullied Valve back in the day... I think Valve recognizes Linux as integral to their future. I only see VR and game support for Linux getting better.

Cliffs... I'm sure it will have other proton issues but the community is strong. VR release is imminent! I'm impressed with the amount of detail that has been crafted into these simulators. The developers really have their hearts in it!

SunnyOd commented 1 year ago

@JJones780 is the vive setup working well? easy to setup? think these flight sims are the killer app for me

SunnyOd commented 1 year ago

Replying to https://github.com/ValveSoftware/Proton/issues/3106#issuecomment-1378553630

Finally got round to buying Stalingrad again and this fix worked - Cheers @JJones780 !!!

JJones780 commented 1 year ago

My current setup. Please post your additions/changes!

Launch options (optional):

taskset -c 10-11 %command% # this will only use the last core on AMD 6 core 12 processor cpu Note: I usetaskset -c 4-7 %command% for SteamVR's launch options

Install d3d compiler ( required)

If ~/.steam/steam/steamapps/compatdata/307960/pfx/drive_c/windows/system32/d3dcompiler_47.dllis smaller than 4MB then it is probably the wrong version. Delete the ~/.steam/steam/steamapps/compatdata/307960 folder, start then stop the game to regenerate a new 307960 folder before running the following commands.

from Linux shell: sudo winetricks --self-update protontricks 307960 d3dcompiler_47

Check the d3dcompiler_47.dll file size/timestamp if you haven't already done so. Protontricks/Winetricks will not overwrite a previous version. You must delete the 307960 folder to upgrade.

Reprojection Issues:

It doesn't seem that this is required anymore and option 2 isn't even available? It also doesn't seem that reprojection is turned on? Maybe it's off by default now? Turn OFF reprojection to avoid crashing steamvr during heavy smoke effects ( fire tank while zooming, crash plane etc ). I was able to reliably reproduce this issue by firing a tank while max zooming in the view.

Either of these will suffice on their own but 1 is smoother and combined I get a doubling of my frame rate also doing 2 ... but I suspect it's artificial ( just drawing the same frame twice?). 1) Add "enableLinuxVulkanAsync" : false, to the "steamvr" section of ~/.steam/debian-installation/config/steamvr.vrsettings 2) Start SteamVR and go to settings->video->perApplication video settings. Choose IL2 Sturmovik and then set Use Legacy Reprojection Mode to ON

More performance:

Fix Controller/Joystick order:

Note: The late Feb 2024 update might've made this unnecessary?

ls /dev/input/by-id will list contollers. Only pay attention to the 'event' versions ( non-event are older js interfaces ) You want to set SDL_JOYSTICK_DEVICE to a colon separated list of controllers. My Steam Launch options become: SDL_JOYSTICK_DEVICE="/dev/input/by-id/usb-Logitech_Logitech_Extreme_3D-event-joystick:/dev/input/by-id/usb-Saitek_Saitek_Pro_Flight_Rudder_Pedals-event-joystick" taskset -c 10-11 %command%
and when I run IL-2 my joystick will always come up as js0 and the pedals as js1!