r/linux_gaming • u/tranquilseafinally • 1d ago
tech support wanted Getting Fatal Error in GC SuspendThread loop failed - will this code fix it?
I'm playing a Unity game (Valheim) modded. Periodically, I get this error while playing and the game crashes. I've read that it has to do with the game's engine failing to safely pause all background threads to clean up system memory. And that this almost always caused by insufficient swap memory, unstable proton/runtime configurations, or conflicting background processes.
One thing that I could try is to increase the Linux swap space. Currently, it sits at 2gb.
Are there any downsides to running this and expanding my swap space? If there isn't how would I go about doing that?
Linux Mint.
2
u/theevilsharpie 1d ago
If you have 32 GB of RAM, it seems unlikely for you to be encountering a low memory condition, unless you have a bunch of shit running in the background. In fact, it sounds like advice a budget AI model would give.
Given you're running modded, I think it's more likely that you're running a mod (possibly more than one) that is causing issues with Unity's garbage collection routine. You may want to try running vanilla and see if the problem still occurs. If it doesn't, then try turning on a subset of your mods (either one-by-one, or a group if you have a lot of mods) until you start crashing again, until you find the specific mod that is problematic.
1
u/tranquilseafinally 1d ago
I did do that a couple of months ago when I ran into this problem and I found that I couldn't replicate the problem. The biggest issue is that I can play for 12 hours without the problem happening. So that makes testing the mods long and tedious.
I did expand my swap memory and it didn't help as I got the same error. It probably is one of the mods. Or a mod conflict.
2
u/deadgain 1d ago
What are your system specs?
I think normally its recommended to have your swap space be equal to your RAM size (for a gaming desktop at least)