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

MangoHud in Steam Screenshots #734

Closed
xDShot opened this issue Apr 18, 2022 · 12 comments
Closed

MangoHud in Steam Screenshots #734

xDShot opened this issue Apr 18, 2022 · 12 comments

Comments

@xDShot
Copy link

xDShot commented Apr 18, 2022

Is it possible? I want Steam to make game screenshots with mangohud in them captured.

@the-science-guy
Copy link

Depending on your Desktop Environment there might already be a keyboard shortcut to take screenshots of everything with mangohud overlaying on top. Or just hit your Print Screen button.

To make Steam capture mangohud too I think it needs to be implemented by valve if they are supposed to be organized inside the steam screenshots folders for each game.

I tried launching steam with mangohud prepended and the overlay did not appear on subsequent screenshots. Enabling mangohud globally (with GOverlay) it still does not provide the desired effect.

@YellowOnion
Copy link

You need to change the overlay order, there's a guide here: nowrep/obs-vkcapture#14

@the-science-guy
Copy link

the-science-guy commented Jun 18, 2022

You need to change the overlay order, there's a guide here: nowrep/obs-vkcapture#14

Thanks for showing me that issue!

I got it working by following the steps, however some of the steam overlay files have a different name now, instead of steamoverlay_64 it is now steamoverlay_x86_64. Maybe you need to adjust it according to the filename in the implicit_layer.d directory.

  1. Copy the file contents from /home/USER/.local/share/vulkan/implicit_layer.d to /home/USER/.local/share/vulkan/explicit_layer.d

  2. Apply export VK_INSTANCE_LAYERS=VK_LAYER_MangoHud:VK_LAYER_VALVE_steamoverlay_x86_64

  3. For a more permanent solution the line from 2. was added to ~/.profile

Result:

20220618185127_1

@the-science-guy
Copy link

After a few updates, not sure what exactly caused it, but the mangohud overlay does not appear on screenshots within Steam anymore.

I checked my package manager logs, vulkan got updated in June 15th before my comment, mangohud received an update on June 21st.
However, the vulkan layer files have had no changes at all, so currently clueless as to why it stopped working.

@jackun
Copy link
Collaborator

jackun commented Jul 10, 2022

export VK_INSTANCE_LAYERS=VK_LAYER_MangoHud:VK_LAYER_VALVE_steamoverlay_x86_64

Dunno if you made a typo there but it is VK_LAYER_MANGOHUD_overlay

@the-science-guy
Copy link

export VK_INSTANCE_LAYERS=VK_LAYER_MangoHud:VK_LAYER_VALVE_steamoverlay_x86_64

Dunno if you made a typo there but it is VK_LAYER_MANGOHUD_overlay

Whether it is the file name of the layer or the actual layer name as stated inside the file, it has not made a difference, i tried

export VK_INSTANCE_LAYERS=VK_LAYER_MANGOHUD_overlay:VK_LAYER_VALVE_steam_overlay_64

but it does not enable the HUD inside the screenshots either. I use Arch Linux with the most recent updates to everything if that matters.

@jackun
Copy link
Collaborator

jackun commented Jul 10, 2022

@the-science-guy Dunno what you have in ~/.local/share/vulkan/explicit_layer.d but if you haven't already, try copying /usr/share/vulkan/implicit_layer.d/MangoHud.json to /usr/share/vulkan/explicit_layer.d/

Oh, and though explicit layer didn't seem to care, maybe edit api_version to 1.3

@the-science-guy
Copy link

the-science-guy commented Jul 10, 2022

@the-science-guy Dunno what you have in ~/.local/share/vulkan/explicit_layer.d but if you haven't already, try copying /usr/share/vulkan/implicit_layer.d/MangoHud.json to /usr/share/vulkan/explicit_layer.d/

Oh, and though explicit layer didn't seem to care, maybe edit api_version to 1.3

Update: It does work now with the combination

export VK_INSTANCE_LAYERS=VK_LAYER_MANGOHUD_overlay:VK_LAYER_VALVE_steamoverlay_x86_64

AFTER Vulkan Shaders have been compiled anew for a game (which just happened for Game A and did not for Game B, Game B still does not work.)

If it breaks again I will try editing the api version manually.
Contents of the explicit layer are

tree -L 1 .local/share/vulkan/explicit_layer.d 
.local/share/vulkan/explicit_layer.d
├── steamfossilize_i386.json
├── steamfossilize_x86_64.json
├── steamoverlay_i386.json
└── steamoverlay_x86_64.json

Edit: Both copying the MangoHud.json to explicit layer and editing the api version did not change the result for Game B which had no Vulkan shaders processed, so this seems to be the root cause in my case.

@xDShot
Copy link
Author

xDShot commented Jul 16, 2022

It now captures mangohud for me without any tweaks... but only for dxvk games. Native are still without hud captured.

@the-science-guy
Copy link

It now captures mangohud for me without any tweaks... but only for dxvk games. Native are still without hud captured.

Same for me with the modifications. Seems like OpenGL uses some other layer, not sure how to go about on setting it.

@joan31
Copy link

joan31 commented Dec 20, 2022

Same for me with opengl games....

@flightlessmango
Copy link
Owner

This doesn't seem like a mangohud issue but rather a vulkan loader issue

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

6 participants