Open junglerobba opened 2 years ago
Looks like MangoHud tries to talk to some DBus name which is filtered.
Please run Steam flatpak with flatpak run --log-session-bus --log-system-bus com.valvesoftware.Steam
and paste its console output here (when launching a game, right before the MangoHud error is logged).
Also please provide your MangoHud config (MangoHud works for me, so you've probably enabled some feature that I didn't).
Removing the full
entry from the MangoHud config makes it work, which of course doesn't narrow it down at all. I'll try testing all the individual settings to see which one breaks it.
edit: Turns out it's the gamemode
entry that breaks it.
I don't see the relevant dbus call, probably due to Proton running in pressure-vessel sub-sandbox. Can you try with Proton community build from flathub?
Also, as a random guess, maybe Yep, guessed it.gamemode=0
in MangoHud config would help?
I'm guessing it's this one?
C28: -> com.feralinteractive.GameMode call com.feralinteractive.GameMode.QueryStatus at /com/feralinteractive/GameMode
*HIDDEN* (ping)
B-1: <- org.freedesktop.DBus return from C28
*REWRITTEN*
[2021-12-20 15:18:32.749] [MANGOHUD] [error] [dbus_helpers.h:344] [send_with_reply_and_block]: org.freedesktop.DBus.Error.ServiceUnknown
Also, despite that error the game launches with the Community build.
Yes, it's this. Looks like MagoHud calls GameMode directly. This is not going to work in flatpak sandbox due to PID namespaces: games' PID as seen by the game is different from the one as seen by gamemoded. If MangoHud wants gamemode integration to work in flatpak sandbox, they'll need to use the gamemode portal. Sadly this issue isn't fixable without changes to MangoHud itself.
I don't even use gamemode, so this fixes my issue already. Judging by the amount of time since the update it doesn't seem many others use either the full
or gamemode
configs for mangohud, so I'm not sure how important of a change this really is.
Should I edit the issue name and leave it open or just close this?
Yeah, let's keep it open, it's still an issue, even if its impact isn't too big. And thanks for reporting it.
Thank you for your help!
For clarification, the gamemode portal would always work, not just when running the steam flatpak? So would it be a viable change for mangohud to just always use the portal?
Honestly I'm not sure, better ask xdg-desktop-portal devs to be certain. I'm guessing it should work outside flatpak as long as xdg-desktop-portal is installed in the host OS. Update: no, it won't work for processes outside the sandbox.
Anyway, since the gamemode portal dbus API is a 1-to-1 mapping to gamemodes' native dbus API, it shouldn't be too difficult to add a flatpak-specific case.
Since d6aa13bebec5db68533af5aae262f2c560910571784d324e8b25d56c2a4d82bb (2f45a317f2a6573b7f44635ac8c808f1f467f35b) Steam fails to launch games with Proton when Mangohud is enabled, they just get stuck on the 'Preparing to launch' window. Downgrading to 7325dcb0102b06e1706dd99a7e465be0b4d6846a04b5b6bb9003a480fa8e88ae (104142dac236e427d042f3726221842c10a81f02) makes them work again. The log doesn't seem to contain anything useful besides the
glxinfo: not found
mentioned in #2