SUMMARY When I unlock the screen by typing password and hitting enter after locking the screen or suspending the computer, I observe significant increase in memory usage. This behavior does not happen all the time. it can happen randomly after several days of uptime. The interesting part is that I cannot see which application uses the memory. Even after logging out the KDE session, memory usage is just there. I could not debug this behavior and I hope to find some help from KDE devs. An example of memory usage history: * Before the lock or suspend, it is 10GB. * After the unlocking, 20GB. * After logging out, 10GB. I can be sure that it happens just after the unlock and displaying the desktop since I can feel the desktop getting sluggish for a second. One additional note, the lock screen turns off the screen to save power, after a couple seconds, the screen turns on again - I could not find a way to turn off my screen from KDE. STEPS TO REPRODUCE 1. Lock the screen 2. Unlock the screen OBSERVED RESULT The system memory usage spikes. EXPECTED RESULT The system memory should remain same SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: Gentoo, kde-plasma/plasma-meta-5.26.1::gentoo (available in About System) KDE Plasma Version: 5.26.1 KDE Frameworks Version: 5.99.0 Qt Version: 5.15.5 ADDITIONAL INFORMATION uname: Linux 6.0.2-gentoo-bwqr-x86_64 #2 SMP PREEMPT Wed Oct 19 22:04:33 +03 2022 x86_64 AMD Ryzen 5 5600X 6-Core Processor AuthenticAMD GNU/Linux gpu: amd rx 580 mesa: 22.2.1
Forgot to mention how I start the plasma, I run `dbus-run-session startplasma-wayland` in a tty console to start plasma.
What process is using all that memory? System Monitor or `top` will tell you.
That is the interesting part, nothing shows up in the top, htop or System Monitor. Neither running these tools as root or normal user changes anything. I also looked into slabtop, /proc/meminfo and dmesg and could not find a relevant information. Even though all tools display high memory usage, no process seems to consume that much memory. What else can I do to debug this?
So what's telling you that the total usage is high? Can you attach a screenshot of it?
When I encounter the same behavior, I will take screenshots and upload them. But I can say that `used` tab of the `free -h` command, `used mem` section of the `top` command and `mem` bar in the htop shows similar memory usages which is really high. All this observations are made in the tty console after exitting the plasma session. There are so few processes in the top or htop, and none of them uses that much memory. With high memory usage, I mean 10GB memory out of 32GB is used by something.
Created attachment 153116 [details] Memory usage after logging out plasma session Here is a screenshot of htop after logging out plasma session when this behavior occurs.
Created attachment 153117 [details] Memory usage before logging out plasma shell And memory usage in htop before logging out plasma shell when this behavior occurs.
Created attachment 153124 [details] More detailed memory usages Here is a more detailed capture of memory usages. I have combined multiple htop screens into one image. Image at the top is captured first and the image at the bottom is captured last. Here are the things I have done before taking the specific image, the numbers indicate the image. 1. Computer resumed from suspend. Instead of unlocking the screen locker, I switched to tty2 and started the htop. 2. I switched back to tty1 and unlocked the screen locker. Workspace 1 is visible now. 3. Switched to workspace 3. 4. Killed all the applications. 5. Logged out from the session. I also want to emphasize which application was running on which workspace, numbers indicates the workspace: 1. Firefox, chromium, evince 3. Thunderbird, rhythmbox
In the latest screenshot, your memory is mostly being used by by Thunderbird, Firefox, Evince, and Rhythmbox. Doesn't seem like there's a KDE bug there. In the one that shows multiple plasmashell processes open, each one is using a normal-ish amount of memory; the bug is that you have more than one running? How did that happen? Are you running `dbus-run-session startplasma-wayland` multiple times without killing the old sessions? When you do things manually, you become responsible for this sort of thing.
(In reply to Nate Graham from comment #9) > In the latest screenshot, your memory is mostly being used by by > Thunderbird, Firefox, Evince, and Rhythmbox. Doesn't seem like there's a KDE > bug there. I also started to think like this. The only thing related to KDE is that this behavior is triggered when screen gets locked in plasma shell. I am normally using sway and this behavior did not happen for once, the reason may be that I do not use any screen locker while using sway. > In the one that shows multiple plasmashell processes open, each one is using > a normal-ish amount of memory; the bug is that you have more than one > running? How did that happen? Are you running `dbus-run-session > startplasma-wayland` multiple times without killing the old sessions? When > you do things manually, you become responsible for this sort of thing. Actually it is not running multiple times. Each image in the combined one, which contains 5 different images, just shows the htop taken at different times, not different scrolls of same htop. I will try another distro to check if this behavior occur in order to identify that issue is related to gentoo or not. It may be a bug in gtk wayland. I am going to close this bug. If you can guide me, I will appreciate it. Thanks for your time anyway.
https://bugsfiles.kde.org/attachment.cgi?id=153117 does show multiple plasmashell instances.
(In reply to Nate Graham from comment #11) > https://bugsfiles.kde.org/attachment.cgi?id=153117 does show multiple > plasmashell instances. Ooh, you were referencing this attachment. Well, they are just threads of plasmashell. Purplish rows indicate the threads. White ones indicate the process itself.
Oops, thanks!