Summary: | Progress Indicator Spinner in notifications causes 100% CPU usage | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Nicolas F. <kdebugs> |
Component: | Notifications | Assignee: | Martin Klapetek <mklapetek> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | auxsvr, jospoortvliet, kde, kde, kollix, plasma-bugs, tim, tiposchi, travneff |
Priority: | NOR | ||
Version: | 5.3.0 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Nicolas F.
2015-05-05 14:32:19 UTC
Thanks for the report and the analysis. Unfortunately I'm not sure if we actually have any control over at what speed the spinner updates. We use QtQuick's Animator[1] to perform the animation. More specifically, the RotationAnimator[2]. And that's performed directly on GPU. It may very well be that this is either a Qt (QtQuick) bug or the nvidia driver bug; Plasma itself has just a pretty high-level usage of it. What I would suggest is try to create a minimal test example using the RotationAnimator on a simple image or Rectangle and test that. If that still goes berserk on your CPU, then it's QtQuick's bug and/or driver's. If not, then we may have something on our side indeed. [1] http://doc.qt.io/qt-5/qml-qtquick-animator.html [2] http://doc.qt.io/qt-5/qml-qtquick-rotationanimator.html Thanks for the quick reply. I'll try to create a minimal testcase and report back with my findings. As an additional sidenote, if this truly is an nvidia driver bug, then it may be resolved if they finally implement PRIME buffer fencing, since the nvidia GPU will then wait for the Intel GPU to finish its read before writing to the buffer again.[1] [1] https://devtalk.nvidia.com/default/topic/775691/linux/vsync-issue-nvidia-prime-ux32vd-with-gt620-m-/post/4430873/#4430873 I have created a minimal test case which exhibits the same behaviour: the rectangle spins insanely fast, and the CPU usage spikes. Thus we can conclude that this is a bug in QtQuick or in the nvidia driver. Link to test case: https://github.com/CounterPillow/spinnertest Thanks for your effort! I think it's best if you head over to https://bugreports.qt.io/ and file a bug against QtQuick there. Reported upstream here: https://bugreports.qt.io/browse/QTBUG-45959 Here's a manual workaround until upstream Qt either implements automatic detection of this + a workaround or upstream nvidia actually gets off their asses: Create a script with "export QSG_RENDER_LOOP=basic" and add it as auto-start before the KDE login. If somebody manages to do accurate detection of optimus systems (perhaps using xrandr --listproviders?) distributions could even include a small autostart script to do this for users. I have the same issue with an Intel card. I highly doubt it is an upstream problem. > I highly doubt it is an upstream problem.
The animation is performed by Qt/QtQuick. Qt is upstream.
*** Bug 351888 has been marked as a duplicate of this bug. *** Apparently NVIDIA is coming with an update, Qt probably won't provide a work-around. As far as the problem is caused by Plasma and Frameworks itself, that should be close to being fixed - see https://bugs.kde.org/show_bug.cgi?id=336274 I'm encountering the same 100% CPU on an Intel Card, so it has nothing to do with nvidia. The mentioned spinnertest example program uses here just 3% CPU, so it seems this is neither an nvidia nor a Qt bug. Side question: if the spinner is calculated on the GPU, then why is the CPU using 100% ? Should I create a new bug report or shall we reopen this one ? |