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

LiveSplit auto-split system does not work when using protontricks #233

Open
ghost opened this issue Jun 3, 2023 · 4 comments
Open

LiveSplit auto-split system does not work when using protontricks #233

ghost opened this issue Jun 3, 2023 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 3, 2023

Describe the bug
If i launch the LiveSplit.exe file using protontricks in the same prefix as resident evil 4 remake for example, the livesplit will not be able to read the game memory to autosplit segments and pause/restart the timer when you press pause in the game or when you move to the next segment

Seems like protontricks uses its own wineserver or whatever to launch processes

this is the solution i found to get livesplit working without protontricks since it cant do it:

  • add this to game launch options: PROTON_DUMP_DEBUG_COMMANDS=1 %command%
  • run the game
  • navigate to /tmp/proton_yourusernamehere/
  • open a terminal in that folder above and run ./run "/path/to/livesplit/folder/LiveSplit.exe"

Basically with that we run livesplit with the already running wineserver and that allows it to read the game memory correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Open LiveSplit.exe using the "Protontricks Launcher" that is in the context menu of Dolphin
  2. Try to open the game and it wont even launch at all
  3. If i try to launch with protontricks launcher after the game is started livesplit will freak out and freeze or crash when i enable the autosplit feature in "Edit splits"

System (please complete the following information):

  • Distro: Arch Linux
  • Protontricks installation method: AUR using yay
  • Protontricks version: protontricks (1.10.3)
  • Steam version: Steam Beta (03/06/2023) day 3, June, 2023
@ghost
Copy link
Author

ghost commented Jun 3, 2023

If theres already a system in place to run a .exe file in the same wineserver of a already running game and i dont know then you can close the issue if you wish, but let me know how to do it, thx! 🐸

@Matoking
Copy link
Owner

Matoking commented Jun 4, 2023

Can you try using the --no-bwrap parameter with protontricks-launch instead? I tested this with Hitman 3 and Peacock Patcher (which also relies on reading the game's memory), and was able to make it work in this case:

protontricks-launch --no-bwrap <exe path>

When the bwrap is in use it retains the same PID namespace, which means it has access to the same processes as the host, but there seems to be something else preventing it from reading the game memory. In my case, without --no-bwrap the Peacock Patcher crashes when the game is launched as opposed to not detecting the game at all, so I suppose there is some other Steam Runtime related restriction or limitation at play?

Ideally, this should work with default options but this might be something that Protontricks cannot easily fix if we want to use Steam Runtime at the same time. Steam Runtime (aka bwrap) is used by default to run it in a similar environment as what Steam uses, which is required for older distros, so it's not something that can be easily disabled across the board.

@ghost
Copy link
Author

ghost commented Jun 4, 2023

protontricks-launch --no-bwrap <exe path>
Seems to work, but only after the game is launched, that's good enough for livesplit to read memory and pause/start automatically

@ishitatsuyuki
Copy link

Debuggers won’t work with bwrap unless you launch them inside the container: https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/issues/84

See https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/slr-for-game-developers.md#inserting-debugging-commands-into-the-container for the “official” way to inject commands.

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