Entire laptop freezes when running modded Terraria

I have been trying to play modded Terraria with the Calamity mod. When loading a Journey-Mode world on either Expert-Revengence or Master-Revengence difficulty, I am able to play the game normally, but after a while, my entire laptop will freeze in such a way that I need to force restart my computer if I’m not fast enough to run xkill. Exiting and rejoining the world (without rebooting the game) appears to reset this countdown. My Journey Character’s Settings are normal for the most part, though I have Infection Spread set to Disabled. Interestingly, it’s been taking less time for the freeze to happen the more I’ve progressed in the game- Initially it took 45-60 minutes but more recently it takes 30-40 minutes. I’ve already played around with disabling and enabling my mods, and this problem only happens once I have the Calamity mod (plus its dependencies) enabled.

I’ve tried going to the official forums for both the Calamity mod and tModLoader, and no one there is sure of what’s going on as the game’s logs never indicate a freeze/crash happening. After doing some digging around of my own, I suspect the mod is setting off some sort of driver/kernel bug that is causing a kernel panic as my kernel logs (below) seem to indicate a problem that it can’t resolve on its own. I’m pretty certain this isn’t a memory leak issue though as running free -h doesn’t show improper memory allocation (that I’ve noticed). And I doubt this is a performance issue (at least in the usual sense) as my game runs perfectly fine up until the freeze.

Log File 1 (Had to reboot)

Nov 23 15:52:45 fedora kernel: ahci 0000:00:0e.0: probe with driver ahci failed with error -12
Nov 23 15:52:49 fedora kernel: ucsi_acpi USBC000:00: unknown error 0
Nov 23 15:52:49 fedora kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-5)
Nov 23 22:50:03 fedora kernel: spd5118 16-0050: Failed to write b = 0: -6
Nov 23 22:50:03 fedora kernel: spd5118 16-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 23 22:50:03 fedora kernel: spd5118 16-0050: PM: failed to resume async: error -6
Nov 23 22:50:03 fedora kernel: spd5118 16-0052: Failed to write b = 0: -6
Nov 23 22:50:03 fedora kernel: spd5118 16-0052: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 23 22:50:03 fedora kernel: spd5118 16-0052: PM: failed to resume async: error -6
Nov 24 08:48:12 fedora kernel: spd5118 16-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 08:48:12 fedora kernel: spd5118 16-0050: PM: failed to resume async: error -6
Nov 24 08:48:12 fedora kernel: spd5118 16-0052: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 08:48:12 fedora kernel: spd5118 16-0052: PM: failed to resume async: error -6
Nov 24 09:26:22 fedora kernel: spd5118 16-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 09:26:22 fedora kernel: spd5118 16-0050: PM: failed to resume async: error -6
Nov 24 09:26:22 fedora kernel: spd5118 16-0052: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 09:26:22 fedora kernel: spd5118 16-0052: PM: failed to resume async: error -6
Nov 24 09:26:22 fedora kernel: ucsi_acpi USBC000:00: unknown error 0
Nov 24 09:26:22 fedora kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-5)
Nov 24 12:02:58 fedora kernel: spd5118 16-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 12:02:58 fedora kernel: spd5118 16-0050: PM: failed to resume async: error -6
Nov 24 12:02:58 fedora kernel: spd5118 16-0052: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 12:02:58 fedora kernel: spd5118 16-0052: PM: failed to resume async: error -6
Nov 24 12:59:21 fedora kernel: spd5118 16-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 12:59:21 fedora kernel: spd5118 16-0050: PM: failed to resume async: error -6
Nov 24 12:59:21 fedora kernel: spd5118 16-0052: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 12:59:21 fedora kernel: spd5118 16-0052: PM: failed to resume async: error -6
Nov 24 13:53:52 fedora kernel: spd5118 16-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 13:53:52 fedora kernel: spd5118 16-0050: PM: failed to resume async: error -6
Nov 24 13:53:52 fedora kernel: spd5118 16-0052: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 13:53:52 fedora kernel: spd5118 16-0052: PM: failed to resume async: error -6
Nov 24 14:01:25 fedora kernel: spd5118 16-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 14:01:25 fedora kernel: spd5118 16-0050: PM: failed to resume async: error -6
Nov 24 14:01:25 fedora kernel: spd5118 16-0052: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 14:01:25 fedora kernel: spd5118 16-0052: PM: failed to resume async: error -6
Nov 24 15:14:58 fedora kernel: spd5118 16-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 15:14:58 fedora kernel: spd5118 16-0050: PM: failed to resume async: error -6
Nov 24 15:14:58 fedora kernel: spd5118 16-0052: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 15:14:58 fedora kernel: spd5118 16-0052: PM: failed to resume async: error -6
Nov 24 16:23:19 fedora kernel: spd5118 16-0050: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 16:23:19 fedora kernel: spd5118 16-0050: PM: failed to resume async: error -6
Nov 24 16:23:19 fedora kernel: spd5118 16-0052: PM: dpm_run_callback(): spd5118_resume [spd5118] returns -6
Nov 24 16:23:19 fedora kernel: spd5118 16-0052: PM: failed to resume async: error -6
Nov 24 16:23:20 fedora kernel: ucsi_acpi USBC000:00: unknown error 0
Nov 24 16:23:20 fedora kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-5)
Nov 24 22:17:58 2605-4A80-F001-9090-0-0-6B9B-2F6E-dynamic.midco.net kernel: i915 0000:00:02.0: [drm] ERROR GT0: GUC: Engine reset failed on 0:0 (rcs0) because 0x00000000
Nov 24 22:17:58 2605-4A80-F001-9090-0-0-6B9B-2F6E-dynamic.midco.net kernel: i915 0000:00:02.0: [drm] ERROR GT0: rcs0 reset request timed out: {request: 00000001, RESET_CTL: 00000001}
Nov 24 22:17:58 2605-4A80-F001-9090-0-0-6B9B-2F6E-dynamic.midco.net kernel: i915 0000:00:02.0: [drm] ERROR GT0: rcs0 reset request timed out: {request: 00000001, RESET_CTL: 00000001}
Nov 24 22:20:57 2605-4A80-F001-9090-0-0-6B9B-2F6E-dynamic.midco.net kernel: i915 0000:00:02.0: [drm] ERROR GT0: GUC: Engine reset failed on 0:0 (rcs0) because 0x00000000
Nov 24 22:20:57 2605-4A80-F001-9090-0-0-6B9B-2F6E-dynamic.midco.net kernel: i915 0000:00:02.0: [drm] ERROR GT0: rcs0 reset request timed out: {request: 00000001, RESET_CTL: 00000001}
Nov 24 22:20:57 2605-4A80-F001-9090-0-0-6B9B-2F6E-dynamic.midco.net kernel: i915 0000:00:02.0: [drm] ERROR GT0: rcs0 reset request timed out: {request: 00000001, RESET_CTL: 00000001}

Log File 2 (Managed to kill the software)

Nov 27 14:26:19 fedora kernel: ahci 0000:00:0e.0: probe with driver ahci failed with error -12
Nov 27 20:26:24 fedora kernel: ucsi_acpi USBC000:00: unknown error 0
Nov 27 20:26:24 fedora kernel: ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-5)
Nov 27 21:31:33 2605-4A80-F001-9090-0-0-6B9B-2F6E-dynamic.midco.net kernel: i915 0000:00:02.0: [drm] ERROR GT0: GUC: Engine reset failed on 0:0 (rcs0) because 0x00000000
Nov 27 21:31:33 2605-4A80-F001-9090-0-0-6B9B-2F6E-dynamic.midco.net kernel: i915 0000:00:02.0: [drm] ERROR GT0: rcs0 reset request timed out: {request: 00000001, RESET_CTL: 00000001}
Nov 27 21:31:33 2605-4A80-F001-9090-0-0-6B9B-2F6E-dynamic.midco.net kernel: i915 0000:00:02.0: [drm] ERROR GT0: rcs0 reset request timed out: {request: 00000001, RESET_CTL: 00000001}
Nov 27 21:32:44 2605-4A80-F001-9090-0-0-6B9B-2F6E-dynamic.midco.net kernel: Out of memory: Killed process 9100 (steamwebhelper) total-vm:53980840kB, anon-rss:36324kB, file-rss:1416kB, shmem-rss:484kB, UID:1000 pgtables:2156kB oom_score_adj:300

I’m running Fedora 43 on a Dell XPS 15 laptop and all of my software is up to date. I’ve also consistently launched the game directly through Steam via “Steam Linux Runtime 3.0 (Sniper)”. Lastly, if this is relevant, I was running Fedora 40 when I grabbed “Log File 1” (I had been procrastinating updating my OS) and Fedora 43 when I grabbed “Log File 2”. If anyone has any suggestions to help me precisely diagnose what the problem is or to fix this issue entirely, I’d really appreciate it. Thanks!

The very last line in the most recent log shows a Kernel: Out of memory: where it killed steamwebhelper. The OOM killer appears to be doing what is intended.

The lines before seem to indicate errors with the i915 driver (intel graphics). It is quite possible that you are running out of graphics memory or that you are running out of system memory overall.

I’m having issues with OOM on proton too. I wonder if i915 has a memory allocation issue. Is your CPU Lunar Lake

Does the OOM error still count if the game was killed because I manually shut it down? Also, if this is a valid OOM error, is there a reason the first log doesn’t indicate this?

I don’t think so. I just ran lscpu to check, and there was no mention of that name.

Which processor do you have?

I did some reading last night and my specific issue seems to be that my iGPU shares memory with the CPU and causes OOM issues because the drivers aren’t great at it yet. My issue might be different than yours though.

Relevant info is below:

CPU/Processor Information

Model name: 13th Gen Intel(R) Core™ i9-13900H
CPU family: 6
Model: 186
Thread(s) per core: 2
Core(s) per socket: 14
Socket(s): 1
Stepping: 2

Also, my laptop has 31 GB of RAM according to my output of free -h.

Looks like your CPU does use shared memory. I wonder if disabling the iGPU would alleviate your issues. I have seen people in other threads across the web say that it helped.

Is it safe to do something like that? I don’t usually mess with my hardware settings as I’m not knowledgeable in that area.

I am unfortunately a bit too novice to give you a solid answer to that. I wish I was experienced enough to give a good answer; sorry :confused:

I can say that there are many good topics on that matter though. I have my iGPU disabled in Windows because it’s easy to do there.

I can’t find a clear way to try to disable my iGPU. Most online resources and forums posts expect me to have Windows installed, which I do not and I’m not in a position right now where I can freshly install Windows. I’ve heard this can also be done in Dell BIOS startup menu, but I wasn’t able to find any options related to the iGPU in that menu.