Update on games taking forever to close

As I’ve mentioned somewhere on the Steam forums, for some unknown reason, when I close a game with Special K injected, sometimes, it takes a solid half minute to close. I’ve found two different games with this behavior, Yakuza 0 and Caligula Effect Overdose.

On Caligula Effect, my log ending looks like this:

08/01/2020 12:28:32.376: [ SpecialK ] *** Initiating DLL Shutdown ***
08/01/2020 12:28:32.376: [ DXGI 1.4 ] Shutting down Memory Budget Change Thread… timed out (killing manually)!
08/01/2020 12:28:33.447: [ GPU Stat ] Shutting down Prognostics Thread… done! ( 334 ms)
08/01/2020 12:28:56.262: [ SpecialK ] Saving user preferences to SpecialK.ini… done! ( 2 ms)
08/01/2020 12:28:56.264: [ SpecialK ] Shutting down MinHook… done! ( 0 ms)
08/01/2020 12:28:56.264: [ WMI Perf ] Shutting down WMI WbemLocator… done! ( 0 ms)
08/01/2020 12:28:56.265: [ SpecialK ] Custom dxgi.dll Detached (pid=0x0ad4)

On Yakuza 0, the end of my log looks like this:

07/22/2020 20:14:04.413: [ SpecialK ] *** Initiating DLL Shutdown ***
07/22/2020 20:14:04.413: [ GPU Stat ] Shutting down Prognostics Thread… done! ( 335 ms)
07/22/2020 20:14:26.360: [ SpecialK ] Saving user preferences to SpecialK.ini… done! ( 3 ms)
07/22/2020 20:14:26.363: [ SpecialK ] Shutting down MinHook… done! ( 0 ms)
07/22/2020 20:14:26.363: [ WMI Perf ] Shutting down WMI WbemLocator… done! ( 0 ms)
07/22/2020 20:14:26.364: [ SpecialK ] Custom dxgi.dll Detached (pid=0x3050)

On both of these games, I cannot find anything in any of the log files other than SpecialK.log indicating what could be causing this delay. I’m starting this thread because I did not notice this effect in Caligula Effect until now, and perhaps having two separate examples might help figure out what’s happening.

What version of Special K are you using for the games?

I’m using the most recent version of SKIF, for both games.

Can you upload dxgi.log and modules.log from one or both of the games to pastebin.com and link them here?

Caligula Effect Modules.log - https://pastebin.com/mkEK7iu0

Yakuza 0 Modules.log - https://pastebin.com/uxQ8ade9

There is no dxgi.log available for either game. Yes I haven’t played Yakuza 0 in almost 2 weeks, the date is correct.

Hmm, there’s nothing that really sticks out to me in either of the logs…

Can you try installing Special K locally for the games and see if that solves it? Basically make a copy of SpecialK64.dll and name it to dxgi.dll and put a copy in both of the below folders:

  • D:\Games\Steam\steamapps\common\Yakuza 0\media\
  • D:\Games\Steam\steamapps\common\The Caligula Effect\COD\Binaries\Win64\

You can then disable the global injection and Special K will hook the games locally on launch through the dxgi.dll files.


Edit: Oh right, the reason why there’s no dxgi.log file is because you’re using global injection. For global injection, the log file is called just “SpecialK.log” instead.

Those logs in the first post were excerpts from my SpecialK.log, that show the discrepancy in the timestamps. For Yakuza 0, local injection did nothing. For Caligula Effect, local injection actually did fix it.

Of note is that both games created a dxgi.log, Yakuza 0’s looks identical, albeit with new timestamps, but Caligula Effect’s looks different in the last section:

08/01/2020 14:23:57.669: [ SpecialK ] *** Initiating DLL Shutdown ***
08/01/2020 14:23:57.669: [ DXGI 1.4 ] Shutting down Memory Budget Change Thread… done!
08/01/2020 14:23:57.715: [ GPU Stat ] Shutting down Prognostics Thread… done! ( 2 ms)
08/01/2020 14:23:57.738: [ SpecialK ] Saving user preferences to dxgi.ini… done! ( 2 ms)
08/01/2020 14:23:57.740: [ SpecialK ] Shutting down MinHook… done! ( 0 ms)
08/01/2020 14:23:57.740: [ WMI Perf ] Shutting down WMI WbemLocator… done! ( 0 ms)
08/01/2020 14:23:57.740: [ SpecialK ] Custom dxgi.dll Detached (pid=0x3aec)

I think it’s interesting that even for this short time, the time between the shut down of the prognostics thread and the time for the writing to the INI, and the time listed to the right of the prognostics thread, is different. If I had to wager a guess, something’s going wrong in that step.

Just for some more info on the prognostics thread time discrepancy, I opened and closed a few games and took a look at their logs, to see if this anomalous behavior with the times continued, and Battle for Bikini Bottom Rehydrated showed the same behavior with the timestamp for saving to the INI not being consistent with the reported time taken to close the thread as Caligula Effect, although it was a fast close and not a slow close even with global injection.

Trials of Mana just didn’t even write a log, local or global, but had the exact same behavior as Caligula Effect, where local fixed the issue. I should mention the slow game shut down actually entirely locks up my PC for those 30 seconds, hence why I’m very invested in fixing this issue.

Another interesting note is that out of two of those four games, the ones that had the issue fixed with local injection were both Unreal 4, however this could mean nothing, because so is Battle for Bikini Bottom.

Update for anyone else having this issue, while I’d hardly call it a permanent solution, closing the games affected by this issue via task manager instead of Alt-F4 or the ingame close option makes the game close quickly instead of hanging your system for a while.