fifty-six / Scarab

An installer for Hollow Knight mods written in Avalonia.
GNU General Public License v3.0
577 stars 157 forks source link

Controller stops working after API installation on Linux #204

Open noxifoxi opened 8 months ago

noxifoxi commented 8 months ago

Scarab Version

2.5.0.0

Hollow Knight Version

1.5.78.11833

Steps to Reproduce

Expected Behaviour

Controller works the same as the unmodified game.

Actual Behaviour

Controller doesn't work or sometimes has strange / wrong inputs.

Logs

2023-11-26 00:39:59.487 +01:00 [INF] Launching...
2023-11-26 00:39:59.739 +01:00 [INF] Initializing to normal mode (.cctor)
2023-11-26 00:40:00.297 +01:00 [INF] Checking if up to date...
2023-11-26 00:40:00.298 +01:00 [INF] Current version of installer is 2.5.0.0
2023-11-26 00:40:00.605 +01:00 [INF] Loading settings.
2023-11-26 00:40:00.652 +01:00 [INF] Fetching links
2023-11-26 00:40:00.952 +01:00 [INF] Fetched links successfully
2023-11-26 00:40:01.048 +01:00 [INF] Displaying model
2023-11-26 00:40:20.345 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = False }
2023-11-26 00:40:21.729 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = False, Version = 74.0.0, Updated = False }
2023-11-26 00:42:36.417 +01:00 [INF] Launching...
2023-11-26 00:42:36.642 +01:00 [INF] Initializing to normal mode (.cctor)
2023-11-26 00:42:37.217 +01:00 [INF] Checking if up to date...
2023-11-26 00:42:37.218 +01:00 [INF] Current version of installer is 2.5.0.0
2023-11-26 00:42:37.573 +01:00 [INF] Loading settings.
2023-11-26 00:42:37.622 +01:00 [INF] Fetching links
2023-11-26 00:42:37.740 +01:00 [INF] Fetched links successfully
2023-11-26 00:42:37.837 +01:00 [INF] Displaying model
2023-11-26 00:42:40.943 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = False }
2023-11-26 00:42:43.824 +01:00 [INF] Reinstalling API, InstalledState { Enabled = False, Version = 74.0.0, Updated = False }
2023-11-26 00:42:49.199 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = True }
2023-11-26 00:42:53.633 +01:00 [INF] Reinstalling API, InstalledState { Enabled = False, Version = 74.0.0, Updated = True }
2023-11-26 00:42:54.398 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = True }
2023-11-26 00:42:54.629 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = False, Version = 74.0.0, Updated = True }
2023-11-26 00:42:54.824 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = True }
2023-11-26 00:42:56.009 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = False, Version = 74.0.0, Updated = True }
2023-11-26 00:42:57.671 +01:00 [INF] Reinstalling API, InstalledState { Enabled = True, Version = 74.0.0, Updated = True }
2023-11-26 00:43:00.320 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = True }
2023-11-26 00:43:01.400 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = False, Version = 74.0.0, Updated = True }
2023-11-26 00:44:46.263 +01:00 [INF] Launching...
2023-11-26 00:44:46.487 +01:00 [INF] Initializing to normal mode (.cctor)
2023-11-26 00:44:47.054 +01:00 [INF] Checking if up to date...
2023-11-26 00:44:47.055 +01:00 [INF] Current version of installer is 2.5.0.0
2023-11-26 00:44:47.458 +01:00 [INF] Loading settings.
2023-11-26 00:44:47.505 +01:00 [INF] Fetching links
2023-11-26 00:44:47.653 +01:00 [INF] Fetched links successfully
2023-11-26 00:44:47.749 +01:00 [INF] Displaying model
2023-11-26 00:44:49.669 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = False }
2023-11-26 00:45:30.171 +01:00 [INF] Launching...
2023-11-26 00:45:30.394 +01:00 [INF] Initializing to normal mode (.cctor)
2023-11-26 00:45:30.975 +01:00 [INF] Checking if up to date...
2023-11-26 00:45:30.977 +01:00 [INF] Current version of installer is 2.5.0.0
2023-11-26 00:45:31.424 +01:00 [INF] Loading settings.
2023-11-26 00:45:31.472 +01:00 [INF] Fetching links
2023-11-26 00:45:31.696 +01:00 [INF] Fetched links successfully
2023-11-26 00:45:31.791 +01:00 [INF] Displaying model
2023-11-26 00:45:36.709 +01:00 [INF] Reinstalling API, InstalledState { Enabled = False, Version = 74.0.0, Updated = False }
2023-11-26 00:46:24.029 +01:00 [INF] Launching...
2023-11-26 00:46:24.255 +01:00 [INF] Initializing to normal mode (.cctor)
2023-11-26 00:46:24.820 +01:00 [INF] Checking if up to date...
2023-11-26 00:46:24.821 +01:00 [INF] Current version of installer is 2.5.0.0
2023-11-26 00:46:25.159 +01:00 [INF] Loading settings.
2023-11-26 00:46:25.206 +01:00 [INF] Fetching links
2023-11-26 00:46:25.358 +01:00 [INF] Fetched links successfully
2023-11-26 00:46:25.454 +01:00 [INF] Displaying model
2023-11-26 00:46:28.361 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = False }
2023-11-26 00:46:30.612 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = False, Version = 74.0.0, Updated = False }
2023-11-26 00:46:59.967 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = False }
2023-11-26 00:51:23.300 +01:00 [INF] Launching...
2023-11-26 00:51:23.524 +01:00 [INF] Initializing to normal mode (.cctor)
2023-11-26 00:51:24.084 +01:00 [INF] Checking if up to date...
2023-11-26 00:51:24.085 +01:00 [INF] Current version of installer is 2.5.0.0
2023-11-26 00:51:24.382 +01:00 [INF] Loading settings.
2023-11-26 00:51:24.431 +01:00 [INF] Fetching links
2023-11-26 00:51:24.699 +01:00 [INF] Fetched links successfully
2023-11-26 00:51:24.794 +01:00 [INF] Displaying model
2023-11-26 00:51:27.846 +01:00 [INF] Reinstalling API, InstalledState { Enabled = False, Version = 74.0.0, Updated = False }
2023-11-26 00:51:47.318 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = True }
2023-11-26 00:51:49.747 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = False, Version = 74.0.0, Updated = True }
2023-11-26 01:01:14.235 +01:00 [INF] Toggling API, current state: InstalledState { Enabled = True, Version = 74.0.0, Updated = True }
fifty-six commented 8 months ago

So the first things I'd check - is HK running under proton or no? A friend of mine told me it defaults to proton, at least on the deck, and you don't want that. The other thing is that you can try Steam Input, which I think is enabled by default - though you could also toggle it off. There's also the "raw input" option, though I haven't had much success with that personally. Of all of these, the first question is the most important - as the linux and windows builds are different basically only in controller support, so it tends to be an issue with mismatched dlls. The other thing is, if you were running the windows version of Scarab for some version with the linux version of hk, though I think that's pretty unlikely.

noxifoxi commented 8 months ago

HK is running under proton (steam's default behaviour). I do also prefer this, because Rumble doesn't work on the native Linux version for me.

I'm using the Linux build of Scarab. I tried running the Windows version, but it doesn't start.

Toggling "Raw input" doesn't change the outcome. Same with Steam Input.

It might be a quick fix by detecting if it's the Windows version of HK (like check for the .exe) and shipping that specific API version instead.

noxifoxi commented 8 months ago

I got it working:

So, this confirms: checking if the Proton (Windows) version of HK is installed and then installing the Windows DLLs of the API instead of the Linux ones should fix this issue!

fifty-six commented 8 months ago

I'd really prefer people just use the Linux install — encouraging developers to just rely on proton will only be worse for getting Linux ports — but I could add this I suppose.

lunasophia commented 4 months ago

Ran into this myself tonight when trying to get set up. I noticed that Steam was a little stubborn about actually running HK natively instead of under proton. I had to fiddle with it a bit to get it to do that (it's not always as simple as just toggling the "force a specific Steam Play compatibility tool"). I've also noticed that switching between native and proton tends to wipe my saves, so make sure you back up your saves while troubleshooting this. I only told Scarab to install the API once, running on Linux. I'm sorry this isn't too specific, but I wanted to provide my observations anyway in case they're useful. Everything works for me now with my XBox-compatible controller.

lunasophia commented 4 months ago

Some more information on Steam being stubborn: my machine updated Hollow Knight this morning (not sure what the update was for, it would usually say shader updates if that was the case) and my game reset to the apparent default of running under Proton. Toggling the Steam Play compatibility fixed it, though I had to reinstall the API again. All my mods are still in place, though.

Given this, and that my controller works when Steam is running natively, I think this can probably be closed? There are certainly bugs here, but they're bugs in Steam, not the randomizer.