ValveSoftware / Proton

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

Beyond Good and Evil (15130) #1536

Open KorinFlakes opened 5 years ago

KorinFlakes commented 5 years ago

Compatibility Report

System Information

I confirm:

Symptoms

Technically this game runs identically with Proton in Linux as it does in Windows. Unfortunately this game infamously runs like shit in Windows. There are a number of issues that are persistent across operating systems, but the fixes require a little bit more work with Proton.

The first time you launch the game you will be greeted with the settings launcher window. You need to set the graphics and details to low, check manual compatibility and disable hw vertex processing, fastflip and triple-buffering. Despite the age of the game, you will get constant slowdowns and graphical glitches if you don't set everything down low. I've yet to find a way to get the settings to appear again (besides uninstalling and reinstalling the game) so set them the first time. The settings launcher is a separate exe and I can't get it to launch again.

When you start a new game, the first noise you hear will get stuck in a 2 second loop for roughly 5 minutes, playing over the rest of the audio. The lines of dialogue spoken by the characters during combat will be repeated until you finish combat and many lines outside of combat will be repeated until you leave the area. Other sounds will also get stuck in a loop very often during the course of the game.

The only fix that worked for me was to install wine and winetricks through the terminal

sudo apt install wine-stable winetricks

Then you need to get a dsound.dll file from Windows 7 or up (the one shared on the wine page was this one: http://www.down-dll.com/index.php?file-download=dsound.dll&arch=32Bit&version=6.2.9200.16384&dsc=DirectSound ) and replace the one in this games wine bottle (located at /steamapps/compatdata/15130/pfx/drive_c/windows/system32 and " "/syswow64). Then edit the winecfg of the bottle from the terminal:

WINEPREFIX="​/home/<user>/<Steam Library>/steamapps/compatdata/15130/pfx" winecfg

and set wine to win7 and add dsound as a native library.

That stops the sound loop, but the audio will be badly out of sync and very choppy. Apparently this is because the game doesn't like it when your CPU slows down so you must force it to run at max performance all the time (when running the game) by opening up a terminal, logging into root (it can't be done with sudo) and setting the scaling governor on all threads of your cpu to "performance" instead of "powersaving"

su root
echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

I've yet to find a simple way to set core affinity in Ubuntu (like in Windows task manager). So if there is one, that last step could be simplified quite significantly.

steam-15130.log

dreamer commented 5 years ago

I've yet to find a simple way to set core affinity in Ubuntu (like in Windows task manager). So if there is one, that last step could be simplified quite significantly.

Setting affinity is not exactly the same thing as disabling CPU governor, but maybe it will work in this case. On any Linux, you can change process affinity (without root access) using taskset (it's in package util-linux, if it's not installed by default).

Examples: $ taskset -c 0 <command> will restrict the new process to run only on the first processor. $ taskset -c -p 0 <pid> will change the affinity of an already running process.

More detailed explanation in $ man 1 taskset.

shoober420 commented 4 years ago

Compatibility Report

System Information

SettingsApplication.exe LOG: steam-15130.log

BGE.exe LOG: steam-15130.log

Wine backtrace for SettingsApplication.exe: BGEbacktrace.txt

Symptoms

Game launches, but resolution is way too low. When attempting to run the "SettingsApplication.exe" program to adjust the resolution, there is a crash about EAX.

53852AF5-AF41-4287-8CA3-AE08A4676181

elnabo commented 2 years ago

Regarding the EAX not installed, I found that one solution is to run manually the commands and reg rules defined in the installscript.vdf

I also found this key: HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Ubisoft\\Beyond Good & Evil" in the wrong path at HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Wow6432Node\\Ubisoft\\Beyond Good & Evil"

Blisto91 commented 2 years ago

Ye their install script has this HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Ubisoft\\Beyond Good & Evil which in proton seems to end up as HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Wow6432Node\\Ubisoft\\Beyond Good & Evil So you have to remove the extra \\Wow6432Node from system.reg in the games compatdata for the settings app to be able to start.

friedc commented 2 years ago

When launching the "Game Settings" with Proton 7.1 a error message pops up:

The DirectX 9 currently installed is older than 9.0b. Install 9.0b version or greater.

On experimental the error message changes:

Beyond Good & Evil is not properly installed. Please install Beyond Good & Evil.

The game itself runs, but the resolution is too low.

psstoyanov commented 2 years ago

Ye their install script has this HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Ubisoft\\Beyond Good & Evil which in proton seems to end up as HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Wow6432Node\\Ubisoft\\Beyond Good & Evil So you have to remove the extra \\Wow6432Node from system.reg in the games compatdata for the settings app to be able to start.

Works great with the Steam Deck. Once the Settings are opened, you can set the higher resolution tier of 1280x800 instead of the default 800x600 and to change the language to English (defaults to French for whatever reason).

The file that has to be changed on the Steam Deck is in:

/home/deck/.steam/steamapps/compatdata/15130/pfx/system.reg

@friedc , try to change the resolution after you fix the path there.

KashiMaadsen commented 2 years ago

Ye their install script has this HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Ubisoft\\Beyond Good & Evil which in proton seems to end up as HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Wow6432Node\\Ubisoft\\Beyond Good & Evil So you have to remove the extra \\Wow6432Node from system.reg in the games compatdata for the settings app to be able to start.

Hey, so I am having trouble understand where exactly is the system.reg, because I am trying to work on this issue but I am very bad with computers. I just want to be able to play the game and the settings isn't launching. Can you explain it with more steps, please? Thank you very much.

psstoyanov commented 2 years ago

@KashiMaadsen , you are looking for .../steamapps/compatdata/15130/pfx/

Depending on your system setup, compatdata could have different location. 15130 is the game id here. On my Manjaro system it is:

~/.local/share/Steam/steamapps/compatdata/15130/pfx/system.reg

I've pointed where you can find it on the Steam Deck setup:

/home/deck/.steam/steamapps/compatdata/15130/pfx/system.reg

An easy method to find it:

~ find . -type d -wholename "*/steamapps/compatdata/15130/pfx"

./.local/share/Steam/steamapps/compatdata/15130/pfx

find: β€˜./.local/share/containers/storage/overlay/9f32931c9d28f10104a8eb1330954ba90e76d92b02c5256521ba864feec14009/diff/var/cache/apt/archives/partial’: Permission denied
....

Ignore the permission denied dirs and focus only on the successful search result.

Blisto91 commented 2 years ago

A extra note if you aren't playing on a system with a built in frame limiter (like the steam deck) the game can have graphical issues when the fps goes above 60. A built in config haven't been added yet since the game can be a bit weird so needed more testing. But you can insert this into the games launch options in steam to limit it.

DXVK_FRAME_RATE=60 %command%
KashiMaadsen commented 2 years ago

Ultimately, maybe I did something wrong, but it did not work for me. I am just going to ask for my money back on STEAM and will try playing the game on ubisoft's machine instead. Thanks a lot for the help !

Blisto91 commented 2 years ago

Yes would be nice if steam/proton could handle such a case in the install script and just not include anything that would include a duplicate in the registry path. Is an annoyance people shouldn't have to deal with

Edit: apparently this is a game / steam issue as it also happens on windows. Did not know that earlier.

friedc commented 2 years ago

Ye their install script has this HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Ubisoft\\Beyond Good & Evil which in proton seems to end up as HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Wow6432Node\\Ubisoft\\Beyond Good & Evil So you have to remove the extra \\Wow6432Node from system.reg in the games compatdata for the settings app to be able to start.

I can confirm that with this the "Game Settings" launch in Proton 7.0-4RC. Here is the change that I applied to sytem.reg in patch format:

diff --git a/system.reg.old b/system.reg
index fe32b2a..da56743 100644
--- a/system.reg.old
+++ b/system.reg
@@ -77311,7 +77311,7 @@ WINE REGISTRY Version 2
   74,00,77,00,61,00,72,00,65,00,5c,00,57,00,69,00,6e,00,65,00,5c,00,50,00,6f,\
   00,72,00,74,00,73,00

-[Software\\Wow6432Node\\Wow6432Node\\Ubisoft\\Beyond Good & Evil] 1660340790
+[Software\\Wow6432Node\\Ubisoft\\Beyond Good & Evil] 1660340790
 #time=1d8ae94fbc72a9a
 "Install Path"="Z:\\media\\gamedisk\\steamlibrary\\steamapps\\common\\Beyond Good and Evil"
 "InstallLanguage"=dword:00000001

After this change I could set the resolution to 3840x2160 and the refresh rate to 60 Hz. I also set the rest of the graphics settings to their maximum. However I noticed that there were serious glitches when enabling antialiasing. The glitches are well described by this comment. I think that the glitches are still there without antialiasing but they happen very sporadically. (I just played the first five minutes of the game a few times)

Blisto91 commented 2 years ago

@friedc Have you tried setting DXVK_FRAME_RATE=60 %command% and seeing if the issue goes away?

friedc commented 2 years ago

@friedc Have you tried setting DXVK_FRAME_RATE=60 %command% and seeing if the issue goes away?

Unfortunately that doesn't help. With antialiasing enabled I still get a lot of glitches.

psstoyanov commented 2 years ago

From what I can observe, graphical artifacts (as in green/purple blobs or pixelation around models) won't be affected by setting DXVK_FRAME_RATE.

The audio sync and gameplay speed however will work as expected with DXVK_FRAME_RATE especially when using a Wayland session with higher refreshrate monitor.

Blisto91 commented 2 years ago

It affects some types of artifacts, like with the UI bugging out. At least what i've observed in a few places.

Could you guys try another thing along with the frame limit? Make a file called dxvk.conf next to the exe and insert d3d9.allowDiscard = False

psstoyanov commented 2 years ago

Hmm.. I need to find a good spot to observe the graphical glitches in the first place. Not sure I can observe them on my systems (RX6800 && Steam Deck) within the first 5 minutes of gameplay.

psstoyanov commented 2 years ago

Alright, mystery solved for my systems, @Blisto91 , @friedc

Proton 7.0-3

Using Proton 7.0-3 produces the graphical artifacts as can be seen here:

Screenshots with artifacts with `7.0-3` ![BGE_Proton_7 0-3_menu_artifacts](https://user-images.githubusercontent.com/3979134/184657677-6c34c28d-03ff-4b84-bf1b-0e22fe7b1642.png) ![BGE_proton_7 0-3_artifacts](https://user-images.githubusercontent.com/3979134/184657680-f4edd5fb-ab56-4cdf-ad70-0ab322d3bd40.png)

The artifacts are far more observable than the screenshot of the gameplay would indicate.

Proton Experimental

Using Proton Experimental doesn't produce the same graphical artifacts:

Screenshots without artifacts with Proton Experimental ![BGE_Proton_experimental_good_2](https://user-images.githubusercontent.com/3979134/184657821-c64500d0-c0fb-4a2e-8353-bb9da174667b.png) ![BGE_Proton_Experimental_menu_good](https://user-images.githubusercontent.com/3979134/184657824-a493a4df-73bd-45a5-a5c4-908cc0d7cc8b.png)

Other

As an interesting note, using Lutris wine version lutris-7.2-2-x86_64 :

Screenshot from lutris-7.2-2-x86_64 artifact with low/no antialising

BGE_lutris-7 2-2-x86_64_artifact_in_cutscene The rest is fine (no green/ purple artifacts)

System Information

Blisto91 commented 2 years ago

Which dxvk version do you use with lutris? A built in conf option was added to dxvk and included in the 1.10.2 release and it brought back some missing effects in the game. Dunno if it touched other stuff like the bugs seen above. I kinda forgot those changes weren't included in stable proton yet. My bad.

psstoyanov commented 2 years ago

Hmm, give me a few minutes to verify.

From what I can see on the Steam Deck, I'm using 1.10.1 with the Lutris install

psstoyanov commented 2 years ago

@Blisto91 , no change with lutris-7.2-2-x86_64 between dxvk versions:

I think sacrificing antialising is good compromise there :smile:

And I have to make sure it's clear for the other people reading - Proton Experimental doesn't even exhibit those sparse artifacts seen with Lutris with no antialising.

Blisto91 commented 2 years ago

Not good that it happens at all πŸ˜“ But since it works on experimental it might be fixed on dxvk master πŸ€”. I will check it out. Thanks slot for the testing! πŸ™‚

friedc commented 2 years ago

It affects some types of artifacts, like with the UI bugging out. At least what i've observed in a few places.

Could you guys try another thing along with the frame limit? Make a file called dxvk.conf next to the exe and insert d3d9.allowDiscard = False

It seems that this fixed the glitches with antialiasing enabled .I am using Proton 7.0-4RC on a RX 480 aka Polaris 10.

psstoyanov commented 2 years ago

On my system with Proton 7.0-3 the dxvk.conf trick doesn't work. 7.0-3 is using v1.10.1-57-g279b4b7e: https://github.com/ValveSoftware/Proton/releases/tag/proton-7.0-3

7.0-4RC is using dxvk 1.10.3 : https://github.com/ValveSoftware/Proton/issues/6062#issue-1330151092

Looks like dxvk 1.10.2 has BGE reference? :thinking: https://github.com/doitsujin/dxvk/releases/tag/v1.10.2

No idea which dxvk version is being used by Proton Experimental. I'm not sure how to try the same dxvk.conf trick with Lutris though :smile:

Blisto91 commented 2 years ago

@psstoyanov Experimental uses a version of master dxvk. It has a ton of changes. A dxvk dev pointed out to me that your colored artifacts issue looks like feedback loop. It's a issue that mostly presents itself on newer gpu's like RDNA and RDNA2, which might be why i haven't seen the same on my R9 380. There's a new vulkan extension coming in mesa 22.2* (i don't think it's in 21.3.6) and master dxvk has work to enable this, this should fix those issues. Other stuff on master might also affect it since alooot of changes have been made so it might be not be an issue there even if the extension isn't used.

But i think we can conclude some things here d3d9.allowDoNotWait = False is needed to fix some missing effects in the game. Light shafts and the like. This is the change included in dxvk 1.10.2 which proton 7.0-4RC and experimental includes. d3d9.allowDiscard = False to fix some other graphical artifacts. Blinking lights and weird depth issues in some scenes. And a framerate cap to 60 to fix audio sync issues and also some graphical bugs.

I will look into making a dxvk pr to include the latter two things. The conf version of the frame limiter doesn't work the same as the env var and won't come into effect depending on stuff like game vsync, compositors, high refresh rate display + fshack etc. To work around this until the config frame limiter becomes smarter (the dxvk devs want to look into this at some point) we also have to disable the games vsync through another config option. Hopefully this should be acceptable.

psstoyanov commented 2 years ago

Thanks for the detailed information, @Blisto91 !

Both of my systems are using mesa 22.0+ with RDNA2 GPU. While I can't check with dxvk master on Lutris at the moment, the explanation from the dxvk dev matches my experience exactly. I guess it's a waiting game for those changes from dxvk master to trickle down to Lutris && Proton Experimental :slightly_smiling_face:

Blisto91 commented 2 years ago

Sorry i mean mesa 22.2 😁

psstoyanov commented 2 years ago

I don't know if that particular mesa version is of then :smile: Whatever dxvk master has added, it resolves the antialising with Proton Experimental on both: On the Ryzen tower with Manjaro: mesa 22.1.6-1 On the Steam Deck: mesa 22.0.2 (git-71648faf15)

I will try to see if I can get dxvk master with Lutris just in case

Blisto91 commented 2 years ago

You can grab a build of latest master, as of this moment, here https://github.com/doitsujin/dxvk/actions/runs/2856568114

You can then make a folder in ~/.local/share/lutris/runtime/dxvk/ , called e.g. master or similar, and extract the dxvk contents in there (x32 & x64 folders and the setup script). Then in lutris under dxvk version you can select manual and just write the folders name to use that.

psstoyanov commented 2 years ago

Oh, sweet! That was a lot simpler than I was initially thinking.

dxvk master + Lutris doesn't have the artifacts on my Ryzen tower. Will check with the Deck and write down the versions in about 2 hours

psstoyanov commented 2 years ago

@Blisto91 , I couldn't verify it with the Steam Deck for whatever reason.

Maybe the Lutris Flatpak wasn't happy to mess with the custom dxvk build :expressionless: It throws IDirect3d9_CreateDevice failed, please re-run settings application or it could be something else. I won't dig much more in the lutris logs there for now but my bet is on the Flatpak having a bug.

Steam Deck:

SteamOS 3. Stable mesa 22.02.150118.radeonsi_20220427-1 Lutris 0.5.11 Flatpak dxvk master Result: Failed to launch / could be peculiarity with Lutris Flatpak not loading custom dxvk Note: It doesn't affect the Proton version - will be researched elsewhere (possibly this ticket)

Ryzen 5800x RX6800

Kernel: Manjaro 5.19.1-2-MANJARO mesa 22.1.6-1 Lutris 0.5.10.1-2 dxvk master Result: No artifacts can be observed with antialising set to maximum

In either case Proton Experimental does work on both machines with no observable artifacts from my limited testing.

Blisto91 commented 2 years ago

@psstoyanov If lutris flatpak uses the same runtime base as steam flatpak stable then it is because it uses the mesa 21.3 drivers. dxvk master requires at least mesa 22.0. The freedesktop sdk is getting a update here in august afaik that will update to mesa 22.1.5

psstoyanov commented 2 years ago

Ohh, so that's why there is secondary mesa version output in the Steam Deck with pacman:

Steam Deck `pacman -Si mesa` output ``` $ pacman -Si mesa Repository : jupiter Name : mesa Version : 22.0.2.150118.radeonsi_20220427-1 Description : An open-source implementation of the OpenGL specification Architecture : x86_64 URL : https://www.mesa3d.org/ Licenses : custom Groups : None Provides : mesa-libgl opengl-driver Depends On : libdrm wayland libxxf86vm libxdamage libxshmfence libelf libomxil-bellagio libunwind llvm-libs lm_sensors libglvnd zstd vulkan-icd-loader libsensors.so=5-64 libexpat.so=1-64 libvulkan.so=1-64 Optional Deps : opengl-man-pages: for the OpenGL API man pages mesa-vdpau: for accelerated video playback libva-mesa-driver: for accelerated video playback Conflicts With : mesa-libgl Replaces : mesa-libgl Download Size : 14.13 MiB Installed Size : 43.18 MiB Packager : GitLab CI Package Builder Build Date : Wed 11 May 2022 08:01:27 AM IST Validated By : MD5 Sum SHA-256 Sum Signature Repository : extra Name : mesa Version : 21.3.4-1 Description : An open-source implementation of the OpenGL specification Architecture : x86_64 URL : https://www.mesa3d.org/ Licenses : custom Groups : None Provides : mesa-libgl opengl-driver Depends On : libdrm wayland libxxf86vm libxdamage libxshmfence libelf libomxil-bellagio libunwind llvm-libs lm_sensors libglvnd zstd vulkan-icd-loader libsensors.so=5-64 libexpat.so=1-64 libvulkan.so=1-64 Optional Deps : opengl-man-pages: for the OpenGL API man pages mesa-vdpau: for accelerated video playback libva-mesa-driver: for accelerated video playback Conflicts With : mesa-libgl Replaces : mesa-libgl Download Size : 16.65 MiB Installed Size : 97.64 MiB Packager : Laurent Carlier Build Date : Thu 13 Jan 2022 07:40:03 AM GMT Validated By : MD5 Sum SHA-256 Sum Signature ```

Thank you, @Blisto91 ! With this all of the information about the versions matches perfectly with the expectations :slightly_smiling_face:

legluondunet commented 1 year ago

I tried to play this game and I encounter this issues:

1) The first issue could be easily fix by Valve. It is described in the first message that is dated from 2018... You can not launch game settings application because there is an error in regedit . See here: https://github.com/ValveSoftware/Proton/issues/1536#issuecomment-1073076897 I don't know what is cause this error in regedit as the .vdf script contains correct parameters.

2) audio desync It is a very well known issue for this game that is not related to Wine, this issue exists on Windows too. There are workarounds. First limit framerate to 60 fps (easy to do on Linux with DXVK, using DXVK_FRAME_RATE=60), but it is not enough to avoid audio desinc, at least it avoids glitch. Secondly, using a specific sound.dll version, copy it in the main game folder, override it native, builtin.

3) alt+tab, cursor is not visible with others windows, is it not possible to release mouse cursor from BEyong Good and Evil window I think it is a more global issue with Proton in general and game in fullscreen.

After multiple tests, using dsound.dll is the only solution that works to avoid audio desync in Beyond Good and Evil from GOG and Ubisoft Connect version, but it doesn't work with Steamplay (Proton experimental) and I don't understand why.

Limit 60 fps with DXVK is not enough to avoid audio desynch, we need the dsound.dll to works with Proton.

I made a test: I wrote a Lutris script that install Beyond Good and Evil on Windows Steam. In this environment, dsound.dll works as expected and I have no more audio desync. But it will be far better if we can use it directly with Steamplay, on Linux Steam.

For testing purpose, you can find my Lutris script here: https://lutris.net/games/beyond-good-evil/