Created attachment 138545 [details] KSysGuard image of High CPU usage SUMMARY High CPU usage by plasmashell and firefox everytime and kscreenlocker joins these two CPU hogs occasionally when switching user in KDE Plasma with NVIDIA drivers. STEPS TO REPRODUCE 1. Login to first user. 2. Switch user to another user. 3. Open KSysGuard or Plasma System Monitor and see plasmashell, firefox and sometimes kscreenlocker from the first user hogging up 25-80% of CPU and sometimes even cause memory leak. OBSERVED RESULT This issue was there ever since Plasma 5.19 for me, where plasmashell or sddm-greeter or kscreenlocker would continuously use 25% CPU (any one at a time) but it got (or at least it seemed to have been) resolved in 5.20 and upto 5.21.3 (or 4) I didnt have this issue. But since 5.21.5 I have this issue again. Whenever I switch user, plasmashell and firefox from first user always uses 25-80% of CPU for no reason at all. Also when the other user session is used for long periods, like for 30 minutes - 1 hour, there is a huge memory leak and plasmashell gobbles up all 16 GB of RAM causing my entire system to freeze. Another problem is that when I logout from the second user account and return to first user account, kwin crashes everytime which causes the compositing to be disabled and plasmashell crashed 1 time. All these issues make using Plasma unbearable and these issues need to be fixed. I decided to test the switching user with intel graphics using nvidia-prime and there was no issue like this. So I am also sending a bug report to linux-bugs@nvidia.com so that they can fix this if this bug is not from Plasma side. EXPECTED RESULT Switching user should not result in high CPU usage or memory leak from the inactive user causing Plasma to freeze and stutter. Returning back to the first user account should not cause any crash to Plasmashell or KWin. SOFTWARE/OS VERSIONS Linux: Linux-Zen 5.12.4 KDE Plasma Version: 5.21.5 (and also tested in 5.21.90) KDE Frameworks Version: 5.82.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION GPU: NVIDIA GeForce GTX 1060 6GB Proprietary Driver 465.27
To add to this issue, I did a fresh install of Arch and installed Plasma 5.22.2 which didn't have this switch user issue. I thought maybe the reinstall fixed this issue. But when I updated to 5.22.3, I got this issue again. So it became clear that a fresh install of Plasma in arch doesn't cause this issue but whenever I updated plasma (like with point releases or huge feature updates), this issue would start occurring.
This seems to have been solved since 5.22.5 (currently in 5.23.1 and no memory leak or CPU usage spike issues until now). So, I am going to close this bug report as resolved and will re-open it, if this issue returns.