evg-zhabotinsky / libspeedhack

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

Not working in Wine #13

Open josefv2 opened 1 year ago

josefv2 commented 1 year ago

Note that it's Wine, not Proton. All my games are DRM free, I switched to Linux for privacy concerns and prefer avoiding Proton, Steam collects many data about it's users.

When I run any native game with speedhack, it works well. When I use it on Wine games, speed is unchanged. I do speedhack wine game.exe and in a new tab, write echo x >/tmp/speedhack_pipe. It never works, ithappens on every title I use on Wine, which makes me think there is a problem going on.

I use Arch Linux. I installed libspeedhack through the AUR. Wine version is 8.5.1.

evg-zhabotinsky commented 1 year ago

Could you please check with a prebuilt version from the releases page? Aur package was made by someone else, and I suspect it doesn't build the 32-bit lib, which would prevent it from working for any 32-bit games, and many Windows games are.

josefv2 commented 1 year ago

/usr/bin/wineserver: symbol lookup error: ~/libspeedhack/lib64/libspeedhack.so: undefined symbol: floor

Sorry, what does it mean? Wine straight up refuses to open if I use prebuilt libspeedhack. I'm using ~/libspeedhack/speedhack wine game.exe

evg-zhabotinsky commented 1 year ago

Ookay, that's weird. It did work on my Manjaro when I published it, though not Wine specifically. Try LD_PRELOAD=libm.so.6 ~/libspeedhack/speedhack wine game.exe please?

josefv2 commented 1 year ago

Thanks, it runs now. Unfortunately, speedhack still doesn't work. This happens for all Wine, not just some games.

evg-zhabotinsky commented 1 year ago

Then I'm out of ideas for now. Will have to debug when I have time. For now, though: It seems like CheatEngine should work under Wine from what I've googled up? Might as well try that.

josefv2 commented 1 year ago

Thanks. And about Cheat Engine it just crashes games when I speedhack most of them, which is why I came here. Maybe my Wine is broken?

evg-zhabotinsky commented 1 year ago

I can't know, really. Need to reproduce your setup to debug, and I don't have the time currently. It worked for Noita (it should be 32-bit) for me under Proton, so if it does not for you then your setup has some issue, other than that I have no suggestions. AUR package lacks 32-bit support from the looks of it, but the prebuilt binaries should work. (That LD_PRELOAD hack is only needed when the app doesn't use libm, and only until I fix the build.)

evg-zhabotinsky commented 1 year ago

Or maybe Wine/Proton just updated and everything is borked now. Or it could depend on how exactly the Wine was built.

josefv2 commented 1 year ago

Btw, with all Linux titles I've played your speedhack works, even 32 bit ones, while no Wine game is affected, not only 32 bit ones. This may me related to Wine globally as I don't have any success with it only.

CHECK-1234 commented 1 year ago

I had the same undefined symbol: floor error and adding the LD_PRELOAD=libm.so.6 fixed that error. The speed hack is currently working great for me with Wine.

I sometimes have to do echo [NUMBER] >/tmp/speedhack_pipe multiple times for the speed to take effect, try doing echo [NUMBER] >/tmp/speedhack_pipe multiple times until speed hack takes effect

src-tinkerer commented 5 months ago

Problem can also be resolved by linking against the math lib, -lm. Will make a PR.