https://bugs.kde.org/show_bug.cgi?id=370003
Bug ID: 370003 Summary: Performance issues (laggy animations, stuttering keyboard input handling, severe frame drops in videos) after using plasmashell for a few days Product: plasmashell Version: 5.7.5 Platform: Archlinux Packages OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: k...@davidedmundson.co.uk Reporter: r...@robwu.nl CC: bhus...@gmail.com, plasma-b...@kde.org Created attachment 101421 --> https://bugs.kde.org/attachment.cgi?id=101421&action=edit perf record -e cpu-clock -p `pidof plasmashell` -o perf2.data # switch between desktops a couple of times and ^C For many months I have experienced performance issues: - Obvious animation lags, e.g. switching between desktops, or hiding/restoring windows - Keyboard input handling seems to stutter, e.g. typing in the terminal or browser is not smooth: If I hold a key pressed, instead of showing a steady stream of characters, the input seems to stutter. - Videos are shown with multiple framedrops every few seconds, e.g. in VLC or in YouTube/Facebook videos in Chromium. Although I don't know how to reproduce the issue, it is not a question of whether the performance issues occur, but when (maybe after a few hours of use?). The issue is really caused by plasmashell, if I stop plasmashell the performance issues disappear, when I resume plasmashell the issues return: $ pkill -SIGSTOP plasmashell # perf issues gone, and plasmashell is obviously unusable (frozen/stopped). $ pkill -SIGCONT plasmashell # perf issues back The work-around to restart plasmashell, but doing so reorders the task items so it is not free of side effects. $ kquitapp5 plasmashell && kstart5 plasmashell --- ADDITIONAL INFORMATION After about a week of usage (with a few suspend/resume in between, some web browsing and using the terminal), I saw the issue again. I used "ps -o pcpu -C plasmashell" to get the CPU usage and saw the reported CPU drop from 28.8 to 2.2 after restarting plasmashell. After taking two more measures after an hour and another few hours the numbers slowly climbed to 2.5, then 3.8%. Then I recorded the CPU usage using perf while switching between desktops (5 times). The result is shown below (and attached). It seems that something in plasmashell is holding locks excessively often. And also the time spent by qstrcmp is a bit suspicious. $ perf record -e cpu-clock -p `pidof plasmashell` -o perf2.data $ perf report -i perf2.data Samples: 19K of event 'cpu-clock:u', Event count (approx.): 4926500000 Overhead Command Shared Object Symbol 16.53% plasmashell libpthread-2.24.so [.] __lll_lock_elision 7.91% plasmashell libpthread-2.24.so [.] __lll_unlock_elision 7.74% plasmashell libQt5Core.so.5.7.0 [.] qstrcmp 5.80% QXcbEventReader libpthread-2.24.so [.] __lll_lock_elision 5.31% QXcbEventReader libc-2.24.so [.] malloc 3.96% plasmashell libc-2.24.so [.] _int_free 3.32% plasmashell libQt5Core.so.5.7.0 [.] QAbstractEventDispatcher::filterNativeEvent 3.27% plasmashell libc-2.24.so [.] malloc 2.77% QXcbEventReader libc-2.24.so [.] _int_malloc 2.53% plasmashell libc-2.24.so [.] malloc_consolidate 2.51% QXcbEventReader libc-2.24.so [.] __memmove_avx_unaligned_erms 2.34% plasmashell libc-2.24.so [.] _int_malloc 1.75% plasmashell libQt5Core.so.5.7.0 [.] QMutex::lock 1.38% plasmashell libQt5Core.so.5.7.0 [.] QMutex::unlock 1.33% plasmashell libQt5XcbQpa.so.5.7.0 [.] QXcbConnection::processXcbEvents 1.32% QXcbEventReader libpthread-2.24.so [.] __lll_unlock_elision 1.26% QXcbEventReader libpthread-2.24.so [.] pthread_cond_signal@@GLIBC_2.3.2 -- You are receiving this mail because: You are watching all bug changes.