flathub / com.valvesoftware.Steam

https://flathub.org/apps/details/com.valvesoftware.Steam
346 stars 69 forks source link

The Binding of Isaac: Rebirth doesn't run on Wayland #236

Open alice-mkh opened 6 years ago

alice-mkh commented 6 years ago

Game information The Binding of Isaac: Rebirth

Distribution name and version where applicable Fedora Silverblue 28 and 29

Flatpak info

 ~  flatpak --version
Flatpak 1.0.2
 ~  flatpak --gl-drivers 
default
host

Problem description Game doesn't run, without any visible errors.

Output:

GameAction [AppID 250900, ActionID 1] : LaunchApp changed task to ProcessingInstallScript with ""
GameAction [AppID 250900, ActionID 1] : LaunchApp changed task to SynchronizingCloud with ""
GameAction [AppID 250900, ActionID 1] : LaunchApp changed task to SiteLicenseSeatCheckout with ""
GameAction [AppID 250900, ActionID 1] : LaunchApp changed task to CreatingProcess with ""
GameAction [AppID 250900, ActionID 1] : LaunchApp waiting for user response to CreatingProcess ""
GameAction [AppID 250900, ActionID 1] : LaunchApp continues with user response "CreatingProcess"
Opted-in Controller Mask for AppId 250900: 4
Game update: AppID 250900 "", ProcID 6144, IP 0.0.0.0:0
>>> Adding process 6144 for game ID 250900
GameAction [AppID 250900, ActionID 1] : LaunchApp changed task to WaitingGameWindow with ""
ERROR: ld.so: object '/var/home/exalm/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/var/home/exalm/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/var/home/exalm/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
GameAction [AppID 250900, ActionID 1] : LaunchApp changed task to Completed with ""
>>> Adding process 6145 for game ID 250900
Game update: AppID 250900 "", ProcID 6145, IP 0.0.0.0:0
Game update: AppID 250900 "", ProcID 6145, IP 0.0.0.0:0
Setting breakpad minidump AppID = 250900
Steam_SetMinidumpSteamID:  Caching Steam ID:  76561198132369043 [API loaded no]
Game removed: AppID 250900 "", ProcID 6145 
No cached sticky mapping in ActivateActionSet.

Does this issue reproduce with native Steam Have not tested

nanonyme commented 6 years ago

Has this worked before for you?

alice-mkh commented 6 years ago

I don't remember, I think I never tried it in this configuration before. It does work on X11 session though, I tried yesterday.

nanonyme commented 6 years ago

Looks like known issue https://steamcommunity.com/app/250900/discussions/0/133256240741213021/?ctp=2

alice-mkh commented 6 years ago

Oh wow.

Because I can get the game to start if I go to the DLC and deinstall Afterbirth+..

But this one is different for me, since it doesn't work without it as well.

nanonyme commented 6 years ago

There's multiple issues in the thread, some of which fixed. Looks like XWayland issues persist

nanonyme commented 6 years ago

Might be worth it to check for libraries under installation directory. If they're bundling something Wayland-aware but buggy, that could explain things

alice-mkh commented 6 years ago

Seems the only library they bundle is libsteam_api.so

alice-mkh commented 6 years ago

also, running the game manually outputs:

bash-4.4$ ./run-x64.sh 
./isaac.x64: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory

in both sessions.

nanonyme commented 6 years ago

Do you get the same error with X11?

nanonyme commented 6 years ago

Looks like it's supposed to be in Steam runtime https://github.com/ValveSoftware/steam-runtime/blob/master/packages.txt

alice-mkh commented 6 years ago

Do you get the same error with X11?

in both sessions.

nanonyme commented 6 years ago

Any chance of sharing what is in the shell script, btw?

alice-mkh commented 6 years ago
...The Binding of Isaac Rebirth  cat run-i386.sh 
#!/bin/sh
export LD_LIBRARY_PATH="lib32:$LD_LIBRARY_PATH"
exec "./isaac.i386" "$@"
...The Binding of Isaac Rebirth  cat run-x64.sh 
#!/bin/sh
export LD_LIBRARY_PATH="lib64:$LD_LIBRARY_PATH"
exec "./isaac.x64" "$@"
...The Binding of Isaac Rebirth  

The lib32 and lib64 dirs contain libsteam_api.so.

nanonyme commented 6 years ago

Hm. Those look more or less innocent. It's allowing Steam runtime to be used just fine

nanonyme commented 6 years ago

Could you please run ldd still on the binaries from within Flatpak container?

alice-mkh commented 6 years ago
bash-4.4$ ldd isaac.i386 
    linux-gate.so.1 (0xf7eee000)
    libGL.so.1 => /app/lib/i386-linux-gnu/libGL.so.1 (0xf7e64000)
    libGLU.so.1 => not found
    libX11.so.6 => /app/lib/i386-linux-gnu/libX11.so.6 (0xf7d0e000)
    libXxf86vm.so.1 => /app/lib/i386-linux-gnu/libXxf86vm.so.1 (0xf7d06000)
    libXrandr.so.2 => /app/lib/i386-linux-gnu/libXrandr.so.2 (0xf7cf7000)
    libXi.so.6 => /app/lib/i386-linux-gnu/libXi.so.6 (0xf7ce3000)
    libopenal.so.1 => /app/lib/i386-linux-gnu/libopenal.so.1 (0xf7c2e000)
    libpthread.so.0 => /app/lib/i386-linux-gnu/libpthread.so.0 (0xf7c0f000)
    libsteam_api.so => not found
    librt.so.1 => /app/lib/i386-linux-gnu/librt.so.1 (0xf7c04000)
    libdl.so.2 => /app/lib/i386-linux-gnu/libdl.so.2 (0xf7bfc000)
    libstdc++.so.6 => /app/lib/i386-linux-gnu/libstdc++.so.6 (0xf7a6e000)
    libm.so.6 => /app/lib/i386-linux-gnu/libm.so.6 (0xf7970000)
    libgcc_s.so.1 => /app/lib/i386-linux-gnu/libgcc_s.so.1 (0xf7951000)
    libc.so.6 => /app/lib/i386-linux-gnu/libc.so.6 (0xf77b5000)
    libGLX.so.0 => /usr/lib/i386-linux-gnu/libGLX.so.0 (0xf7791000)
    libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xf777a000)
    libGLdispatch.so.0 => /usr/lib/i386-linux-gnu/libGLdispatch.so.0 (0xf7719000)
    libxcb.so.1 => /app/lib/i386-linux-gnu/libxcb.so.1 (0xf76ea000)
    libXrender.so.1 => /app/lib/i386-linux-gnu/libXrender.so.1 (0xf76dc000)
    libatomic.so.1 => /app/lib/i386-linux-gnu/libatomic.so.1 (0xf76d0000)
    /lib/ld-linux.so.2 (0xf7ef0000)
    libXau.so.6 => /app/lib/i386-linux-gnu/libXau.so.6 (0xf76ca000)
bash-4.4$ ldd isaac.x64
    linux-vdso.so.1 (0x00007fffe4ec1000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fa879d55000)
    libGLU.so.1 => not found
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fa879c12000)
    libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007fa879c0b000)
    libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fa879bfe000)
    libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fa879beb000)
    libopenal.so.1 => /usr/lib/x86_64-linux-gnu/libopenal.so.1 (0x00007fa879b33000)
    libpthread.so.0 => /usr/lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fa879b13000)
    libsteam_api.so => not found
    librt.so.1 => /usr/lib/x86_64-linux-gnu/librt.so.1 (0x00007fa879b09000)
    libdl.so.2 => /usr/lib/x86_64-linux-gnu/libdl.so.2 (0x00007fa879b04000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fa879972000)
    libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007fa8797dd000)
    libgcc_s.so.1 => /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fa8797c3000)
    libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007fa87960b000)
    libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fa8795d7000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fa8795c2000)
    libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fa879509000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fa8794dc000)
    libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fa8794cf000)
    libatomic.so.1 => /usr/lib/x86_64-linux-gnu/libatomic.so.1 (0x00007fa8794c5000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fa879e07000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fa8794c0000)
nanonyme commented 6 years ago

I'm so going to write ldd helper at some point that will use Steam runtime so you don't get the bogus errors about missing libraries that are actually in Steam runtime...

nanonyme commented 5 years ago

Uh. Looks like I never remembered you ask you for a file listing inside those lib32 and lib64 directories.

alice-mkh commented 5 years ago

The lib32 and lib64 dirs contain libsteam_api.so.

nanonyme commented 5 years ago

Agh. Looks like I'm blind. I'm assuming it still doesn't work, right?

Pobega commented 5 years ago

Not that this resolves your issues (since I would also prefer using native) but it works really well through Proton.

nanonyme commented 5 years ago

Yeah... I don't really have any better ideas for playing the game since at this point I have no idea what's going on. The only thing I know their forums are full of people complaining this game doesn't work with Wayland.

Pobega commented 5 years ago

I'd be interested in seeing the output of an strace. I have a feeling that it's likely relying on some userland for drawing to X, I've seen similar things before in other titles (Stellaris)

A6GibKm commented 5 years ago

I have to add that this issue also affects non flatpaked steam.

EDIT: a possible solution is to run isaac via proton

smcv commented 5 years ago

I'm so going to write ldd helper at some point that will use Steam runtime so you don't get the bogus errors about missing libraries that are actually in Steam runtime...

In all recent Steam Runtime versions, you can use ~/.steam/root/ubuntu12_32/steam-runtime/run.sh ldd $some_binary (if you are using the Flatpak, get a shell inside the container and run this from there).

smcv commented 5 years ago

I have to add that this issue also affects non flatpaked steam.

If a bug is reproducible by launching the game from inside the non-Flatpak Steam client, please report it to https://github.com/ValveSoftware/steam-for-linux/issues/ and/or to the game's developer.

also, running the game manually outputs:

bash-4.4$ ./run-x64.sh 
./isaac.x64: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory

If you are running this from the shell inside the Flatpak container, it is not necessarily expected to work. The game is probably relying on being launched in the Steam Runtime LD_LIBRARY_PATH environment (if you run it from inside Steam, this happens automatically).

[non-recommended debugging command deleted]

The Steam Runtime is definitely meant to include libGLU.so.1 for both word sizes. The 64-bit version is ~/.steam/root/ubuntu12_32/steam-runtime/amd64/usr/lib/x86_64-linux-gnu/libGLU.so.1 and the 32-bit version is is ~/.steam/root/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libGLU.so.1.

nanonyme commented 5 years ago

@smcv that (invoking Steam runtime run) is not enough and please never tell anyone to use that. There's tons of quirks in app entrypoint that simple are not used unless you use it. Eg Steam Cloud is not functional and chat is broken from many regions.

smcv commented 5 years ago

Going via https://github.com/ValveSoftware/steam-for-linux/issues/6233 to https://steamcommunity.com/app/250900/discussions/0/133256240741213021/?ctp=4#c133258092236470196 it looks like there is a bug in Binding of Isaac:

The game crashes if the Inhibit method of the 'org.freedesktop.ScreenSaver' dbus service is not available.

The Flatpak app exposes that service from your real D-Bus session bus to Steam and games, if available. So if that bug still exists, Binding of Isaac will either work or crash, depending on whether your desktop environment (outside the Flatpak app!) has that API available.

smcv commented 5 years ago

that's not enough

Sure, but it's at least more informative than running the app manually without the Steam Runtime. (But I've deleted the suggestion to enter the Steam Runtime environment manually; hopefully anyone who knows what they're doing enough to work it out and debug this will have the right expectations.)

nanonyme commented 5 years ago

That screensaver thing requires some thought. I think ideally that should go through a portal.

smcv commented 5 years ago

In principle the xdg-dbus-proxy could gain support for diverting messages intended for org.freedesktop.ScreenSaver to org.freedesktop.portal.ScreenSaver, I suppose...

nanonyme commented 5 years ago

Imo it would be good user would actually allow inhibiting screensaver explicitly, that is. That's bad for battery.

smcv commented 5 years ago

When the messages have been diverted off to a portal, the portal can do whatever it wants (including asking for permission to do what the app/game wants), but a necessary first step would be to translate from what the game does (which Flatpak can't really change if the game is doing direct D-Bus calls) to something that will reach the portal.

nanonyme commented 5 years ago

https://gist.github.com/man0lis/ac5f50d1409954c38681353fb6c6921b might be fine for a simple interceptor

gasinvein commented 3 years ago

It crashes for me on wayland session despite it has access org.freedesktop.ScreenSaver.Inhibit.

Surprisingly enough, it works on Xephyr display running on XWayland (with software rendering).

Pablokiryu commented 2 months ago

Since no one has mentioned it, and someone else try to run the game in the future and is still facing issues stumbles upon this issue.... Running the game via gamescope allowed the game to run for me. i know it does not fix the underlying issue, but at least i am able to play and capture the gameplay now.
go in into the game's properties on steam, and add gamescope %command% in the launch options box.