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

Steam Deck Usage #160

Open
Zvince opened this issue Dec 18, 2022 · 10 comments
Open

Steam Deck Usage #160

Zvince opened this issue Dec 18, 2022 · 10 comments
Assignees

Comments

@Zvince
Copy link

Zvince commented Dec 18, 2022

For The Life of me I am unable to use m'overlay on steam deck desktop mode. Steam deck runs arch linux. M'overlay will launch but says "Invalid permissions". Any help would be greatly appreciated!

@bkacjios
Copy link
Owner

bkacjios commented Dec 18, 2022

How are you running it? Are you running the native Linux version of M'Overlay via m-overlay-x64.love? Or are you running the windows version?

@Zvince
Copy link
Author

Zvince commented Dec 18, 2022

Yes I'm using m-overlay-x64.love. I installed love2d via command line. I believe the problem is that I can't write to use/bin. I'm unable to run the command that let's m'overlay read dolphins memory because it states the folder "love" does not exist

@bkacjios
Copy link
Owner

How did you install it via commandline exactly? The love executable may not be in /usr/bin/

@Zvince
Copy link
Author

Zvince commented Dec 19, 2022

In Konsole, I entered both "sudo git clone https://github.com/love2d/love.git" and "git clone https://github.com/love2d/love.git"

image

@Zvince
Copy link
Author

Zvince commented Dec 19, 2022

I also tried entering the command into the bin folder and got this
image

@Zvince
Copy link
Author

Zvince commented Dec 19, 2022

Update: I was able to write to usr/bin. I successfully installed love2d. I ran the command "sudo setcap cap_sys_ptrace=eip /usr/bin/love" with konsole returning no error. Despite following all steps I still get Invalid Permissions.
image

@bkacjios
Copy link
Owner

I'm still confused how you installed it. Cloning the GitHub repository would only get you the source code.. Did you build it from source?

@Pursistance
Copy link

Not sure if this is the same issue, but my header also has that "Invalid permissions...."

This is the error I am receiving:

c4@c4-ms7d42:~/Games/Melee$ love application.love
[DEBUG - 20:29:17] Love2D 11.3.0 - Mysterious Mysteries
[DEBUG - 20:29:17] Lua 5.1 (LuaJIT 2.1.0-beta3)
[DEBUG - 20:29:17] M'Overlay (2.1.0)
[ERROR - 20:29:17] Thread error (Thread: 0x558c784b0d00)

modules/ssl.lua:8: module 'ssl.core' not found:
no field package.preload['ssl.core']
no 'ssl/core' in LOVE game directories.
no file 'ssl/core' in LOVE paths.
no file './ssl/core.lua'
no file '/usr/share/luajit-2.1.0-beta3/ssl/core.lua'
no file '/usr/local/share/lua/5.1/ssl/core.lua'
no file '/usr/local/share/lua/5.1/ssl/core/init.lua'
no file '/usr/share/lua/5.1/ssl/core.lua'
no file '/usr/share/lua/5.1/ssl/core/init.lua'
no file './ssl/core.so'
no file '/usr/local/lib/lua/5.1/ssl/core.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/ssl/core.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './ssl.so'
no file '/usr/local/lib/lua/5.1/ssl.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.1/ssl.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
modules/ssl.lua:8: in main chunk
[C]: in function 'require'
modules/https.lua:10: in main chunk
[C]: in function 'require'
modules/web/thread.lua:1: in main chunk
stack traceback:
[C]: in function 'error'
[string "boot.lua"]:631: in function <[string "boot.lua"]:630>
main.lua:780: in function main.lua:768
[C]: in function 'xpcall'
[string "boot.lua"]:802: in function <[string "boot.lua"]:769>

@bkacjios
Copy link
Owner

bkacjios commented Jan 3, 2023

Ah, the latest update will now require lua51-sec as a dependency for the built in updater functionality. You would have to install that package via pacman.

@KyleGospo
Copy link

KyleGospo commented May 29, 2023

Got this working on my Deck and it was quite the journey, so I'm writing this to save someone else the headache.

As a preface, here's everything that doesn't work and why:

  1. Installing love as a package via pacman. While you can do this, you need another utility (rwfus or steamos-btrfs) to reinstall it after every SteamOS update, and you'd need to manually run setcap after every OS update as well, which may require you to disable read only to do so depending on if your installer re-locks the filesystem as it should
  2. Using the portable version of love. It works, but once you run setcap you can no longer LD_PRELOAD and now you have an unusable copy of love.
  3. Using the love appimage, setcap simply doesn't work on those.
  4. Using Distrobox. This gets as far as hooking dolphin, but Distrobox doesn't have the permissions to actually read the memory when the time comes, so it'll be stuck on waiting for Melee. Might work in a root container but that doesn't work on SteamOS.

So, with those in mind, here's my solution.

  1. Install the needed dependencies via rwfus or steamos-btrfs. In my case I already did the BTRFS mod, so for me this was as simple as editing /etc/default/steamos-btrfs to have: STEAMOS_BTRFS_ROOTFS_PACMAN_EXTRA_PKGS="lua51-sec luajit mpg123"
  2. Build a version of love with static links, either in a Distrobox arch image or on another Linux desktop. This can be done by following the normal build instructions, but replacing the configure step with ./configure --disable-shared --enable-static and manually changing CFLAGS to be CFLAGS = -fvisibility=hidden -g -O2 -lpthread in the generated Makefile.
  3. Make a folder in /home/deck/Applications called Slippi and add your compiled love executable, application.love for m-overlay, and the Slippi appimage. You should be able to use the launcher but I went with their custom dolphin build's appimage for this. Be sure to run the required setcap command on your love executable.
  4. Finally, create a sh file in that directory with the following contents and add it to Steam as a non-steam game:
#! /bin/bash
/home/deck/Applications/Slippi/love application.love & /home/deck/Applications/Slippi/Slippi_Online-x86_64.AppImage && fg

And there you have it. Works on both the desktop and in game mode. This should also apply to immutable operating systems like Fedora Silverblue/Kinoite, with the only difference being the ability to easily layer the needed dependencies from step 1.

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

4 participants