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

Add PROTON_DUMP_DEBUG_COMMANDS back #7575

Closed
2 tasks done
lukelmy opened this issue Mar 11, 2024 · 7 comments
Closed
2 tasks done

Add PROTON_DUMP_DEBUG_COMMANDS back #7575

lukelmy opened this issue Mar 11, 2024 · 7 comments

Comments

@lukelmy
Copy link

lukelmy commented Mar 11, 2024

Feature Request

PROTON_DUMP_DEBUG_COMMANDS

I confirm:

  • that I haven't found another request for this feature.
  • 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 809b6b6 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!

@ishitatsuyuki
Copy link

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.

@ivyl
Copy link
Collaborator

ivyl commented Mar 11, 2024

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.

@ivyl ivyl closed this as completed Mar 11, 2024
@ivyl
Copy link
Collaborator

ivyl commented Mar 11, 2024

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.

@lukelmy
Copy link
Author

lukelmy commented Mar 25, 2024

@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!

@ishitatsuyuki
Copy link

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.

@chayleaf
Copy link

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

@VPaulV
Copy link

VPaulV commented May 27, 2024

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?

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

5 participants