| Summary: | KWin huge memory usage after alt-tabbing for some time | ||
|---|---|---|---|
| Product: | [Plasma] kwin | Reporter: | Eduardo <edzis> |
| Component: | tabbox | Assignee: | KWin default assignee <kwin-bugs-null> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | edzis, kde, nate |
| Priority: | NOR | ||
| Version First Reported In: | 5.26.3 | ||
| Target Milestone: | --- | ||
| Platform: | Manjaro | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
kwin alt-tab + memory ussage video
alt-tab automation script |
||
Created attachment 154168 [details]
alt-tab automation script
If I can - I'd suggest changing the importance/priority a bit higher, as this will cause system to run out of memory sooner rather than later. It seems that this does not happen anymore, probably KDE Frameworks update fixed this. I have: Operating System: NixOS 23.05 KDE Plasma Version: 5.26.4 KDE Frameworks Version: 5.101.0 Qt Version: 5.15.7 Kernel Version: 6.1.1 (64-bit) Graphics Platform: X11 Processors: 16 × 12th Gen Intel® Core™ i7-1270P Memory: 31.0 GiB of RAM Graphics Processor: Mesa Intel® Graphics And the "Pxm mem" column in xrestop still grows every time I alt-tab. What versions are you on, Eduardo? My versions are as follows: --------------------------- Operating System: Manjaro Linux KDE Plasma Version: 5.26.4 KDE Frameworks Version: 5.101.0 Qt Version: 5.15.7 Kernel Version: 6.0.16-linux-mjasnik-bmq-20230101 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-8650U CPU @ 1.90GHz Memory: 31,2 GiB of RAM Graphics Processor: Mesa Intel® UHD Graphics 620 --------------------------- |
Created attachment 154167 [details] kwin alt-tab + memory ussage video SUMMARY KWin uses a LOT of memory when doing alt-tab for some time. This is what I have observed. I rarely restart the system and lately had to alt-tab quite a lot, then everything started to stutter a lot. Investigation showed that all memory was used up and almost all swap space too. Before investigation, I turned off swap. At that time checking out xrestop showed that kwin used 5GB of pixmaps (if I remember right), free -hw showed that "shared" was used for 15GB, after restarting kwin, all freed up, memory was back to normal, that is "shared" to 3.5GB and xrestop showed some 300MB pixmap usage. Since this is built-in graphics adapter, main memory is shared between system and gpu, this is why, I think, all memory went to "shared" portion and I was not able to detect this earlier. So, I wrote a script which did alt-tabbing for me, opened 25 kwrite windows and recorded a video which shows start of the alt-tabbing and the end of alt-tabbing. As you'll be able to see, memory increases A LOT, 300 times alt-tab increased used pixmap memory from 300MB to 3GB and "shared" portion of used memory from 3.7GB to 8.7GB. This is with modesetting driver, X11. Restarting kwin helps for a while. If you need more tests, please ask. I'll attach video and script to this report. Sorry for video quality but I can not upload larger video to bug report, anyhow, this should suffice. STEPS TO REPRODUCE 1. work as usual 2. alt-tab for a while 3. observe how memory gets used up OBSERVED RESULT Huge memory usage EXPECTED RESULT Normal memory usage SOFTWARE/OS VERSIONS Linux/KDE Plasma: Operating System: Manjaro Linux KDE Plasma Version: 5.26.3 KDE Frameworks Version: 5.100.0 Qt Version: 5.15.7 Kernel Version: 6.0.7-linux-mjasnik-pds-20221106 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 31,2 GiB of RAM Graphics Processor: Mesa Intel® HD Graphics 530 Manufacturer: Dell Inc. Product Name: XPS 15 9550 ADDITIONAL INFORMATION When using simple task switcher (without thumbnails), kwin eats memory at quite a lower pace. It appears that it eats memory proportionally how many window thumbnails are shown on alt-tab popup.