Skip to content

Instantly share code, notes, and snippets.

@sugoidogo
Created April 5, 2023 22:18
Show Gist options
  • Save sugoidogo/9b66bc1e43b5e01c04b0a608d9b1e8d4 to your computer and use it in GitHub Desktop.
Save sugoidogo/9b66bc1e43b5e01c04b0a608d9b1e8d4 to your computer and use it in GitHub Desktop.

GameInput PC Crashing

Solution using IFODE

In 2017 I wrote a program to take advantage of Windows Image Execution Options, which allows you to start a debugger whenever a program is launched. I never finished that program, but it got far enough that you can use it to prevent a program from ever running. You can download it from here. Windows and chrome may prevent you from downloading or running this program, but you can ignore their warnings and hit the download or run anyways options they have hidden in submenus. This program has to be run from command line in an admin prompt. The easiest way to get there on windows 10+ is to right-click your start menu and select "Windows Powershell (Administrator)". Then put in the following commands:

> cd $HOME/Downloads
> ./ifeode.exe -o gameinputsvc.exe -n C:\windows\system32\systray.exe

If there's no output from the command, it worked! GameInput should never bother you again. You can check that it worked like so:

> ./ifeode.exe -s
post values:
gameinputsvc.exe >> C:\windows\system32\systray.exe

To undo these changes, run ifeode again without the new program arg:

> ./ifeode.exe -o gameinputsvc.exe
@Gavin-Williams
Copy link

Gavin-Williams commented Mar 26, 2024

This would crash any application or prevent an app from running that uses GDK-Input. If you think there is a bug in the Input API, you should file an issue on the github page. I'm seeing many people talking about this issue and trying to disable GameInput, but not seeing anybody actually isolating the issue, or being able to reproduce it. It could equally be the title that is using the input that is crashing, couldn't it? Unless there is evidence of Windows crashing without GameInput being used. Does the GameInput runtime module even execute if it's not started by an application?

@sugoidogo
Copy link
Author

sugoidogo commented Mar 26, 2024

Does the GameInput runtime module even execute if it's not started by an application?

Yes, gameinputsvc is exclusively started by windows at boot as a background service. Assuming that the crashes are occurring in games that are using GDK-Input (presumably games not using it wouldn't be affected regardless), the observed behavior is that crashes cease completely when gameinputsvc is not running, whether that's by simply disabling the service or (re)moving the exe. So it seems that GDK-Input is perfectly useable without the background service, and this method only solves the problem of windows updates restoring the service and/or exe so that you don't have to keep fixing the same issue, but doesn't accomplish anything different than previous methods did as far as preventing the service from starting. As far as bug reports go, I've never had this issue myself, so I can't do much about that.

@Gavin-Williams
Copy link

I haven't seen the crash either, and I've been starting and stopping game-input, and it's been running without any crashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment