libspeedhack icon indicating copy to clipboard operation
libspeedhack copied to clipboard

Not working in Wine

Open josefv2 opened this issue 1 year ago • 11 comments

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.

josefv2 avatar Apr 09 '23 23:04 josefv2

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.

evg-zhabotinsky avatar Apr 10 '23 00:04 evg-zhabotinsky

/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

josefv2 avatar Apr 10 '23 17:04 josefv2

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?

evg-zhabotinsky avatar Apr 10 '23 17:04 evg-zhabotinsky

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

josefv2 avatar Apr 10 '23 18:04 josefv2

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.

evg-zhabotinsky avatar Apr 10 '23 18:04 evg-zhabotinsky

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?

josefv2 avatar Apr 10 '23 18:04 josefv2

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 avatar Apr 10 '23 19:04 evg-zhabotinsky

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

evg-zhabotinsky avatar Apr 10 '23 19:04 evg-zhabotinsky

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.

josefv2 avatar Apr 13 '23 00:04 josefv2

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

CHECK-1234 avatar Jul 15 '23 09:07 CHECK-1234

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

src-tinkerer avatar Jun 05 '24 10:06 src-tinkerer