Summary: | Notifications cause lag/freeze in plasmashell and apps when using an NVIDIA GPU | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Janek Bevendorff <kde> |
Component: | Notifications | Assignee: | Kai Uwe Broulik <kde> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | apmichalopoulos, bizyaev, carlo, dev, joseph, leafee98, lp.kde, magnedj, michael, nate, plasma-bugs, sampingu02, shelcod, shops, tobyfox, ua_bugz_kde |
Priority: | HI | Keywords: | efficiency |
Version: | 5.22.3 | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=416807 https://bugs.kde.org/show_bug.cgi?id=436240 https://bugs.kde.org/show_bug.cgi?id=423594 https://bugs.kde.org/show_bug.cgi?id=439393 |
||
Latest Commit: | Version Fixed In: |
Description
Janek Bevendorff
2019-12-03 08:41:29 UTC
Same issue here, seems to be related to an update to 5.19 as other people reported (while other don't): https://old.reddit.com/r/kde/comments/h0u6j7/choppy_nvidia_x11_performance_on_plasma_519_with/ Any notification that pop-ups slow down everything, kind of freezes display for a few seconds, then it's laggy (but displays the notification) then goes back to normal when the notification disappears. I noticed a very high CPU usage for Xorg process during the whole slowdown. First it seems to go up to 100% of a single core (but screen is frozen, so I can't tell), then 85%, ~56% and then goes back to the normal 10~15% and display is smooth as usual. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Kubuntu 20.04 KDE Plasma Version: 5.19.5 KDE Frameworks Version: 5.74 Qt Version: 5.14.2 GPU: Nvidia GTX 1660 Super with 440.95.01 proprietary driver CPU: AMD Ryzen 3600 Update: I did enable triple buffering, following the instructions in the reddit topic linked above. It solved the issue for me. *** Bug 422310 has been marked as a duplicate of this bug. *** I have this issue again for a few days. KDE : 5.19.5. Nvidia drivers : 450.119.03. I did not have the changes in usr/share/X11/xorg.conf.d/10-nvidia.conf adviced in the reddit topic. I don't know if it was intentional (not done last time), something I forgot, and some file overwritten by a driver update or so. I did them. Let's hope this will solve the issue. I did make that change, I still have the issue. Look at the last comment from Plagman (Steam Proton Dev) on stuttering issue with steam notifications:- https://github.com/ValveSoftware/steam-for-linux/issues/3429 I think this is the issue. I get a huge lag when there are loads of notifications and in single notification popup, I get some milliseconds of stutter and returns to normal, repeating the same when the notification fades away. I dont think that NVIDIA bug mentioned in his comment affects only steam but steam stutters the most while opening apps, showing notifications and stuff gets hit with stutter too whenever they appear. I'm having the same issue but with slight variation, not sure if the exact same bug: - Entire UI (kwin? plasma?) freezes for anywhere from 100ms to 1000ms whenever any notification appears - Audio does *not* freeze. Mouse cursor also doesn't freeze, still moves smoothly - I have a dual integrated Intel GPU + NVIDIA GPU (using bbswitch) and my NVIDIA GPU is switched off, so the issue isn't unique to NVIDIA drivers I can reproduce as follows: 1. Open konsole and fill it with enough content such that you can scroll 2. While scrolling up and down with mouse/trackpad, run `notify-send foo` 3. Scrolling freezes for half second when notification appears I tried both triple-buffering and the usleep environment variables for kwin, but no dice. Also tried setting "force lowest latency" in compositor settings, didn't seem to make a difference. Overlays from changing monitor brightness and volume cause the same stutter. It happens only when the overlay first appears: once it's visible I can continue changing the volume without further stutter, and notifications/overlays disappearing do not cause stutter. OS: Arch Linux x86_64 Kernel: 5.12.9-arch1-1 CPU: Intel i5-6300HQ (4) @ 3.200GHz GPU: Intel HD Graphics 530 GPU: NVIDIA GeForce GTX 960M (disabled) KDE Plasma/KWin: 5.22.0 KDE Frameworks: 5.82.0 Qt: 5.15.2 Yep Overlays cause stutter too. Clearly evident in games. Whenever there is any notification pop-up or any overlay pop-up, the game frametime graph shows a spike (MangoHud). But when the notification is silent (dnd), there is no such stutter/spike in frametime. I did not notice any issue with the overlays (like volume control). For my part it's only with the notifications. *** Bug 436240 has been marked as a duplicate of this bug. *** *** This bug has been marked as a duplicate of bug 438112 *** *** Bug 438112 has been marked as a duplicate of this bug. *** I can confirm this when an app sends a gazillion notifications. It happens less often now (see Bug 416807), but when it does, the system still becomes laggy. https://github.com/ValveSoftware/steam-for-linux/issues/3429#issuecomment-54098190 Do you think this causes the issue? @Nate Graham? (In reply to Nate Graham from comment #13) > I can confirm this when an app sends a gazillion notifications. It happens > less often now (see Bug 416807), but when it does, the system still becomes > laggy. For my part I have this for every single notification, and I did not notice any difference no matter the number of them. (In reply to Lapineige from comment #15) > For my part I have this for every single notification, and I did not notice > any difference no matter the number of them. Yeah I too get stutter spikes whenever I receive a notification (multiple notification pop-ups at same time causes worse stutter than a single notification pop-up) or drag a window to the top for tiling it full screen (only stutters for the first time and only if done by dragging the window with mouse) and overlays like when increasing, decreasing or muting audio and while opening applications. (In reply to sampingu02 from comment #14) > https://github.com/ValveSoftware/steam-for-linux/issues/3429#issuecomment- > 54098190 > Do you think this causes the issue? @Nate Graham? I doubt it; the bug report is about the steam overlay, not Plasma notifications. And it seems to be related to some issue in the Nvidia driver, whereas this issue happens to users of non-Nvidia GPUs as well.. I commented that link in this bug report because the reporter Janek Bevendorff, Lapineige, Toby Fox and myself all have NVIDIA GPUs and we all have stutters when every single notification pop-up appears (which I guess isnt a problem in AMD or Intel GPUs because I tested it with Intel iGPU). In that link the Valve dev says that whenever X is manipulated in a way it causes hitch in OpenGL compositing. So according to what he says it not only affects steam notifications but the entire OpenGL compositing whenever X is manipulated in a certain way(??) I am currently in GNOME and GNOME has some stutters too when notifications appear or when opening applications. Hmm, perhaps there are multiple issues, then. Because I have an Intel iGPU and I can reproduce CPU spikes and lag when I get a lot of notifications, nut if you're experiencing an instant freeze when only a single notification appears, I think that's something else. Let's use this one to track the NVIDIA freeze/stutter. > or drag a window to the top for tiling it full screen (only stutters for the first time and only if done by dragging the window with mouse)
Very good catch, same here.
I believe I need to add an additional information about my situation: - The first time I encountered this issue, it was on my laptop (Nvidia GPU too, not the same one, not the same driver version, and Optimus/Prime enabled). It was fixed since that moment. - I then transferred all my kde settings to a new PC, that I am using right now, and which is the one where I have the issue. It wasn't the case at the beginning, it appeared a while before my reply above to "reopen" the issue. - I don't have the issue on the laptop. If you need to test something in 2 "parent" systems, which both had the issue but one no longer encounters it, feel free to ping me. I don't have an Nvidia GPU, and yet my bug was closed as a duplicate of this one. Should I reopen the original report or modify the name here? Are you seeing the same freeze/hang/lag after a single notification appears that the NVIDIA users are? If so, modify the name of this bug report to indicate that it's not NVIDIA-specific. If not, un-dupe and put your bug in the "See Also" field of this one. I'm having this as well - have done for as long as I can remember. What can we do to provide useful debug information? Author of bug 438112 here, and after a very long while the bug hit me again: Jul 12 13:52:25 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:416:29: QML ColumnLayout: possible QQuickItem::polish() loop Jul 12 13:52:25 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:258:13: QML ListView: ListView called polish() inside updatePolish() of ColumnLayout Jul 12 13:52:25 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:258:13: QML ListView: possible QQuickItem::polish() loop Jul 12 13:52:25 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:416:29: QML ColumnLayout: ColumnLayout called polish() inside updatePolish() of ListView Jul 12 13:52:25 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:416:29: QML ColumnLayout: possible QQuickItem::polish() loop Jul 12 13:52:25 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:258:13: QML ListView: ListView called polish() inside updatePolish() of ColumnLayout Jul 12 13:52:25 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:258:13: QML ListView: possible QQuickItem::polish() loop Jul 12 13:52:25 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:416:29: QML ColumnLayout: ColumnLayout called polish() inside updatePolish() of ListView Jul 12 13:52:25 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:416:29: QML ColumnLayout: possible QQuickItem::polish() loop Jul 12 13:52:25 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:258:13: QML ListView: ListView called polish() inside updatePolish() of ColumnLayout Jul 12 13:53:15 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:416:29: QML ColumnLayout: possible QQuickItem::polish() loop Jul 12 13:53:15 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:258:13: QML ListView: ListView called polish() inside updatePolish() of ColumnLayout Jul 12 13:53:15 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:258:13: QML ListView: possible QQuickItem::polish() loop Jul 12 13:53:15 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:416:29: QML ColumnLayout: ColumnLayout called polish() inside updatePolish() of ListView Jul 12 13:53:15 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:416:29: QML ColumnLayout: possible QQuickItem::polish() loop Jul 12 13:53:15 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:258:13: QML ListView: ListView called polish() inside updatePolish() of ColumnLayout Jul 12 13:53:15 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:258:13: QML ListView: possible QQuickItem::polish() loop Jul 12 13:53:15 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:416:29: QML ColumnLayout: ColumnLayout called polish() inside updatePolish() of ListView Jul 12 13:53:15 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:416:29: QML ColumnLayout: possible QQuickItem::polish() loop Jul 12 13:53:15 ArchBox plasmashell[1219]: file:///usr/share/plasma/plasmoids/org.kde.plasma.notifications/contents/ui/FullRepresentation.qml:258:13: QML ListView: ListView called polish() inside updatePolish() of ColumnLayout I do have an Nvidia GPU but I have no issues with tiling or stuttering or whatever else, just with the notification applet freezing the plasma shell. *** Bug 439361 has been marked as a duplicate of this bug. *** This seems to be an issue with the NVIDIA driver; see https://bugs.kde.org/show_bug.cgi?id=439393#c11 I guess you can report this issue to the NVIDIA folks, either by sending an email to linux-bugs@nvidia.com or making a post at https://forums.developer.nvidia.com/c/gpu-unix-graphics/linux/ It would be helpful to the NVIDIA developers if you could run nvidia-bug-report.sh and attach the resulting file in your report. Thanks! *** Bug 443696 has been marked as a duplicate of this bug. *** I managed to work around the problem by means of the solution proposed here, number 2 (Disabling KWIN Vsync and force full composition pipeline): https://www.reddit.com/r/EndeavourOS/comments/p8b2kf/for_those_that_have_stutterlags_problems_with_kde/ I already reported it in the relevant nvidia forums topic, but I'm also posting it here since disabling vsync in KWin and forcing it to be offloaded to the nvidia driver seems to fix the issue. Perhaps there's something unforeseen going on in KWin and something can be done in KWin to fix/workaround the issue (perhaps some nvidia-specific hacks). I found that latte-dock still stutters, disabling tooltips solved that one for me. I was hoping this magically solved it as well, but apparently not. > I already reported it in the relevant nvidia forums topic
Can you post the link here please ?
(In reply to Lapineige from comment #30) > > I already reported it in the relevant nvidia forums topic > > Can you post the link here please ? Sure, https://forums.developer.nvidia.com/t/desktop-notifications-cause-stutter-on-kde-plasma-5-21-5/177717/8 I thought the topic was created by TS, but I'll post the link anyways. (In reply to Carlo Meijer from comment #29) > I managed to work around the problem by means of the solution proposed here, > number 2 (Disabling KWIN Vsync and force full composition pipeline): > https://www.reddit.com/r/EndeavourOS/comments/p8b2kf/ > for_those_that_have_stutterlags_problems_with_kde/ > I already reported it in the relevant nvidia forums topic, but I'm also > posting it here since disabling vsync in KWin and forcing it to be offloaded > to the nvidia driver seems to fix the issue. Perhaps there's something > unforeseen going on in KWin and something can be done in KWin to > fix/workaround the issue (perhaps some nvidia-specific hacks). > > I found that latte-dock still stutters, disabling tooltips solved that one > for me. I was hoping this magically solved it as well, but apparently not. I tried the described work around. it doesn't appear to fix the stutter described in bug 443696 (a duplicate of this one), the test being: for i in 1 2 3 4 5 6 7 8 9 10; do notify-send --expire-time 20000 test $i; done Perhaps bug 443696 is not actually the same as this one. (In reply to Michael Hamilton from comment #32) > (In reply to Carlo Meijer from comment #29) > > I managed to work around the problem by means of the solution proposed here, > > number 2 (Disabling KWIN Vsync and force full composition pipeline): > > https://www.reddit.com/r/EndeavourOS/comments/p8b2kf/ > > for_those_that_have_stutterlags_problems_with_kde/ > > I already reported it in the relevant nvidia forums topic, but I'm also > > posting it here since disabling vsync in KWin and forcing it to be offloaded > > to the nvidia driver seems to fix the issue. Perhaps there's something > > unforeseen going on in KWin and something can be done in KWin to > > fix/workaround the issue (perhaps some nvidia-specific hacks). > > > > I found that latte-dock still stutters, disabling tooltips solved that one > > for me. I was hoping this magically solved it as well, but apparently not. > > I tried the described work around. it doesn't appear to fix the stutter > described in bug 443696 (a duplicate of this one), the test being: > > for i in 1 2 3 4 5 6 7 8 9 10; do notify-send --expire-time 20000 test > $i; done > > Perhaps bug 443696 is not actually the same as this one. It seems that, indeed, there are two distinct issues: 1) is the one described by TS; as long as the notification is open, everything stutters. I had this issue as well, and solved it by offloading vsync to the nvidia driver, as referenced in my previous post. 2) is described in 443696 and 436902; stutters and cpu spikes appear only during the appearance and disappearance of a notification. Now that I pay attention to it, it seems that my system is also affected by (2). However, in my humble opinion, it's is much less severe than (1). I can live with it until wayland is ready for daily use. Hopefully that will magically make the issue go away. I still have stutters when notifications pop up, very easily reproducible with e.g. Spotify changing track while playing certain games. I have a dual screen setup with the following system: Operating System: openSUSE Tumbleweed 20230517 KDE Plasma Version: 5.27.5 KDE Frameworks Version: 5.106.0 Qt Version: 5.15.9 Kernel Version: 6.3.2-1-default (64-bit) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor Memory: 31.2 GiB of RAM Graphics Processor: NVIDIA GeForce GTX 960/PCIe/SSE2 Manufacturer: ASUS I see this has been marked as resolved, but if that's true, what I'm experiencing must be another bug with similar symptoms. Not sure if I should file another one, but I don't want to add more duplicates if it's already tracked here or in some other report. (In reply to Magne Djupvik from comment #34) > I still have stutters when notifications pop up, very easily reproducible > with e.g. Spotify changing track while playing certain games. I have a dual > screen setup with the following system: > > Operating System: openSUSE Tumbleweed 20230517 > KDE Plasma Version: 5.27.5 > KDE Frameworks Version: 5.106.0 > Qt Version: 5.15.9 > Kernel Version: 6.3.2-1-default (64-bit) > Graphics Platform: X11 > Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor > Memory: 31.2 GiB of RAM > Graphics Processor: NVIDIA GeForce GTX 960/PCIe/SSE2 > Manufacturer: ASUS > > I see this has been marked as resolved, but if that's true, what I'm > experiencing must be another bug with similar symptoms. Not sure if I should > file another one, but I don't want to add more duplicates if it's already > tracked here or in some other report. I'm on Tumbleweed 20230518, Ryzen 5 5600, 32 GB, GTX 1650 Super, ASUS TUF GAMING B550-PLUS WIFI II. My original complaint over this issue appears to be fixed. However, I more recently experienced audio skips after switching Tumbleweed from Pulse to Pipewire. The skips seemed to mainly occur when Jetbrains Pycharm IDE was busy but also from other activities. I couldn't find a resolution. I removed pipewire and moving back to pulse. That cleared the issue or reduced it so that I no longer notice it. Perhaps this is a Tumbleweed issue. We both have ASUS motherboards, it could also be a sound driver issue. (In reply to Michael Hamilton from comment #35) > I'm on Tumbleweed 20230518, Ryzen 5 5600, 32 GB, GTX 1650 Super, ASUS TUF > GAMING B550-PLUS WIFI II. > My original complaint over this issue appears to be fixed. However, I more > recently experienced audio skips after switching Tumbleweed from Pulse to > Pipewire. The skips seemed to mainly occur when Jetbrains Pycharm IDE was > busy but also from other activities. I couldn't find a resolution. I > removed pipewire and moving back to pulse. That cleared the issue or > reduced it so that I no longer notice it. Perhaps this is a Tumbleweed > issue. We both have ASUS motherboards, it could also be a sound driver > issue. I also experience audio skipping with CPU spikes, like whenever I start a game in Steam. This is probably not a driver issue since I use an external Focusrite USB soundcard. And since I use and like Pipewire's ability to also function for software needing low latency like music production software, going back to having to switch between PulseAudio and JACK would be a painful step back for me. However, this is probably a different issue than Plasma notifications causing visible stuttering, like I described in my first post, so I'd like to find a separate bug report for it. If you know of any, please let me know. This is not fully resolved for me, it seems it's still lagging a bit when a notification appears. |