[1.1.42] Factorio makes XOrg freeze sometimes

Bugs that are actually features.
Post Reply
mrvn
Smart Inserter
Smart Inserter
Posts: 5709
Joined: Mon Sep 05, 2016 9:10 am
Contact:

[1.1.42] Factorio makes XOrg freeze sometimes

Post by mrvn »

I lately have factorio running a sandbox with the editor and time set to x64 a lot. Meanwhile I alt-tab to firefox and start writing a forum post and use gimp to make screenshots or other things. Suddenly firefox won't accept any inputs anymore. I can still move the mouse but can't click any buttons or enter any text. Can change focus with the mouse or alt-tab. Only thing that works is killing XOrg. Killing factorio or firefox has no effect, the screen doesn't update at all. Only the mouse pointer still moves.

I'm fairly certain it's not a hardware problem since the mouse still works and switching to the text console and killing XOrg works. I only ever had this happen with factorio running at an accelerated speed. It only happened after I updated from 1.1.38 but that might just be because I didn't use the editor to accelerate time. I think it has never happened with factorio in the foreground but I'm not 100% certain.

After killing XOrg factorio either dies on it's own (previous) or I have to kill it (current). First time factorio survived killing XOrg, all other times it died on it's own.
0.000 2021-10-27 00:47:01; Factorio 1.1.42 (build 59009, linux64, full)
0.032 Operating system: Linux (Debian 10)
0.032 Program arguments: "bin/x64/factorio"
0.032 Read data path: /home/mrvn/factorio/factorio-1.1.38/data
0.032 Write data path: /home/mrvn/factorio/factorio-1.1.38 [540797/1558132MB]
0.032 Binaries path: /home/mrvn/factorio/factorio-1.1.38/bin
0.042 System info: [CPU: AMD Ryzen 5 2400G with Radeon Vega Graphics, 8 cores, RAM: 63331 MB]
0.042 Environment: DISPLAY=:0.0 WAYLAND_DISPLAY=<unset> DESKTOP_SESSION=lightdm-xsession XDG_SESSION_DESKTOP=lightdm-xsession XDG_CURRENT_DESKTOP=XFCE __GL_FSAA_MODE=<unset> __GL_LOG_MAX_ANISO=<unset> __GL_SYNC_TO_VBLANK=<unset> __GL_SORT_FBCONFIGS=<unset> __GL_YIELD=<unset>
0.042 Display options: [FullScreen: 1] [VSync: 1] [UIScale: automatic (100.0%)] [Native DPI: 1] [Screen: 255] [Special: lmw] [Lang: en]
0.149 Available displays: 1
0.149 [0]: PA248 26" - {[0,0], 1920x1200, SDL_PIXELFORMAT_RGB888, 60Hz}
0.186 Initialised OpenGL:[0] AMD RAVEN (DRM 3.37.0, 5.7.0-0.bpo.2-amd64, LLVM 7.0.1); driver: 4.5 (Core Profile) Mesa 18.3.6
0.186 [Extensions] s3tc:yes; KHR_debug:yes; ARB_clear_texture:yes, ARB_copy_image:yes
0.186 [Version] 4.5
0.186 Graphics settings preset: medium-with-low-vram
0.186 Dedicated video memory size 1024 MB
0.202 Graphics options: [Graphics quality: normal] [Video memory usage: high] [DXT: low-quality] [Color: 32bit]
0.202 [Max threads (load/render): 32/8] [Max texture size: 4096] [Tex.Stream.: 1] [Rotation quality: low] [Other: sTDCwt] [B:0,C:0,S:100]
0.466 [Audio] Backend:default; Depth:16, Channel:2, Frequency:44100; MixerQuality:linear
Attachments
factorio-current.log
(74.76 KiB) Downloaded 80 times
factorio-previous.log
(74.69 KiB) Downloaded 89 times

Oxyd
Former Staff
Former Staff
Posts: 1428
Joined: Thu May 07, 2015 8:42 am
Contact:

Re: [1.1.42] Factorio makes XOrg freeze sometimes

Post by Oxyd »

Well X.org has no business freezing no matter what Factorio – or any other program – does. I'd blame the AMD driver, especially since Googling “linux amd freeze” returns a bunch of results describing an issue similar to yours.

Does dmesg or journalctl contain anything interesting?

mrvn
Smart Inserter
Smart Inserter
Posts: 5709
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [1.1.42] Factorio makes XOrg freeze sometimes

Post by mrvn »

Ahh, sorry, didn't check the kernel messages, only the X logs. There is indeed something in dmesg:

[Wed Oct 27 00:44:02 2021] [drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* amdgpu_vm_validate_pt_bos() failed.
[Wed Oct 27 00:44:02 2021] [drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* Not enough memory for command submission!
[Wed Oct 27 00:44:31 2021] [TTM] Failed to find memory space for buffer 0x0000000083ebca0b eviction
[Wed Oct 27 00:44:31 2021] [TTM] No space for 0000000083ebca0b (256 pages, 1024K, 1M)
[Wed Oct 27 00:44:31 2021] [TTM] placement[0]=0x00060002 (1)
[Wed Oct 27 00:44:31 2021] [TTM] has_type: 1
[Wed Oct 27 00:44:31 2021] [TTM] use_type: 1
[Wed Oct 27 00:44:31 2021] [TTM] flags: 0x0000000A
[Wed Oct 27 00:44:31 2021] [TTM] gpu_offset: 0x00000000
[Wed Oct 27 00:44:31 2021] [TTM] size: 786432
[Wed Oct 27 00:44:31 2021] [TTM] available_caching: 0x00070000
[Wed Oct 27 00:44:31 2021] [TTM] default_caching: 0x00010000
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000400-0x0000000000000401: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000401-0x0000000000000443: 66: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000443-0x0000000000000445: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000445-0x0000000000000447: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000447-0x0000000000000449: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000449-0x000000000000044b: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000044b-0x000000000000044d: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000044d-0x000000000000044f: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000044f-0x0000000000000451: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000451-0x0000000000000453: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000453-0x0000000000000455: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000455-0x0000000000000456: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000456-0x0000000000000556: 256: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000556-0x0000000000000557: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000557-0x0000000000000558: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000558-0x0000000000000559: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000559-0x000000000000055a: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000055a-0x000000000000055b: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000055b-0x000000000000055c: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000055c-0x000000000000055d: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000055d-0x000000000000055e: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000055e-0x0000000000000560: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000560-0x0000000000000561: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000561-0x0000000000000562: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000562-0x0000000000000563: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000563-0x0000000000000565: 2: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000565-0x0000000000000665: 256: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000665-0x000000000000075c: 247: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000075c-0x000000000000075d: 1: free
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000075d-0x000000000000075e: 1: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x000000000000075e-0x0000000000000800: 162: free
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000800-0x0000000000000900: 256: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000900-0x0000000000000cca: 970: used
[Wed Oct 27 00:44:31 2021] [TTM] 0x0000000000000cca-0x0000000000040000: 258870: free
[Wed Oct 27 00:44:31 2021] [TTM] total: 261120, used 2087 free 259033
[Wed Oct 27 00:44:31 2021] [TTM] man size:786432 pages, gtt available:179 pages, usage:3071MB
[Wed Oct 27 00:44:31 2021] [drm:amdgpu_cs_ioctl [amdgpu]] *ERROR* Not enough memory for command submission!

The system has 64GB ram and the map had just a handful of chunks with some centrifuges. Nothing that would stress the memory. It's not even a game with tons of mods that has huge altas sizes.

Did you change anything recently that might allocate and leak GPU resources so it slowly eats away at the command buffers?
I'm not sure I'm reading the output right. But I think it is telling me it doesn't have space for 256 pages when it has 258870 pages (1GB) free in that last chunk.

Any idea what it means or is that just the amd driver going bananas?

Post Reply

Return to “Not a bug”