protonscr

Add PROTON_DUMP_DEBUG_COMMANDS back

protonclosed
ValveSoftware/Proton#7575 · opened 2024-03-11 by lukelmy · updated 2024-05-27 · 7 comments · github
3 matching comments, n / p to jump
Llukelmy 2024-03-11 github

Feature Request

PROTON_DUMP_DEBUG_COMMANDS

I confirm:

  • [x] that I haven't found another request for this feature.
  • [x] that I have checked whether there are updates for my system available that
    contain this feature already.

Description

Recently I found that PROTON_DUMP_DEBUG_COMMANDS does not work in proton 9.0 and experimental.
And I found the commit https://github.com/ValveSoftware/Proton/commit/809b6b66dc7dce7334186ddecbfd307eb242df9d actually remove this function.

I really like this environment variable and it's very useful. (Sometimes I have to dump the vulkan api through the script since incomplete vulkan cmds will be dumped if I launch game through steam)

Could you please share the reason about why it's removed?
Is it possible to add it back?

Thanks!

Iishitatsuyuki 2024-03-11 github

PROTON_DUMP_DEBUG_COMMANDS is incompatible with how the Steam Container Runtime functions. A supported way is now documented at https://github.com/ValveSoftware/Proton/blob/proton_9.0/docs/DEBUGGING.md#getting-shell-inside-of-the-steam-runtime.

Iivyl 2024-03-11 github

PROTON_DUMP_DEBUG_COMMANDS is a relic from pre-pressure-vessel days. Back then a simple LD_LIBRARY_PATH was enough. Ever since this part of proton was bit-rotting and doesn't even work on many possible configurations of the host system due to library mismatches.

Nowadays there are ways to get shell inside the runtime so you can launch any arbitrary commands in a compatible manner.

On top of what @ishitatsuyuki has linked you can use PRESSURE_VESSEL_SHELL=instead %command% as launch option and then you can see Proton invocation by doing echo $@ and continue from there.

Iivyl 2024-03-11 github

Ah, if you want to run winecfg or something similar you can use the following launch option:

echo "%command%" | sed 's/proton waitforexitandrun .*/proton waitforexitandrun winecfg/' | sh

The exact quoting used is important.

Llukelmy 2024-03-25 github

@ishitatsuyuki @ivyl Thanks for your comments! I have tried and could run games with the shell.

BTW I still found it's hard to dump the Vulkan API for proton games since sometimes none or only part of APIs were dumped through vkconfig.
May I ask if you have any good solutions?
Thanks!

Iishitatsuyuki 2024-03-25 github

I assume that "dump the Vulkan API" means that you want to log all the Vulkan API calls from the game. I'm not sure what "only part of APIs were dumped" possibly means.

I personally find more success using gfxreconstruct to record the API calls to a file first, then use gfxrecon-convert --format jsonl to turn that into a readable format. You'll need to build gfxreconstruct, then use the following environment variables as a starting point to launch the game with recording:

VK_LAYER_PATH=/path/to/gfxreconstruct/build/layer
VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_gfxreconstruct
GFXRECON_CAPTURE_FILE=$HOME/gfxrecon_capture.gfxr

You can find more options in https://github.com/LunarG/gfxreconstruct/blob/dev/USAGE_desktop_Vulkan.md#supported-options.

Cchayleaf 2024-04-27 github

Is there any other way to create a script that runs the game? This was used in FAF

VVPaulV 2024-05-27 github

Hi everyone, sorry for writing in a closed topic, but I couldn't find a solution anywhere. How do I generate the winedbg_run or gdb_attach scripts? I used to be able to connect debugger with /tmp/proton_user/winedbg_run. What is the new way?

Proton versions

Launch options

Launch lines