ValveSoftware / Proton

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

Pentiment (1205520) #6415

Open vassilmladenov opened 1 year ago

vassilmladenov commented 1 year ago

Compatibility Report

System Information

I confirm:

Proton log: NOTE: the web view does not pop up at all when running with PROTON_LOG=1. I can only make it come up when the logging flag is not set.

This game is listed as Deck Verified.

Symptoms

Log into Xbox Network (syncs achievements/etc with Xbox Live) does not work. It will variously lock up the game in gaming mode or open a web view that eventually gets stuck on a blank white screen in desktop mode. When running with PROTON_LOG=1, the web view does not come up at all, which is interesting.

Miscellaneous other issues: I cannot uncheck Full Screen in the settings, and the display resolution dropdown is blank.

Reproduction

1) Launch game in gaming mode 2) Click Log into Xbox Network (Y) 3) Game gets stuck "Logging In..." 4) Force the game to quit with Steam button 5) Switch to desktop mode (attach keyboard and mouse) 6) Launch game 7) Click Log into Xbox Network with mouse Screenshot_20221226_115555 8) Use keyboard Super key to get the taskbar focused 9) Minimize game from the right click menu of the taskbar icon 10) Enter credentials for Microsoft account in the web view - NOTE: I needed to use a different Windows PC to approve the app the first time. 11) Web view gets stuck on white screen instead of logging in the game Screenshot_20221226_115416

tgurr commented 1 year ago

System Information

Trying to launch the game on a regular Linux installation crashes it right away: steam-1205520.log

As reported multiple times on https://www.protondb.com/app/1205520 until removing the shipped file SpeechSynthesisWrapper.dll at steamapps/common/Pentiment/Pentiment_Data/Plugins/x86_64/SpeechSynthesisWrapper.dll.

Please shed some light on this how can it be that it works on the Deck but not on a regular Linux. What does it different? Is there some special code involved to handle this game? A special proton version? Or is it the game detecting if running on the Deck and following another code path? What needs fixing here (apart from wine implementing the missing pieces)? Can we have the same workaround working on the Deck also on a regular Linux installation?

kisak-valve commented 1 year ago

Hello @tgurr, these look like some lines of interest from your log:

Unhandled Exception:
System.Runtime.InteropServices.COMException (0x80040154)
  at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <e70d6e9587d64cb3abb4b3f99bbf5a0d>:0 
  at System.__ComObject.CreateIUnknown (System.Type t) [0x00058] in <e70d6e9587d64cb3abb4b3f99bbf5a0d>:0 
  at Mono.Interop.ComInteropProxy.CreateProxy (System.Type t) [0x00000] in <e70d6e9587d64cb3abb4b3f99bbf5a0d>:0 
  at System.Runtime.Remoting.RemotingServices.CreateClientProxyForComInterop (System.Type type) [0x00000] in <e70d6e9587d64cb3abb4b3f99bbf5a0d>:0 
  at System.Runtime.Remoting.Activation.ActivationServices.CreateProxyForType (System.Type type) [0x0003b] in <e70d6e9587d64cb3abb4b3f99bbf5a0d>:0 
  at (wrapper managed-to-native) System.Object.__icall_wrapper_ves_icall_object_new_specific(intptr)
  at System.Speech.Internal.ObjectTokens.RegistryDataKey..ctor (System.String fullPath, Microsoft.Win32.SafeHandles.SafeRegistryHandle regHandle) [0x00008] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Internal.ObjectTokens.RegistryDataKey.Open (System.String registryPath, System.Boolean fCreateIfNotExist) [0x00057] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Internal.ObjectTokens.ObjectTokenCategory.Create (System.String sCategoryId) [0x00001] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Internal.ObjectTokens.SAPICategories.DefaultDeviceOut () [0x00003] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Internal.Synthesis.VoiceSynthesis..ctor (System.WeakReference speechSynthesizer) [0x0014e] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Synthesis.SpeechSynthesizer.get_VoiceSynthesizer () [0x00037] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Synthesis.SpeechSynthesizer.add_SpeakCompleted (System.EventHandler`1[TEventArgs] value) [0x0000d] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at (wrapper synchronized) System.Speech.Synthesis.SpeechSynthesizer.add_SpeakCompleted(System.EventHandler`1<System.Speech.Synthesis.SpeakCompletedEventArgs>)
  at SpeechSynthWrapper.CreateInstance () [0x00022] in <772ae8562d7b41c683de37f93ecebda9>:0 
  at <Module>.CreateSpeechSynthesizer () [0x00000] in <772ae8562d7b41c683de37f93ecebda9>:0 
  at (wrapper native-to-managed) <Module>.CreateSpeechSynthesizer()
[ERROR] FATAL UNHANDLED EXCEPTION: System.Runtime.InteropServices.COMException (0x80040154)
  at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR (System.Int32 errorCode) [0x0000a] in <e70d6e9587d64cb3abb4b3f99bbf5a0d>:0 
  at System.__ComObject.CreateIUnknown (System.Type t) [0x00058] in <e70d6e9587d64cb3abb4b3f99bbf5a0d>:0 
  at Mono.Interop.ComInteropProxy.CreateProxy (System.Type t) [0x00000] in <e70d6e9587d64cb3abb4b3f99bbf5a0d>:0 
  at System.Runtime.Remoting.RemotingServices.CreateClientProxyForComInterop (System.Type type) [0x00000] in <e70d6e9587d64cb3abb4b3f99bbf5a0d>:0 
  at System.Runtime.Remoting.Activation.ActivationServices.CreateProxyForType (System.Type type) [0x0003b] in <e70d6e9587d64cb3abb4b3f99bbf5a0d>:0 
  at (wrapper managed-to-native) System.Object.__icall_wrapper_ves_icall_object_new_specific(intptr)
  at System.Speech.Internal.ObjectTokens.RegistryDataKey..ctor (System.String fullPath, Microsoft.Win32.SafeHandles.SafeRegistryHandle regHandle) [0x00008] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Internal.ObjectTokens.RegistryDataKey.Open (System.String registryPath, System.Boolean fCreateIfNotExist) [0x00057] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Internal.ObjectTokens.ObjectTokenCategory.Create (System.String sCategoryId) [0x00001] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Internal.ObjectTokens.SAPICategories.DefaultDeviceOut () [0x00003] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Internal.Synthesis.VoiceSynthesis..ctor (System.WeakReference speechSynthesizer) [0x0014e] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Synthesis.SpeechSynthesizer.get_VoiceSynthesizer () [0x00037] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at System.Speech.Synthesis.SpeechSynthesizer.add_SpeakCompleted (System.EventHandler`1[TEventArgs] value) [0x0000d] in <bc9291fa729c404fb5b3dd598be2347f>:0 
  at (wrapper synchronized) System.Speech.Synthesis.SpeechSynthesizer.add_SpeakCompleted(System.EventHandler`1<System.Speech.Synthesis.SpeakCompletedEventArgs>)
  at SpeechSynthWrapper.CreateInstance () [0x00022] in <772ae8562d7b41c683de37f93ecebda9>:0 
  at <Module>.CreateSpeechSynthesizer () [0x00000] in <772ae8562d7b41c683de37f93ecebda9>:0 
bklooster commented 1 year ago

Hi @tgurr to add some clarification, you are indeed correct that Pentiment works on Steamdeck without modification. The reason is Pentiment has a custom Steam depot setup to overwrite this DLL with an empty 0KB dummy DLL. From our testing we noticed that Proton doesn't translate SpeechSynthesis .NET calls and crashes so this seemed like the easiest way to quickly resolve this (since the vast majority of the app works fine). However, since this Steam depot is flagged specifically for Steamdeck other types of installs will use the Windows depots and will have this DLL present. Thanks for adding a pull request to delete this automatically for these users.

In regard to XboxLive login, that's something that is using a .NET WPF app and may not be translating correctly for the XBL settings after authentication and thus not letting the authentication process complete correctly. I don't have a solution for this. Unfortunately, this might just need to be unsupported behavior for Proton users. For Pentiment the lost functionality doesn't impact much (live presence and achievement synching).

draeath commented 1 year ago

A note: i found this problem exists for proton users on Linux in general, and the stated workaround (truncating Pentiment/Pentiment_Data/Plugins/x86_64/SpeechSynthesisWrapper.dll to 0-bytes) allows the game to run correctly on this platform.

Bitwolfies commented 1 year ago

Now that this hack is in proton https://github.com/ValveSoftware/wine/pull/176 I think it would be wise to delete the steamdeck depot since the proton hack will apply to it and linux systems, and can be much easier removed if the dll starts to work than the depot. @bklooster Your wording implies you have some sorta contact/are a dev, is it possible for you to remove the deck depot?

kisak-valve commented 1 year ago

That applies to Proton Experimental for now. We'd want to see the hack at least reach a point release of Proton before a game dev takes any action.

Bitwolfies commented 1 year ago

That applies to Proton Experimental for now. We'd want to see the hack at least reach a point release of Proton before a game dev takes any action.

I guess that makes sense, I just don't wish to see some situation where hacks are left in by devs years down the line if it can be avoided.

bklooster commented 1 year ago

@Bitwolfies FYI the plan is in the next version (1.2) the public branch will not include this depot as the application will now use IsRunningOnSteamDeck to determine if we need to initialize the SpeechSynthesis system used for Text to Speech (Voice Assist) as well as hide the options in the game. I'm not aware of an API that we can easily utilize to check if we're running Proton on non-SteamDeck hardware and this Proton commit to hack this DLL will likely need to remain. The depot will only be used for historical purposes.

Bitwolfies commented 1 year ago

@Bitwolfies FYI the plan is in the next version (1.2) the public branch will not include this depot as the application will now use IsRunningOnSteamDeck to determine if we need to initialize the SpeechSynthesis system used for Text to Speech (Voice Assist) as well as hide the options in the game. I'm not aware of an API that we can easily utilize to check if we're running Proton on non-SteamDeck hardware and this Proton commit to hack this DLL will likely need to remain. The depot will only be used for historical purposes.

Id argue you don't even need steam deck check, since this new proton check will work on both Linux/deck systems, and can removed on valves end without you having to do anything if they can get it working.

Doing this will just sadly guarantee the feature will never work on deck.

bklooster commented 1 year ago

@Bitwolfies You are correct, but I'm not aware of any roadmap for SpeechSynth support in Proton (nor would I guess it is high on the priority list). I feel the better UX for SteamDeck users is to disable Voice Assist and the XBL login so there are fewer current user-accessible incompatibilities rather than the have the benefit of potential compatibility improvements in the future. Obviously, the best solution is to spend the time to find alternative options that is more cross-platform friendly, but we don't have the resources to do that at this time.

Bitwolfies commented 1 year ago

@Bitwolfies You are correct, but I'm not aware of any roadmap for SpeechSynth support in Proton (nor would I guess it is high on the priority list). I feel the better UX for SteamDeck users is to disable Voice Assist and the XBL login so there are fewer user-accessible incompatibilities rather than the have the benefit of potential shadow compatibility improvements in the future.

I do understand that, I just think adding the check for speech synthesis is now redundant since valve has already done that for you, any deck running experiential will already have it disabled. I guess I just fail to see much point having two disable checks for the DLL.

Xbox login also works fine for games like mcc, wonder why it breaks here.

Like I said, as best adding the deck check for the DLL does nothing since proton already does it, and at worse forever removes a feature. The check for the Xbox login I think is fine.

Hopefully I'm not coming off as rude or anything, I just don't see a reason for it.

Maybe valve should add a way to disable steamdeck=1 in the developer options..

lavadrop commented 5 months ago

Desktop Linux, openSUSE TW 6.7.9-1-default. AMD Radeon RX 7800 XT (radeonsi, navi32, LLVM 18.1.1, DRM 3.57) Mesa Version: 23.3.6

The option Keyboard with Mouse doesn't work properly. Although the game displays a mouse cursor, UI prompts are wrongly mapped: at the beginning, the stone will only move with WASD even though the game displays a mouse icon with arrows indicating movement. Left clicking is unaffected.