GUI crashes after starting games, GPU says not enough memory

So for some time now after starting War Thunder or Cities: Skylines the game runs for a short while (up to 2 minutes) and them my screen turns black, but audio continues. I can use Ctrl+Alt+F3 to go to terminal. If I go back to the GUI (Ctrl+Alt+F2 or Ctrl+Alt+F1, although I have to login again after that one) I usually get some more screen time, until the scenario repeats. If I close the game via terminal I can go back to the GUI as if nothing happened. All other programs keep on running.

Now, that doesn’t happen with Don’t Starve: Together, which is graphically less intensive. It also wasn’t happening before. It might’ve started after the last update but I didn’t notice since I was busy with midterms and hadn’t had the time to play.

A few weeks ago this wasn’t an issue and I could play both WT and C:S normally. I find it weird that it says not enough memory.
Could this be a hardware problem, and not a software one?

I use a Lenovo ThinkPad E14, with Ryzen 5 4500U and 16 GB of RAM. DE is Gnome. Kernel Linux 6.0.8-1-MANJARO x86_64.

Any help would be appreciated. Thank you for your time.

These jumped out to me in the system journal logs:

pro 05 20:40:57 user-20t6000rsc firefox[3175]: Couldn't map window 0x7f4304ad7fc0 as subsurface because its parent is not mapped.
pro 05 20:40:57 user-20t6000rsc kernel: amdgpu 0000:04:00.0: amdgpu: 00000000f7fe5aff pin failed
pro 05 20:40:57 user-20t6000rsc kernel: [drm:dm_plane_helper_prepare_fb [amdgpu]] *ERROR* Failed to pin framebuffer with error -12
pro 05 20:40:57 user-20t6000rsc gnome-shell[1682]: Failed to scan out client buffer: drmModeAtomicCommit: Nema dovoljno memorije
pro 05 20:40:57 user-20t6000rsc gnome-shell[1682]: Failed to post KMS update: drmModeAtomicCommit: Nema dovoljno memorije
pro 05 20:40:57 user-20t6000rsc kernel: amdgpu 0000:04:00.0: amdgpu: 00000000f0cf4b1d pin failed
pro 05 20:40:57 user-20t6000rsc kernel: [drm:dm_plane_helper_prepare_fb [amdgpu]] *ERROR* Failed to pin framebuffer with error -12
pro 05 20:40:57 user-20t6000rsc gnome-shell[1682]: Page flip discarded: drmModeAtomicCommit: Nema dovoljno memorije
pro 05 20:40:57 user-20t6000rsc gnome-shell[1682]: Failed to scan out client buffer: drmModeAtomicCommit: Nevaljani argument
pro 05 20:40:57 user-20t6000rsc gnome-shell[1682]: Failed to post KMS update: drmModeAtomicCommit: Nevaljani argument
pro 05 20:40:57 user-20t6000rsc gnome-shell[1682]: Page flip discarded: drmModeAtomicCommit: Nevaljani argument

Nema dovoljno memorije = Not enough memory.

Nevaljani argument = Invalid argument.

pro 05 20:41:20 user-20t6000rsc systemd-coredump[123188]: [🡕] Process 122687 (aces) of user 1000 dumped core.
                                                          
                                                          Module /home/user/.local/share/Steam/steamapps/common/War Thunder/linux64/aces with build-id 1a1000a33da373394942ef22f8f2059c04cfe261
                                                          Module /home/user/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so with build-id 6ac86a92a06512414fe84eef09b15c43bab99b3e
                                                          Module linux-vdso.so.1 with build-id 4c401cb13195aeea26415c88e112cbc06f615d11
                                                          Module libgpg-error.so.0 with build-id 470d76ceb1e53cb017f78c08936e9bafaeb4058b
                                                          Module liblz4.so.1 with build-id 84ea95d811dad359e94e100ebe6a746294ffe8a7
                                                          Module libgcrypt.so.20 with build-id 8bf3cb884124273640de797a3e77d86c98434ea4
                                                          Module libogg.so.0 with build-id ca0cae30a809f10db1f16e54a23b4e5ff7b2c54c
                                                          Module libvorbis.so.0 with build-id f4e086347f6c1a66eb73cfe13974a29bd39aabca
                                                          Module libopus.so.0 with build-id 35fafc4024675e9cfe57c7d50c3965eac6bac358
                                                          Module libFLAC.so.12 with build-id d09804bc783c1cad0b423b136a5260c0e8c62d40
                                                          Module libvorbisenc.so.2 with build-id 2b1ce7fcdcc925bc663ebe2c1c008c0dd96e5bd0
                                                          Module libasyncns.so.0 with build-id 01c1c4096a521b900216c5ce3f6bae6529324d74
                                                          Module libsystemd.so.0 with build-id 1c1489e575197ffbf417c79f926e572421f3692f
                                                          Module libsndfile.so.1 with build-id 923361ca7a51d29651ef1e282559cbff70e31cde
                                                          Module libdbus-1.so.3 with build-id 6d6e4846c8e56903b4fe7d992ae6bb30c8a20a9c
                                                          Module libpulsecommon-16.1.so with build-id bbc2ea99257d0013d10d1829bab2d762d56c9854
                                                          Module libpulse.so.0 with build-id 27ffa5ab84f98b1724cc7e9b1385d2f28ee557cc
                                                          Module libXfixes.so.3 with build-id 0a05c7e8714522bfbdd7c0027c3e2a94965664b0
                                                          Module libXcursor.so.1 with build-id f0525ae3715ac95f96a8cdb44795b03f831334b0
                                                          Module libXrender.so.1 with build-id 9d6512ea1c9698e8c81f27e89fda57d36eb4b18e
                                                          Module libXext.so.6 with build-id d7f3b1c9d5be6574b5faf83b74f8bba3d0dfa3c6
                                                          Module libXrandr.so with build-id 154e55f082ee9e685d0794c98c5b76ffe9c8868e
                                                          Module libicudata.so.72 with build-id a133b365160fc45e002163e5435f3029f4254cfa
                                                          Module libicuuc.so.72 with build-id c2e0249a038bd0fe76e681ecd2b73951c65a0866
                                                          Module liblzma.so.5 with build-id 8a7334fec02fef6a82ff641a68b3e3200a44a702
                                                          Module libxml2.so.2 with build-id 171e32069b76d4cfedbfdf97f2087807948a9b3d
                                                          Module libncursesw.so.6 with build-id b9917757481e6fa6097e2a1f31f5bb5eaf138c4e
                                                          Module libedit.so.0 with build-id 4b0babfcad161c2ad0af6e59e2493258db23a331
                                                          Module libLLVM-14.so with build-id 16d23f3ab6fb7269b2f13a9932a2a7ec4b1d5104
                                                          Module libffi.so.8 with build-id 5c6b22b6624dd486a0783dfe74fee085b626b573
                                                          Module libzstd.so.1 with build-id ab54c2881f53ab314e134f3e08c76d504376dd5d
                                                          Module libz.so.1 with build-id 5340199d53cb95e609028ce1143675c742ff4218
                                                          Module libnss_myhostname.so.2 with build-id 247f8b2a33d7a05abdc1ae21fa87476ebe501829
                                                          Module libnss_resolve.so.2 with build-id b4537867926f69db4f5a33943a3b155ce745023a
                                                          Module libnss_mdns4_minimal.so.2 with build-id a6fde528b667185a18aca5be61727fb369423647
                                                          Module libcap.so.2 with build-id 9b38b08de708f439a9d0a4f8b9914151bc8d4b50
                                                          Module libnss_mymachines.so.2 with build-id ace689f86a3cbd6f5adbb58c219f1b2ccea83bf4
                                                          Module UTF-32.so with build-id e5df458f2d81d469022d6b75454240505639e35d
                                                          Module libXdmcp.so.6 with build-id d864159ab0008415667db8d5f251696d75c90df2
                                                          Module libXau.so.6 with build-id d9d5e8277140f1a86d3a07d9b52b1703c0a2f9a8
                                                          Module libGLX.so.0 with build-id d2c37fb8ec3bc53c67c013b0c6ac63ec086c8883
                                                          Module libGLdispatch.so.0 with build-id 7879a881271650eff97c35aff7a8674859c5ae94
                                                          Module libxcb.so.1 with build-id 13d677412a71468381b11092915d231f664d18d3
                                                          Module libGL.so.1 with build-id 6f65953140bc8a2aba47c9d492658dc61891393e
                                                          Module ld-linux-x86-64.so.2 with build-id 22bd7a2c03d8cfc05ef7092bfae5932223189bc1
                                                          Module libc.so.6 with build-id 1e94beb079e278ac4f2c8bce1f53091548ea1584
                                                          Module libgcc_s.so.1 with build-id 85db482c4585a328d95ec41124337a967bb24d8f
                                                          Module libm.so.6 with build-id 2c8ff1d29b255da5b7371efd5caf57444d622838
                                                          Module libstdc++.so.6 with build-id 735a3d0cc7699fd69337361cba4aedb644b2a7ed
                                                          Module libX11.so.6 with build-id e07bf7192ed4ad0be11565ee9374cb43a96ada98
                                                          Module librt.so.1 with build-id ce8e0934f83057f038b5a06eb70082bef142d2f0
                                                          Module libdl.so.2 with build-id 414d1d630bc04818a150b9c73e4493f3395e8869
                                                          Module libresolv.so.2 with build-id 2e70cfe9f2972fb13487eeefcb10e4afafed6157
                                                          Module libpthread.so.0 with build-id 3954d7fd57fa4db438d0ccdd8e2c6f7cc97c2e46
                                                          Stack trace of thread 122687:
                                                          #0  0x00007f918c454c6d getenv (libc.so.6 + 0x3bc6d)
                                                          #1  0x00007f9178107cd9 pa_in_valgrind (libpulsecommon-16.1.so + 0x24cd9)
                                                          #2  0x00007f91796f502e n/a (libpulse.so.0 + 0xd02e)
                                                          #3  0x00007f918cb66aae n/a (ld-linux-x86-64.so.2 + 0x4aae)
                                                          #4  0x00007f918c453fa5 n/a (libc.so.6 + 0x3afa5)
                                                          #5  0x00007f918c454120 exit (libc.so.6 + 0x3b120)
                                                          #6  0x00000000017e5892 n/a (/home/user/.local/share/Steam/steamapps/common/War Thunder/linux64/aces + 0x13e5892)
                                                          #7  0x0000000000994301 n/a (/home/user/.local/share/Steam/steamapps/common/War Thunder/linux64/aces + 0x594301)
                                                          #8  0x00000000017f5bbd n/a (/home/user/.local/share/Steam/steamapps/common/War Thunder/linux64/aces + 0x13f5bbd)
                                                          #9  0x00000000019fb315 n/a (/home/user/.local/share/Steam/steamapps/common/War Thunder/linux64/aces + 0x15fb315)
                                                          #10 0x000000000099ed59 n/a (/home/user/.local/share/Steam/steamapps/common/War Thunder/linux64/aces + 0x59ed59)
                                                          #11 0x000000000041f0c4 n/a (/home/user/.local/share/Steam/steamapps/common/War Thunder/linux64/aces + 0x1f0c4)
                                                          #12 0x00007f918c43c290 n/a (libc.so.6 + 0x23290)
                                                          #13 0x00007f918c43c34a __libc_start_main (libc.so.6 + 0x2334a)
                                                          #14 0x00000000004b6c6a n/a (/home/user/.local/share/Steam/steamapps/common/War Thunder/linux64/aces + 0xb6c6a)
                                                          ELF object binary architecture: AMD x86-64
pro 05 20:41:20 user-20t6000rsc systemd[1]: systemd-coredump@8-123187-0.service: Deactivated successfully.
pro 05 20:41:20 user-20t6000rsc kernel: audit: type=1131 audit(1670269280.864:644): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=systemd-coredump@8-123187-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=?>
pro 05 20:41:20 user-20t6000rsc audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=unconfined msg='unit=systemd-coredump@8-123187-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=succes>
pro 05 20:41:20 user-20t6000rsc systemd[1]: systemd-coredump@8-123187-0.service: Consumed 7.544s CPU time.
pro 05 20:41:20 user-20t6000rsc audit: BPF prog-id=0 op=UNLOAD
pro 05 20:41:20 user-20t6000rsc audit: BPF prog-id=0 op=UNLOAD
pro 05 20:41:20 user-20t6000rsc audit: BPF prog-id=0 op=UNLOAD
pro 05 20:41:20 user-20t6000rsc kernel: audit: type=1334 audit(1670269280.984:645): prog-id=0 op=UNLOAD
pro 05 20:41:20 user-20t6000rsc kernel: audit: type=1334 audit(1670269280.984:646): prog-id=0 op=UNLOAD
pro 05 20:41:20 user-20t6000rsc kernel: audit: type=1334 audit(1670269280.984:647): prog-id=0 op=UNLOAD

Have you looked at the GPU thermals. The 4500 U uses AMD graphics. The fan control in AMD graphics can be a problem. When the gpu overheats it turns off the graphics, but the desktop continues to run. It may also overheat the cpu and cause all kinds of errors.

Nothing that really jumps out, at least with psensors. It spikes to about 60 to 70 °C when starting up and doesn’t have time to stabilise before the screen turns black. Constantly going back to the game keeps the spikes at around 50 to 60 °C.

You may want to try an application that controls the fan curve. I use radeon-profile-git and radeon-profile-daemon-git. They are in the AUR. Its easy to set the curve, and it can start in the tray. You can also try two apps the Arch wiki recommends for thinkpads. I hope this help.