evg-zhabotinsky / libspeedhack

A simple dynamic library to slowdown or speedup games on Linux
MIT License
71 stars 9 forks source link

speedhack+steam linux runtime #4

Closed bgkillas closed 2 years ago

bgkillas commented 3 years ago

speedhack seems to not run correctly when its used with steam linux runtime soldier it wont let me echo a number into /tmp/speedhack_pipe

evg-zhabotinsky commented 3 years ago

Where did you put the speedhack command? It should be in launch options in game's properties in Steam. See README, and don't forget to substitute the actual path to the speedhack script. If /tmp/speedhack_pipe doesn't exist, it means the speedhack script never launched.

bgkillas commented 3 years ago

speedhack_pipe gets created but when i echo numbers into it it does not finish it just freezes

bgkillas commented 3 years ago

and when i disable steam linux runtime i can use speedhack but my game does not work without steam linux runtime

evg-zhabotinsky commented 3 years ago

That's weird. If echo hangs that means no one is reading the pipe, which means that either LD_PRELOAD / LD_LIBRARY_PATH got cleared along the way and speedhack never loaded, or something got messed up even worse. Will try to reproduce later when I get to computer. Which game is it, or does that happen with every game?

bgkillas commented 3 years ago

it happens in every game i tested if they use proton and steam linux runtime soldier

evg-zhabotinsky commented 2 years ago

Sorry for a loooooooooong wait, but I didn't realize what Solder runtime was back then. Copying from my reply to #8:

Was going to say that anything Wine probably won't work, but then remembered something and decided to check. And lo and behold, it actually works perfectly for Noita! If done right, that is.

Try this pressure-vent.sh : https://gist.github.com/evg-zhabotinsky/cd54c8d8bf3803599d3b33cc56e6fbc0

Long story short: libspeedhack is loaded using LD_PRELOAD, and Proton uses Solder runtime that comes in a "Pressure Vessel" container that simply wipes LD_PRELOAD and LD_LIBRARY_PATH. The linked script just cuts that runtime out, allowing to use primusrun/pvkrun, libspeedhack, github.com/milaq/libstrangle and probably some other stuff with Proton.

Will need to properly upload and document all that later when I have time.

bgkillas commented 2 years ago

ah i totally forgot about this lol i have learnt a bit more about proton since posting maybe put in the doc that the aur packages "proton", "proton-experimental" and "proton-ge-custom" for arch linux should be used with this instead of normal proton versions because the normal proton versions are built againts steam linux runtime and may have more problems and these are built againts your systems libs

evg-zhabotinsky commented 2 years ago

Oh. Well, I actually use Proton that comes with Steam, works just fine for me if I get rid of the runtime with that hack I posted today. But yeah, if it exists in repos then maybe it makes sense to install from repos.

bgkillas commented 2 years ago

ye that hack is quite annoying also since you have to do it everytime the runtime updates but this also has the caveat of taking a while to compile

bgkillas commented 2 years ago

prob best to suggest both as options

evg-zhabotinsky commented 2 years ago

you have to do it everytime the runtime updates

Huh? I just put it in game (not Proton) launch options (primusrun ~/pressure-vent.sh %command%) , those shouldn't get reset unless you uninstall the game or whole Steam.

bgkillas commented 2 years ago

oh i just assumed you did another hack lol

evg-zhabotinsky commented 2 years ago

oh i just assumed you did another hack lol

I think I saw the one you are talking about. And yeah, I also decided that I didn't want to worry about updates. So I wrote my own wrapper that modifies the command line and cuts the runtime out of it.

bgkillas commented 2 years ago

i guess i should close this now