Plasma 5 just kind of breaks? X11 session seems to quit

Ok so, let me see if I can explain this well enough. I don’t know what causes it, just seems to happen somewhat randomly after the machine sits idle for a while.

Symptoms:
Screen will unlock and seem to have worked properly, but there is no ability to start any processes. Programs won’t start from latte, hotkeys, the application menu, krunner… processes just can’t be started for some reason. If you lock the screen and try to unlock it again, the kscreenlocker is broken screen comes up. The recovery steps listed will get me back into an unlocked session, but processes still cannot be started. I can log in to a new tty with the same account and that session will be fine. I can restart sddm or reboot from there. Other than that everything seems to work just fine.

I am running a nomachine server and for some reason the server process needs to be restarted manually after starting a plasma session. Not saying this is related, but it may be relevant that I’m running nomachine. Also not saying that is the cause, because it seems to be a more significant problem based upon things I see in journalctl.

That brings me to the next part of this post…
Journalctl: (just some things that look interesting / relevant)

kwin_x11[1298]: kwin_core: XCB error: 152 (BadDamage), sequence: 49480, resource id: 17089051, major code: 143 (DAMAGE), minor code: 3 (Subtract)

systemd[1]: Cannot find unit for notify message of PID 88577, ignoring. [I do not know what PID 88577 was, looking at the logs after rebooting]

plasmashell[1440]: Could not find the Plasmoid for Plasma::FrameSvgItem(0x56518f725d90) QQmlContext(0x56518ee3e380) [Something about gloabls.qml]

usb 1-5.4: device not accepting address 15, error -71 [Possibly a problem caused by a garbage USB hub?]

kiod5[218144]: The X11 connection broke (error 1). Did the X11 server die?

kaccess[2425]: The X11 connection broke: I/O error (code 1)
sddm[939]: Auth: sddm-helper exited with 1
sddm[939]: Authentication error: SDDM::Auth::ERROR_INTERNAL “Process crashed”
sddm[939]: Auth: sddm-helper (–socket /tmp/sddm-auth-77fcf03b-1f33-4da1-a6df-a5e3de5c485a --id 1 --start /usr/bin/startplasma-x11 --user ben) crashed (exit code 1)
sddm[939]: Authentication error: SDDM::Auth::ERROR_INTERNAL “Process crashed”

wireplumber[1557]: WpPortalPermissionStorePlugin:0x5652e45f5670 Failed to call Lookup: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for camera [Camera is plugged into the USB hub that I could see being questionable]

kwin_x11[1299]: kwin_core: XCB error: 152 (BadDamage), sequence: 31848, resource id: 17741835, major code: 143 (DAMAGE), minor code: 3 (Subtract)

systemd-coredump[497015]: [🡕] Process 497010 (kioslave5) of user 1000 dumped core.

kioslave5[497010]: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

kioslave5[497010]: qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.

kioslave5[497010]: qt.qpa.xcb: could not connect to display :0

It seems like there’ some kind of problem with my system. I’m running Manjaro and I’ve tried looking for solutions there but really haven’t found anything useful. Hopefully going to the folks who best understand how Plasma is supposed to work can help me narrow down what’s wrong so it can be fixed.

I’d start with looking at the crash of SDDM. See Guidelines and HOWTOs/Debugging/How to create useful crash reports - KDE Community Wiki for more info.

Based on the symptoms, maybe you’re running out of open file handles?

How would I remedy that?

Current values:

Nothing specific, but processes randomly behaving strangely after some time and eventually crashing sounds to me like maybe some kind of memory corruption thing. Given the wide surface area, I wonder if there’s perhaps a mismatch of shared libraries that Plasma/Xorg/whatever was built against vs. what you currently have installed. Total crapshoot though, might as well be any other bug or behavior.