Three Issues: Memory leakage, D state processes and zram0, X clients

I am currently dealing with two main issues and one smaller issue. I’ve dealt with two of these issues for years now and used to never run into them, so I’m very curious as to what’s going on; especially since most threads I find on these are very old and many seemed solved for others but not for me.

The small issue is that between my current PopOs installation and previous Ubuntu installation (Yes I am aware they are both Ubuntu), I’ve ran into a problem with eventually hitting a max number of X11 clients. It’s become less frequent on PopOs, but I’ve ran into it once just recently. Every time I search for this on the internet I get decade-old threads that seem to mention already fixed bugs. As I said, this has only happened once recently (in the last several months) but I used to deal with it frequently so it would be nice to know what’s going on with that.

As for the bigger problems that affect me more currently. The first is that with a virtual machine dedicated to machine learning applications, with 8GB of my RAM dedicated to it out of 32GB, 16GB swap, and using the liquorix kernel (I’m aware that this handles ram differently to boost responsiveness); with both my previous Ubuntu install and my current PopOs (though it handles it considerably better), my base RAM usage climbs and climbs until I eventually have 50% or so of total used even with all RAM-intensive processes closed. I’ve checked system memory monitors and see that this used up memory is largely unaccounted for, while help threads I’ve come across seemed to conclude that it’s something to do with a kernel process. I say PopOS handles this considerably better because my previous Ubuntu install would start hanging terribly if I went over 90% system memory usage.

My second large issue is something I’ve only run into while using PopOS. For full disclosure, I use XFCE4.16 on top of awesomewm, and I am aware that this invalidates most or many of the advantages of using PopOS in the first place. This is the one I’m the most clueless about. During normal system use, at some random point, I find that an application I want to use does not open (right at this moment, it’s rustdesk), I use htop to try to kill any current running instances of this application and find that htop itself hangs, then I find in another process monitor that htop is now in uninterruptible sleep. I eventually reboot my PC, and during the shutdown process my system is unable to unmount /dev/zram0 even after several minutes so I physically shut it down, which I think is related.

I run into these issues randomly, so I’m not sure what diagnostic data is particularly relevant to each one. I’ve looked through journalctl -xe before and hadn’t found anything that stood out to me as being related, so I also need help with using the right diagnostic applications to find the causes.

What I can do right now is give a basic run down of my system:

CPU: Ryzen 3700x (8/16)
MB: Asrock X470 Taichi Ultimate
GPU: RX 580 (main) hooked into 5 1080p monitors; RTX 3060 passed to a VM for machine learning
OS: Popos 22.04
RAM: 32GB
Kernel: 6.5.5-2-liquorix-amd64
DE/WM: XFCE 4.16/AwesomeWM
Other: 8GB of RAM allocated to VM, 16GB SWAP, swappiness 5

Quick update: My first (and only, really) idea for fixing/remedying these issues was abandoning the liquorix kernel for a manually patched ACSO kernel. I am currently on 6.3.0 and after a week of no issues I’m getting hopeful.