Skip to content

olmod.sh steam deck (gamescope) compatability #315

@kevenwyld

Description

@kevenwyld

olmod.sh seems to not work correctly when attempting to launch through the default steam deck UI. I believe this is due to the steam UI running inside a gamescope session. I've been able to reproduce this behavior on the desktop as well using gamescope directly.

Apologies this is going to get a little into the weeds because I had to work around some quoting issues in launch options as well. I'll try to explain them in as much detail as I can.

Steps to reproduce:

  1. Launch steam in a gamescope session.
    I do this with a little script below. This is basically what the deck does however the deck assigns gamescope to a TTY directly with -O *,eDP-1
] > cat bin/steam-gamescope-16x9.sh
#!/bin/sh
# See https://developer.valvesoftware.com/wiki/Command_Line_Options
/usr/bin/gamescope -W 2560 -H 1440 -r 165 -b --steam -- /usr/bin/steam -tenfoot
  1. Install olmod using the steps in the wiki for linux
  2. Configure launch options as follows, working around the quoting issue by specifying the LD_PRELOAD path manually instead of using the script.
OLMODDIR=$HOME/.steam/root/steamapps/common/Overload LD_PRELOAD=$HOME/.steam/root/steamapps/common/Overload/olmod.so $HOME
/.steam/root/steamapps/common/Overload/Overload.x86_64 > olmod_debug.log 2>&1; echo "%command%"
  • This is because on the deck LD_PRELOAD already has the gameoverlayrenderer.so path in it and using that and olmod.so at the same time causes a segfault. Surprisingly even disabling the overlay in the game settings still populates these libraries in the LD_PRELOAD path.
  • The %command% at the end is because steam assumes that if %command% is missing from the launch options everything you put there is an argument that should follow the normal launch command, so putting it at the end launches an alternative executable and isolates all the other things that steam wants to put on the command line.
  • I found that on my desktop which runs swaywm (wayland) it was necessary to also add the SDL_VIDEODRIVER=x11 env var to get the game to draw a window correctly. Otherwise it would run in the background using a lot of CPU resources but not display anything.
  1. Run the game by pressing the play button. On both the deck and the desktop this results in the spinning valve icon but no game window. It is running in the background (verified by grepping the process tree) but nothing is drawn.

Log output from the debug shell redirect above:

(deck@steamdeck Overload)$ cat olmod_debug.log
Found path: /home/deck/.local/share/Steam/steamapps/common/Overload/Overload.x86_64
Mono path[0] = '/home/deck/.local/share/Steam/steamapps/common/Overload/Overload_Data/Managed'
Mono config path = '/home/deck/.local/share/Steam/steamapps/common/Overload/Overload_Data/Mono/etc'
Preloaded 'ScreenSelector.so'
Preloaded 'libCSteamworks.so'
Preloaded 'libopenvr_api.so'
Preloaded 'libsteam_api.so'
Unable to preload the following plugins:
	libUnetEncryption.so
	ScreenSelector.so
	libCSteamworks.so
	libsteam_api.so

Logging to /home/deck/.config/unity3d/Revival/Overload/Player.log

Log output from the Player.log file:
https://gist.github.com/kevenwyld/44bfca40c48b66fdb426f1dc58c3666e

When launching from desktop mode without changing any of the options listed above everything works fine. It also works fine on desktop if I launch steam outside of gamescope.

This is all to say that I'm stuck at this point but I have the hardware, so if someone comes along and has a better understanding of how the mod works I'd be happy to help any way that I can. It would be really cool to be able to use the mod just like any other game on the deck instead of having to switch to desktop mode. This has other advantages like a functional mouse pointer and the overlay.

Also, and most importantly, thank you everyone for this rather amazing achievement. I am in awe of the accomplishments of this community.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions