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

Flatpak non-steam games fail to run overlay even after exposing steam's directories #8952

Open
RushingAlien opened this issue Nov 24, 2022 · 8 comments
Labels
3rd party game non-Steam application Shortcut added to Steam with the "Add a non-Steam Game..." option overlay

Comments

@RushingAlien
Copy link

Your system information

  • Steam client version (build number or date): 1668654564
  • Distribution (e.g. Ubuntu): Arch Linux
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

Steam has an overlay for quick access to frequently used menus in steam, however this overlay does not work when steam is running a flatpak app, even with ~/.local/share/Steam exposed to the flatpak sandbox filesystem. LD_PRELOAD-ing also has failed
Related issue : flatpak/flatpak#1756

Steps for reproducing this issue:

  1. Install a flatpak game
  2. Add said game as non-steam game
  3. Make sure ~/.local/share/Steam is exposed to the flatpak sandbox
  4. Run said game from steam
  5. See as overlay does not load
@RushingAlien
Copy link
Author

And i'm not sure, but i think it's also only on opengl games?

@kisak-valve
Copy link
Member

Related to #8599.

@kisak-valve kisak-valve added the non-Steam application Shortcut added to Steam with the "Add a non-Steam Game..." option label Jan 26, 2023
@RushingAlien
Copy link
Author

RushingAlien commented Jan 29, 2023

I've been researching, and i've come to guess that this is due to the overlay being 32 bit. All the while, for flatpak apps 32-bit support, it needs to be added per app in their manifest, otherwise, no 32 bit libraries for said app,. Most flatpak games don't have this. To me, best course of actions are :

  • a 64-bit overlay client or;
  • communicate with the flatpak team to have the --allow=multiarch option mounts org.freedesktop.Platform.Compat.i386 to the appropriate directory within the namespace and also giving information to the dynamic library loader where it is.

@RushingAlien
Copy link
Author

the overlay in Steam Deck's gamemode is integrated to gamescope, bypassing any need to inject to games.

@smcv
Copy link
Contributor

smcv commented Nov 13, 2023

I've been researching, and i've come to guess that this is due to the overlay being 32 bit

I don't think that's it. For the LD_PRELOAD code-injection used on desktop, both 32- and 64-bit versions of the overlay module exist: 32-bit games must load the 32-bit gameoverlayrenderer.so, 64-bit games must load the 64-bit gameoverlayrenderer.so, and the opposite is not possible. Because Steam doesn't know whether your game is 32-bit, 64-bit or even a mixture of the two, the way it sets up the LD_PRELOAD is to try to load both. Whichever overlay is successfully loaded, you will get an error message for the other one (but that error message is harmless and does not actually mean that the overlay module was not loaded).

A more likely reason for this to be broken for Flatpak non-Steam games is that the Steam overlay assumes that various aspects of process state are shared between Steam and the game, including /tmp and the process ID namespace - but Flatpak's sandboxing means that non-Steam games installed via Flatpak do not share those aspects of their process state with the un-sandboxed Steam.

(This is the same reason why the various versions of Steam Linux Runtime share the process ID namespace with Steam - we originally tried using a new process ID namespace for the game-specific container, but that broke the overlay.)

@dklementowski
Copy link

I tried that with libretro flatpak, that I think is 64-bit. I get many occurances of this:

ERROR: ld.so: object '/home/dkl/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.

and only a single message of this

ERROR: ld.so: object '/home/dkl/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.

So it fails to load both 32 and 64 bit library, and of course the overlay doesn't work. The overlay works for me for non-Flatpak non-Steam games with no problem.

@ilievi187
Copy link

  1. flatpak game

Sorry for the silly question, but did you try using the Steam Overlay on games from Flathub, or am I mistaken?

@matthewgrossman
Copy link

Has anyone had success with workarounds for this? For example, I'm trying to run the Flatpak of retrodeck as a non-steam game (imported into steam via Boilr). At this point just launching retrodeck outside of steam, but I'd really like to use steam-big-picture as the primary launcher UI

Running steam via flatpak on ubuntu 24.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party game non-Steam application Shortcut added to Steam with the "Add a non-Steam Game..." option overlay
Projects
None yet
Development

No branches or pull requests

6 participants