Whole system freezes when playing Factorio

Hi there, I’ve recently installed the Os and have been playing Factorio for a while and after some time playing it my whole system simply frezees. I cant open the console to kill the game cant reboot from console, literally can’t do anything but hold down the power button till the pc shuts down.
I’ve tried some fixes that i found for similar problems both here and on the arch wiki, like:

  • Changing the kernel to LTS
  • Updating all drivers
  • Adding a swap file

I would also like to note that I previously had installed PopOs and never had this problem, and that my machine is dual booting EndeavourOs with Windows 11.

I really don’t know why this could be happening, I’d be very grateful if someone could help.

My guesses are that it has to do something with arch based distros or with Kde Plasma, but i don’t know, I’m not experienced in this environment.

Specs-
CPU- 8 × 11th Gen Intel® Core™ i7-1195G7 @ 2.90GHz
Memory- 15,4 GiB of RAM
Graphics- Mesa Intel® Xe Graphics
Kernel - 6.6.44-3-lts (64-bit)
The swap file is 4gb

I’d like to apologize for my English as it isn’t my native language.

Welcome @kpgm :wave: :sunglasses: :enos_flag:

Let’s get some details, to hopefully help diagnose possible causes. Each of these commands will generate a link that you can share here, so we can see the output.

First up, you might provide us with some detailed hardware information:

inxi -Fxxc0z | eos-sendlog

When the crash happens, immediately reboot and run this. It will output the last 100 lines of your system journal from your previous session (right up to the moment it crashed).

journalctl -b -1 | tail -n 100 | eos-sendlog

Hi, thanks for reaching out :).

Here is the link provided by the first command you recommended, as soon as there is a game crash I’ll update you with the other one.

I’d like to mention that while searching for more similar issues to mine, I’ve changed the kernel to zen (6.10.3-zen1-2-zen), and have run a memtest with all the outputs deemed as ok.

That was unfortunately rather quick.

So not even 10 minutes into my session ant the whole system froze, I reboot the machine and first thing ran the command you told me to, and it gave me this as output.
https://0x0.st/XWwN.txt

After reading this report a little bit at the end, I saw some complaints about Wayland, taking into account that Factorio supports it is not the game’s fault. So with this in mind I started the pc in X11 but (barely played yet) I can now notice some major screen tearing. Only after turning VSync on does it go away

Just something I’d like to point out.

Enabling VSync helps with screen tearing. Give it a try.

Sorry forgot to edit the comment and enter it I did, and it worked my only issue now (that the crashing and tearing is fixed) is to know why Wayland and is crashing and if there’s any way to fix the issue since Wayland is supposedly lighter on the system.

Thanks

Well, Factorio runs native on Linux, but maybe the Wayland implementation is not up to par. You could try to switch to a Proton version, maybe the Windows version runs better.

Il give it a try and will update on the outcome once again thanks for the help.

Ok this really seems like a Wayland bug with factorio I’ve been playing a little bit and got another crash, this was the output of the journal command.

https://0x0.st/XW6k.txt

It does look like Wayland is the culprit. It’s still pretty fresh on the scene, and it’s certainly not without its bugs. I’d suggest just giving it time.

The hard locks and forced resets can’t be healthy for your system. Each one of those risks more serious problems. Perhaps try again after a few months, once updates have progressed a bit more (I’m in the same boat with my workstation, as a Nvidia user).

Instead of hard resets you should set up REISUB, there is a guide on the forum if you have a search.

The same bug currently exists when playing World of Warcraft through proton (or other runners, tried several).
The whole system freezes after about an hour when using wayland but if you choose a X session in kde upon login instead it works just fine.

My System:
7800x3d
64GiB RAM
7900xt

Kernel: 6.10.X default arch kernel (not sure this was some weeks ago)
Open source amd drivers / mesa

I also spoke to a guy in the lutris discord who has the exact same problem with WoW.
He was using 6700xt on a different distro, different WM, different DE.

Does it work the same if you use prvious Proton version?

I tried GE-Proton9-11(Bottles), GE-Proton9-10(Bottles), GE-Proton8-26 (lutris), and Proton 9.0.2(Steam).
I did encounter the freeze on all of them when using wayland.

1 Like

I would just stick with X11 then unless you need Wayland for something

2 Likes

After checking some of the cases in this forum:

and this post, I can observe that:

  1. It’s a wayland issue.
  2. It happens with applications running on vulkan (or in a layer like proton on vulkan).
  3. It happens both on native and on apps running on proton/wine.
  4. For me, @Steath and @kpgm it has only happen while using mesa’s drivers.
  5. At least on my experience, Running on windowed doesn’t seem to cause the crash, only on fullscreen.

For me, the moments that had lead to a Freezz were always after I alt-tab on fullscreen after playing for a while, examples are:
A. Running a game on proton.
B. Running a Xwayland application like duckstation or ppsspp and booting a game on vulkan render.
C. Running a Native Vulkan Game.

If I run duck or ppsspp on openGL render I never encounter this crash, neither if I play on x11.

inxi -Fxxc0z:

System:
  Kernel: 6.10.10-arch1-1 arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
  Desktop: KDE Plasma v: 6.1.5 tk: Qt v: N/A wm: kwin_wayland dm: SDDM
    Distro: EndeavourOS base: Arch Linux
Machine:
  Type: Desktop System: Gigabyte product: B450M DS3H v: N/A
    serial: <superuser required>
  Mobo: Gigabyte model: B450M DS3H-CF serial: <superuser required>
    UEFI: American Megatrends LLC. v: F67b date: 07/11/2024
CPU:
  Info: 6-core model: AMD Ryzen 5 5600 bits: 64 type: MT MCP arch: Zen 3+
    rev: 2 cache: L1: 384 KiB L2: 3 MiB L3: 32 MiB
  Speed (MHz): avg: 2918 high: 3600 min/max: 2200/4467 boost: enabled cores:
    1: 2876 2: 2879 3: 2879 4: 3562 5: 2918 6: 2200 7: 2200 8: 2878 9: 3247
    10: 3600 11: 2883 12: 2903 bogomips: 84033
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Navi 23 [Radeon RX 6600/6600 XT/6600M] vendor: XFX
    driver: amdgpu v: kernel arch: RDNA-2 pcie: speed: 16 GT/s lanes: 16 ports:
    active: DP-2 empty: DP-1, DP-3, HDMI-A-1, Writeback-1 bus-ID: 09:00.0
    chip-ID: 1002:73ff
  Display: wayland server: X.org v: 1.21.1.13 with: Xwayland v: 24.1.2
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu display-ID: 0
  Monitor-1: DP-2 res: 1920x1080 size: N/A
  API: EGL v: 1.5 platforms: device: 0 drv: radeonsi device: 1 drv: swrast
    gbm: drv: kms_swrast surfaceless: drv: radeonsi wayland: drv: radeonsi x11:
    drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.2.2-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 6600 (radeonsi navi23
    LLVM 18.1.8 DRM 3.57 6.10.10-arch1-1) device-ID: 1002:73ff
    display-ID: :1.0
  API: Vulkan v: 1.3.295 surfaces: xcb,xlib,wayland device: 0
    type: discrete-gpu driver: mesa radv device-ID: 1002:73ff
Audio:
  Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel pcie:
    speed: 16 GT/s lanes: 16 bus-ID: 09:00.1 chip-ID: 1002:ab28
  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
  API: ALSA v: k6.10.10-arch1-1 status: kernel-api
  Server-1: PipeWire v: 1.2.3 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Gigabyte driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1
    port: f000 bus-ID: 05:00.0 chip-ID: 10ec:8168
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: ztyqbzb64o state: unknown speed: 10000 Mbps duplex: full
    mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 1.1
    speed: 12 Mb/s lanes: 1 bus-ID: 1-2:2 chip-ID: 0bda:8771
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 5.1
    lmp-v: 10
Drives:
  Local Storage: total: 2.26 TiB used: 1.62 TiB (71.7%)
  ID-1: /dev/nvme0n1 vendor: Crucial model: CT1000P3SSD8 size: 931.51 GiB
    speed: 31.6 Gb/s lanes: 4 serial: <filter> temp: 35.9 C
  ID-2: /dev/sda vendor: Kingston model: SA400S37480G size: 447.13 GiB
    speed: 6.0 Gb/s serial: <filter>
  ID-3: /dev/sdb vendor: Seagate model: ST1000DM010-2EP102 size: 931.51 GiB
    speed: 6.0 Gb/s serial: <filter>
Partition:
  ID-1: / size: 914.83 GiB used: 466.64 GiB (51.0%) fs: ext4
    dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: file size: 512 MiB used: 0 KiB (0.0%) priority: -2
    file: /swapfile
Sensors:
  System Temperatures: cpu: 37.0 C mobo: 31.0 C gpu: amdgpu temp: 39.0 C
    mem: 36.0 C
  Fan Speeds (rpm): N/A gpu: amdgpu fan: 0
Info:
  Memory: total: 16 GiB available: 15.55 GiB used: 3.57 GiB (23.0%)
  Processes: 314 Power: uptime: 16m wakeups: 0 Init: systemd v: 256
    default: graphical
  Packages: 1347 pm: pacman pkgs: 1327 pm: flatpak pkgs: 20 Compilers:
    clang: 18.1.8 gcc: 14.2.1 Shell: Bash v: 5.2.32 running-in: konsole
    inxi: 3.3.35

/etc/environment:

#
# This file is parsed by pam_env module
#
# Syntax: simple "KEY=VAL" pairs on separate lines
#
#QT_QPA_PLATFORMTHEME=qt5ct
#QT_STYLE_OVERRIDE=kvantum
BROWSER=firefox
EDITOR=nano

I posted an issue like this several months ago. Still happens actually. The only way I can play horizon zero dawn is windowed. When I make it full screen it freezes bout 20 seconds into the game. It plays fine with window the size of the screen. Something about full screen…

Have you tried running the game through gamescope and launching it in fullscreen with gamescope?

gamescope -f %command%

No. I don’t know what game scope is.