fgsfdsfgs / perfect_dark

work in progress port of n64decomp/perfect_dark to modern platforms
MIT License
1.2k stars 74 forks source link

[Bug] Game freezes after aiming with any gun (Linux) #506

Open rene-durazo opened 3 weeks ago

rene-durazo commented 3 weeks ago

Game freezes after aiming with any gun, in any game mode. This happens to me 100% of the time after aiming, the time is random tho, sometimes it freezes after aiming for 1 second, others after aiming for 10 seconds continuously I play on Steam Deck on the latest build hash 2a5c3a3

fgsfdsfgs commented 3 weeks ago

What input method are you using? Built in Steam Deck controller?

rene-durazo commented 3 weeks ago

Yes I'm using the Steam Deck controller

fgsfdsfgs commented 3 weeks ago

I can't reproduce this on my own Steam Deck, either in desktop mode or in normal mode. Are you running the Flatpak build or the normal build? Does this happen on every level or on a specific one? What did you bind your aim button to?

rene-durazo commented 3 weeks ago

It happens in every level, even in challenges I have my aim mapped to L2 trigger, I have the build from the releases Github page, I'll upload a video

fgsfdsfgs commented 3 weeks ago

There are two Linux builds on the release page, one is a Flatpak (io.fgsfdsfgs.perfectdark.flatpak), one is just a bunch of binaries in a zip file. Which one is it? There is also a Windows build there, in case you're using that for some reason.

rene-durazo commented 3 weeks ago

I'm using this one pd-i686-linux.tar.gz

rene-durazo commented 3 weeks ago

Here's a clip

https://github.com/user-attachments/assets/1c669def-e214-4e77-a9b9-4169e6082814

LonelySpaceDetective commented 3 weeks ago

Not to backseat dev, but have you tried putting manual aiming on a different button? I can't help but wonder if it's somehow an issue with pressing L2 down, rather than with aiming.

rene-durazo commented 3 weeks ago

I tried it, happen to me again after changing the trigger to L1

fgsfdsfgs commented 3 weeks ago

No, all suggestions help, especially since I don't really know what the cause of this could be. I suppose you could try the flatpak build instead? Not sure if that's gonna fix anything, but who knows.

NeonNyan commented 3 weeks ago

I experience this with my steam deck depending on the steam runtime I use:

I started noticing it after the controller patches were merged.

It reproduces consistently with 1.0 (Scout). I don't remember if the game would even run without it on my steam deck. It doesn't reproduce afaict on recent Ubuntu releases or Gentoo (back when I still used it.) My guess is that an older version of SDL doesn't like the controller support implementation. I'm not sure if it's an SDL bug that was fixed or if it's a port bug just masked by recent versions.

Since that's the only available runtime in the dropdown, I installed the latest available from the steam tools section and used a startup script to launch it, like this:

note: this is a linux build despite the .exe extension.

#!/bin/sh
/home/deck/.steam/root/steamapps/common/SteamLinuxRuntime_sniper/run -- /home/deck/.local/opt/perfect-dark/pd.exe

Or you could run the windows version on proton.

rene-durazo commented 3 weeks ago

Thanks for the suggestion, I'll give it a shot

NeonNyan commented 1 week ago

@rene-durazo did this work for you?