This is the exact same issue as this post from a month ago, but I don't have an account with enough reputation, the post seems to have died, and I have more info to add.
This bug happened for the first time after 3 weeks of installing Kubuntu 22.04 in January 22.04. Hardware is a Lenovo P1 Gen 2, 32Gb ram, 1TB SSD, i7-9850H. Afterwards, it happened more frequently to the point it happens daily. It makes working impossible and frustrating. I did a fresh clean install on plain Ubuntu with GNOME and added the KDE desktop environment on top, and the issue persisted immediately. Both times the hard drive was encrypted, but I don't think that's a factor here.
The freeze is actually the plasmashell crashing. It often (but not always) happens when moving between virtual desktops, with a random, small chance of happening. It's reproducible in the sense that it'll happen over the course of 48 hours if used enough.
If it happens between a virtual desktop switch, you're dead in the water. The mouse moves, so the kernel is responsive, but you cannot switch to tty2 - tty8 at all. Nothing works. No keys or shortcuts to open terminals, no lid closing or logoff techniques, nothing. It is frozen and spare a REISUB or pulling the plug, the screen is frozen forever. Background task work as they are without change.
If by chance it happens not during a desktop switch (usually shortly after one in this instance), the active window is responsive, but you cannot switch desktops, to other windows (on the same desktop or others), nothing. You can maybe open a terminal with a shortcut, but cannot move or use the settings/buttons on the top of it. Spare the exit command, there is no way to close the terminal. But not all is lost, since if you can get to a terminal in any way, one of the following two commands may fix it (most times, but only if you can get to a terminal)
plasma_session
plasmashell --replace &
This often leaves a terminal open that cannot be closed (even if you run with deamon it still fails to deamon the thread). Annoying, but manageable. Sometimes though a
systemctl restart sddm
is needed, logging you out and losing all progress. I've tried Kubuntu and KDE DE, on fresh installs with minimal installations and bloat. I do not have a NVIDEA driver. I have the kernel updated.
When this happens, the logs are often empty and devoid. I've worked with a linix admin/wiz (probably the most apt linux user I've met, and known in the entire company of 40k people when you have Unix issues, he's your guy) who had never seen such an issue before, thinks it's the KDE Plasma, and recommended to switch to xorg since it's older and more stable. The logs gave zero information to him other than the very likely possibility that it's a kernel issue. Only hints were that the plasma session crashed. I have some but need to clean them a bit before providing.
If anyone has an idea to this issue, I'd love advice. I hate GNOME, but KDE is unusable. I work 40h a week and am finishing my thesis, and cannot have daily crashes to boot. Can't give much system logs when it happens next since I've moved to XFCE for more stability. Hoping at the very least I add one more issue in this so the problem can be looked at. Had 20.04 for 2 years prior to this with zero issues.
I hope at least the commands to fix it can help some whenever they get in this situation.