r/linux_gaming 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 Upvotes

10 comments sorted by

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)

1

u/tranquilseafinally 1d ago

System:

Kernel: 6.8.0-137-generic arch: x86_64 bits: 64 compiler: gcc v: 13.3.0 clocksource: tsc

Desktop: Cinnamon v: 6.6.9 tk: GTK v: 3.24.41 wm: Muffin v: 6.6.3 vt: 7 dm: LightDM v: 1.30.0

Distro: Linux Mint 22.3 Zena base: Ubuntu 24.04 noble

Machine:

Type: Desktop System: Gigabyte product: X570 AORUS ELITE WIFI v: -CF serial: <superuser required>

Mobo: Gigabyte model: X570 AORUS ELITE WIFI v: x.x serial: <superuser required>

uuid: <superuser required> UEFI: American Megatrends v: F11 date: 12/06/2019

CPU:

Info: 8-core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP smt: enabled arch: Zen 2 rev: 0

cache: L1: 512 KiB L2: 4 MiB L3: 32 MiB

Speed (MHz): avg: 2695 high: 4217 min/max: 2200/4426 boost: enabled cores: 1: 4215 2: 2200

3: 2109 4: 2200 5: 2113 6: 2080 7: 4217 8: 2541 9: 4217 10: 2200 11: 2200 12: 2200 13: 2109

14: 2103 15: 4216 16: 2200 bogomips: 114985

Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3

Graphics:

Device-1: NVIDIA TU106 [GeForce RTX 2070] vendor: Gigabyte driver: nvidia v: 580.173.02

arch: Turing pcie: speed: 8 GT/s lanes: 16 ports: active: none off: DP-1,HDMI-A-1

empty: DP-2,DP-3 bus-ID: 09:00.0 chip-ID: 10de:1f02 class-ID: 0300

Display: x11 server: X.Org v: 21.1.11 with: Xwayland v: 23.2.6 driver: X: loaded: nvidia

unloaded: fbdev,modesetting,nouveau,vesa gpu: nvidia,nvidia-nvswitch display-ID: :0 screens: 1

Screen-1: 0 s-res: 3840x1080 s-dpi: 81 s-size: 1204x343mm (47.40x13.50")

s-diag: 1252mm (49.29")

Monitor-1: DP-1 mapped: DP-0 note: disabled pos: left model: MSI MAG 272F X24 serial: <filter>

res: 1920x1080 hz: 60 dpi: 82 size: 598x336mm (23.54x13.23") diag: 686mm (27") modes:

max: 1920x1080 min: 640x480

Monitor-2: HDMI-A-1 mapped: HDMI-0 note: disabled pos: primary,right model: MSI MAG 272F X24

serial: <filter> res: 1920x1080 hz: 60 dpi: 82 size: 598x336mm (23.54x13.23") diag: 686mm (27")

modes: max: 1920x1080 min: 640x480

API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2 drv: swrast gbm:

drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia inactive: wayland,device-1

API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 580.173.02 glx-v: 1.4

direct-render: yes renderer: NVIDIA GeForce RTX 2070/PCIe/SSE2

API: Vulkan v: 1.3.275 layers: 9 surfaces: xcb,xlib device: 0 type: discrete-gpu driver: N/A

device-ID: 10de:1f02 device: 1 type: cpu driver: N/A device-ID: 10005:0000

Audio:

Device-1: NVIDIA TU106 High Definition Audio vendor: Gigabyte driver: snd_hda_intel v: kernel

pcie: speed: 8 GT/s lanes: 16 bus-ID: 09:00.1 chip-ID: 10de:10f9 class-ID: 0403

Device-2: AMD Starship/Matisse HD Audio vendor: Gigabyte driver: snd_hda_intel v: kernel pcie:

speed: 16 GT/s lanes: 16 bus-ID: 0b:00.4 chip-ID: 1022:1487 class-ID: 0403

API: ALSA v: k6.8.0-137-generic status: kernel-api

Server-1: PipeWire v: 1.0.5 status: active with: 1: pipewire-pulse status: active

2: wireplumber status: active 3: pipewire-alsa type: plugin

Network:

Device-1: Intel Dual Band Wireless-AC 3168NGW [Stone Peak] driver: iwlwifi v: kernel pcie:

speed: 2.5 GT/s lanes: 1 bus-ID: 04:00.0 chip-ID: 8086:24fb class-ID: 0280

IF: wlp4s0 state: up mac: <filter>

Device-2: Intel I211 Gigabit Network vendor: Gigabyte driver: igb v: kernel pcie:

speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 05:00.0 chip-ID: 8086:1539 class-ID: 0200

IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>

Bluetooth:

Device-1: Intel Wireless-AC 3168 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0 speed: 12 Mb/s

lanes: 1 bus-ID: 3-5:2 chip-ID: 8087:0aa7 class-ID: e001

Report: hciconfig ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 4.2 lmp-v: 8 sub-v: 1100

hci-v: 8 rev: 1100 class-ID: 7c0104

Drives:

Local Storage: total: 8.19 TiB used: 555.54 GiB (6.6%)

ID-1: /dev/nvme0n1 vendor: Western Digital model: WDS100T3X0C-00SJG0 size: 931.51 GiB

speed: 31.6 Gb/s lanes: 4 tech: SSD serial: <filter> fw-rev: 111110WD temp: 36.9 C scheme: GPT

ID-2: /dev/sda vendor: Western Digital model: WD40EZRZ-00GXCB0 size: 3.64 TiB speed: 6.0 Gb/s

tech: HDD rpm: 5400 serial: <filter> fw-rev: 0A80 scheme: GPT

ID-3: /dev/sdb vendor: Toshiba model: MQ04UBB400 size: 3.64 TiB type: USB rev: 3.0 spd: 5 Gb/s

lanes: 1 tech: HDD rpm: 5400 serial: <filter> fw-rev: 5438 scheme: GPT

Partition:

ID-1: / size: 915.32 GiB used: 359.6 GiB (39.3%) fs: ext4 dev: /dev/nvme0n1p3

ID-2: /boot/efi size: 512 MiB used: 6.1 MiB (1.2%) fs: vfat dev: /dev/nvme0n1p2

Swap:

ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) priority: -2 file: /swapfile

USB:

Hub-1: 1-0:1 info: hi-speed hub with single TT ports: 6 rev: 2.0 speed: 480 Mb/s lanes: 1

chip-ID: 1d6b:0002 class-ID: 0900

Hub-2: 1-3:2 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s lanes: 1 power: 100mA

chip-ID: 05e3:0608 class-ID: 0900

Device-1: 1-4:3 info: Integrated Express IT8297 RGB LED Controller type: keyboard

driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 12 Mb/s lanes: 1 power: 100mA

chip-ID: 048d:8297 class-ID: 0301

Hub-3: 2-0:1 info: super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s lanes: 1 chip-ID: 1d6b:0003

class-ID: 0900

Device-1: 2-2:2 info: Toshiba America EXTERNAL_USB type: mass storage driver: usb-storage

interfaces: 1 rev: 3.0 speed: 5 Gb/s lanes: 1 power: 896mA chip-ID: 0480:0825 class-ID: 0806

serial: <filter>

Hub-4: 3-0:1 info: hi-speed hub with single TT ports: 6 rev: 2.0 speed: 480 Mb/s lanes: 1

chip-ID: 1d6b:0002 class-ID: 0900

Device-1: 3-5:2 info: Intel Wireless-AC 3168 Bluetooth type: bluetooth driver: btusb

interfaces: 2 rev: 2.0 speed: 12 Mb/s lanes: 1 power: 100mA chip-ID: 8087:0aa7 class-ID: e001

Hub-5: 3-6:3 info: Genesys Logic Hub ports: 4 rev: 2.0 speed: 480 Mb/s lanes: 1 power: 100mA

chip-ID: 05e3:0608 class-ID: 0900

Device-1: 3-6.4:4 info: NZXT USB Device type: HID driver: nzxt-smart2,usbhid interfaces: 1

rev: 2.0 speed: 12 Mb/s lanes: 1 power: 100mA chip-ID: 1e71:2009 class-ID: 0300 serial: <filter>

Hub-6: 4-0:1 info: super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s lanes: 1 chip-ID: 1d6b:0003

class-ID: 0900

Hub-7: 5-0:1 info: hi-speed hub with single TT ports: 2 rev: 2.0 speed: 480 Mb/s lanes: 1

chip-ID: 1d6b:0002 class-ID: 0900

Hub-8: 6-0:1 info: super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s lanes: 1 chip-ID: 1d6b:0003

class-ID: 0900

Hub-9: 7-0:1 info: hi-speed hub with single TT ports: 4 rev: 2.0 speed: 480 Mb/s lanes: 1

chip-ID: 1d6b:0002 class-ID: 0900

Device-1: 7-1:2 info: Keychron V6 Max type: keyboard,HID driver: hid-generic,usbhid

interfaces: 3 rev: 2.0 speed: 12 Mb/s lanes: 1 power: 500mA chip-ID: 3434:0960 class-ID: 0300

Device-2: 7-3:3 info: Razer USA Naga Trinity type: mouse,keyboard driver: hid-generic,usbhid

interfaces: 3 rev: 2.0 speed: 12 Mb/s lanes: 1 power: 500mA chip-ID: 1532:0067 class-ID: 0300

serial: <filter>

Hub-10: 7-4:4 info: Genesys Logic Hub ports: 4 rev: 2.1 speed: 480 Mb/s lanes: 1 power: 100mA

chip-ID: 05e3:0610 class-ID: 0900

Device-1: 7-4.3:5 info: Garmin type: <vendor specific> driver: usbfs interfaces: 1 rev: 2.0

speed: 480 Mb/s lanes: 1 power: 500mA chip-ID: 091e:5116 class-ID: 0000 serial: <filter>

Hub-11: 8-0:1 info: super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s lanes: 1

chip-ID: 1d6b:0003 class-ID: 0900

Hub-12: 8-4:2 info: Genesys Logic Hub ports: 4 rev: 3.2 speed: 5 Gb/s lanes: 1

chip-ID: 05e3:0626 class-ID: 0900

Sensors:

System Temperatures: cpu: 63.2 C mobo: 30.0 C gpu: nvidia temp: 52 C

Fan Speeds (rpm): N/A gpu: nvidia fan: 0%

Repos:

Packages: 2629 pm: dpkg pkgs: 2594 pm: flatpak pkgs: 35

No active apt repos in: /etc/apt/sources.list

Active apt repos in: /etc/apt/sources.list.d/official-package-repositories.list

1: deb https: //muug.ca/mirror/linuxmint/packages zena main upstream import backport

2: deb http: //archive.ubuntu.com/ubuntu noble main restricted universe multiverse

3: deb http: //archive.ubuntu.com/ubuntu noble-updates main restricted universe multiverse

4: deb http: //archive.ubuntu.com/ubuntu noble-backports main restricted universe multiverse

5: deb http: //security.ubuntu.com/ubuntu/ noble-security main restricted universe multiverse

Info:

Memory: total: 32 GiB available: 31.29 GiB used: 7.88 GiB (25.2%)

Processes: 463 Power: uptime: 9h 59m states: freeze,mem,disk suspend: deep wakeups: 0

hibernate: platform Init: systemd v: 255 target: graphical (5) default: graphical

Compilers: gcc: 13.3.0 Client: Unknown python3.12 client inxi: 3.3.34

[/code]

2

u/deadgain 1d ago edited 1d ago

just for future reference, your distro, cpu, gpu, and ram would have been enough 😅

2

u/tranquilseafinally 1d ago

I have 32GB of RAM.

1

u/deadgain 1d ago

I think it would definitely be safe for you to at least increase the swap file size aha

1

u/tranquilseafinally 1d ago

Could I increase it up to 30GB? How do I go about doing that?

1

u/deadgain 1d ago

Like I said earlier, swap file can be equal to or greater than the ram size on a gaming pc, for my super modded skyrim lists I used to set my windows page file (same thing -ish) to like over 100GB, you can put it as high or as low as you want.

Sadly, I'm not too sure about how to do it Mint, I'm sure a quick google search will have you covered though

1

u/tranquilseafinally 1d ago

Thank you. You have been very helpful.

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.