Bug 482611 - kwin spikes CPU usage every few minutes, causing major lag after update to Plasma 6.0.0
Summary: kwin spikes CPU usage every few minutes, causing major lag after update to Pl...
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: general (other bugs)
Version First Reported In: 6.0.0
Platform: Neon Linux
: NOR major
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-03-06 23:23 UTC by Anon
Modified: 2024-04-06 03:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
CPU usage in htop (63.20 KB, image/png)
2024-03-06 23:23 UTC, Anon
Details
hotspot (145.53 KB, image/png)
2024-03-07 23:13 UTC, Anon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anon 2024-03-06 23:23:17 UTC
Created attachment 166523 [details]
CPU usage in htop

SUMMARY
***
/usr/bin/kwin_x11 --replace uses 20%25% CPU
/usr/lib/xorg/Xorg -nolisten tcp -background none -seat seat0 vt2 -auth /run/sddm/xauth_vxVEuW
uses 15-20% CPU

All the time with just Brave browsed, Telegram, and Slack running. Every 2 minutes or so, keyboard and mouse input display stops being processed for several seconds. Keystrokes are not lost: if you type while the input stops displaying, everything you typed eventually appears. The mouse pointer can move during that period, but clicks are not processed and the pointer shape does not change to e.g. grab or arrow or caret when hovering over elements that would cause it to change normally. This makes the computer mostly unusable.

This happens in Wayland and x sessions and did not happen before 6.0.0.
***


STEPS TO REPRODUCE
1. Update an up to date KDE Neon User distro to Plasma 6.0.0 using pkcon update.
2. Use the computer.

OBSERVED RESULT

Two kwin binaries spike the CPU and cause input update lags. 

EXPECTED RESULT

CPU usage does not spike and input does not lag.

SOFTWARE/OS VERSIONS

Operating System: KDE neon 6.0
KDE Plasma Version: 6.0.0
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.5.0-21-generic (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-10510U CPU @ 1.80GHz
Memory: 46.7 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics
Manufacturer: LENOVO
Product Name: 20RYS0M100
System Version: ThinkPad T490

ADDITIONAL INFORMATION

This did not happen before Plasma 6.0.0.
Comment 1 Vlad Zahorodnii 2024-03-07 13:29:50 UTC
Can you run hotspot please and post a screenshot of the flame graph here?
Comment 2 Vlad Zahorodnii 2024-03-07 13:31:07 UTC
also is there anything in kwin logs? `journalctl --user-unit plasma-kwin_x11 --boot`
Comment 3 Nate Graham 2024-03-07 19:19:14 UTC
.
Comment 4 Anon 2024-03-07 20:13:31 UTC
I'll add logs in a little bit but wanted to add this note: I've had Google Meet video calls all morning, and the audio stream was completely UNaffected by the CPU spike and input lag. The video stream WAS affected, with the video freezing and not updating for 5-10 seconds every 1-2 minutes, then resuming. This happens on both the internal and external screens.
Comment 5 Anon 2024-03-07 22:43:05 UTC
(In reply to Vlad Zahorodnii from comment #2)
> also is there anything in kwin logs? `journalctl --user-unit plasma-kwin_x11
> --boot`

$ journalctl --user-unit plasma-kwin_x11 --boot
Mar 05 15:18:32 t490-neon systemd[4704]: Starting KDE Window Manager...
Mar 05 15:18:33 t490-neon systemd[4704]: Started KDE Window Manager.
Mar 05 15:18:33 t490-neon kwin_x11[4978]: OpenGL vendor string:                   Intel
Mar 05 15:18:33 t490-neon kwin_x11[4978]: OpenGL renderer string:                 Mesa Intel(R) UHD Graphics (CML GT2)
Mar 05 15:18:33 t490-neon kwin_x11[4978]: OpenGL version string:                  4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
Mar 05 15:18:33 t490-neon kwin_x11[4978]: OpenGL shading language version string: 4.60
Mar 05 15:18:33 t490-neon kwin_x11[4978]: Driver:                                 Intel
Mar 05 15:18:33 t490-neon kwin_x11[4978]: GPU class:                              Comet Lake
Mar 05 15:18:33 t490-neon kwin_x11[4978]: OpenGL version:                         4.6
Mar 05 15:18:33 t490-neon kwin_x11[4978]: GLSL version:                           4.60
Mar 05 15:18:33 t490-neon kwin_x11[4978]: Mesa version:                           23.2.1
Mar 05 15:18:33 t490-neon kwin_x11[4978]: Requires strict binding:                yes
Mar 05 15:18:33 t490-neon kwin_x11[4978]: Virtual Machine:                        no
Mar 05 15:18:33 t490-neon kwin_x11[4978]: Timer query support:                    yes
Mar 05 15:18:34 t490-neon kwin_x11[4978]: kf.config.core: "\"restore1\" - conversion of \"-208,79.2,20.799999999999997,20.799999999999997\" to QRect failed"
Mar 05 15:18:34 t490-neon kwin_x11[4978]: kf.config.core: "\"fsrestore1\" - conversion of \"0,0,0,0\" to QRect failed"
Mar 05 15:18:34 t490-neon kwin_x11[4978]: qt.qml.typeresolution.cycle: Cyclic dependency detected between "qrc:/qt/qml/org/kde/desktop/private/TextFieldContext>
Mar 06 11:01:24 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 35881, resource id: 33594779, major code: 143 (DAMAGE), minor code: >
Mar 06 11:01:24 t490-neon kwin_x11[4978]: kwin_core: XCB error: 3 (BadWindow), sequence: 35882, resource id: 31457296, major code: 129 (SHAPE), minor code: 6 (>
Mar 06 11:28:18 t490-neon kcmshell6[11094]: qt.qml.typeresolution.cycle: Cyclic dependency detected between "qrc:/qt/qml/org/kde/desktop/private/TextFieldConte>
Mar 06 11:28:18 t490-neon kcmshell6[11094]: Retrieved properties for window QUuid("{3bcaa025-6190-4e3d-a39a-fb96a06e3532}")
Mar 06 11:28:19 t490-neon kcmshell6[11094]: file:///usr/lib/x86_64-linux-gnu/qt6/qml/org/kde/kirigami/Dialog.qml:344: TypeError: Cannot read property 'height' >
Mar 06 11:28:19 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:19 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:19 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:19 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:23 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:23 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:24 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:24 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:24 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:24 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:31 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:31 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:31 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:53 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:53 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:58 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:58 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:59 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:136: TypeError: Cannot read property 'rulesModel' of null
Mar 06 11:28:59 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:19: TypeError: Cannot read property 'rulesModel' of null
Mar 06 11:28:59 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:76: TypeError: Cannot read property 'rulesModel' of null
Mar 06 11:28:59 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:299:9: TypeError: Cannot read property 'rulesModel' of null
Mar 06 11:28:59 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:308:9: TypeError: Cannot read property 'rulesModel' of null
Mar 06 11:28:59 t490-neon kcmshell6[11094]: qrc:/kcm/kcm_kwinrules/RulesEditor.qml:173:5: QML OverlaySheet: Binding loop detected for property "implicitHeight"
Mar 06 11:28:59 t490-neon kwin_x11[4978]: OpenGL vendor string:                   Intel
Mar 06 11:28:59 t490-neon kwin_x11[4978]: OpenGL renderer string:                 Mesa Intel(R) UHD Graphics (CML GT2)
Mar 06 11:28:59 t490-neon kwin_x11[4978]: OpenGL version string:                  4.6 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2
Mar 06 11:28:59 t490-neon kwin_x11[4978]: OpenGL shading language version string: 4.60
Mar 06 11:28:59 t490-neon kwin_x11[4978]: Driver:                                 Intel
Mar 06 11:28:59 t490-neon kwin_x11[4978]: GPU class:                              Comet Lake
Mar 06 11:28:59 t490-neon kwin_x11[4978]: OpenGL version:                         4.6
Mar 06 11:28:59 t490-neon kwin_x11[4978]: GLSL version:                           4.60
Mar 06 11:28:59 t490-neon kwin_x11[4978]: Mesa version:                           23.2.1
Mar 06 11:28:59 t490-neon kwin_x11[4978]: Requires strict binding:                yes
Mar 06 11:28:59 t490-neon kwin_x11[4978]: Virtual Machine:                        no
Mar 06 11:28:59 t490-neon kwin_x11[4978]: Timer query support:                    yes
Mar 06 11:28:59 t490-neon kwin_x11[4978]: GlideConfig::instance called after the first use - ignoring
Mar 06 11:28:59 t490-neon kwin_x11[4978]: KscreenConfig::instance called after the first use - ignoring
Mar 06 11:28:59 t490-neon kwin_x11[4978]: OverviewConfig::instance called after the first use - ignoring
Mar 06 11:28:59 t490-neon kwin_x11[4978]: SlideConfig::instance called after the first use - ignoring
Mar 06 11:28:59 t490-neon kwin_x11[4978]: SlidingPopupsConfig::instance called after the first use - ignoring
Mar 06 11:28:59 t490-neon kwin_x11[4978]: WindowViewConfig::instance called after the first use - ignoring
Mar 06 11:28:59 t490-neon kwin_x11[4978]: ZoomConfig::instance called after the first use - ignoring
Mar 06 12:21:48 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 45250, resource id: 33941791, major code: 143 (DAMAGE), minor code: >
Mar 06 12:21:48 t490-neon kwin_x11[4978]: kwin_core: XCB error: 3 (BadWindow), sequence: 45251, resource id: 77594717, major code: 129 (SHAPE), minor code: 6 (>
Mar 06 12:22:15 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 59728, resource id: 33944359, major code: 143 (DAMAGE), minor code: >
Mar 06 13:22:07 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 47489, resource id: 34057790, major code: 143 (DAMAGE), minor code: >
Mar 06 13:22:07 t490-neon kwin_x11[4978]: kwin_core: XCB error: 3 (BadWindow), sequence: 47490, resource id: 31457304, major code: 129 (SHAPE), minor code: 6 (>
Mar 06 13:27:24 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 2368, resource id: 34093538, major code: 143 (DAMAGE), minor code: 3>
Mar 06 15:06:50 t490-neon kwin_x11[4978]: kf.config.core: Watching absolute paths is not supported "/usr/share/color-schemes/BreezeDark.colors"
Mar 06 15:14:11 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 7817, resource id: 34637821, major code: 143 (DAMAGE), minor code: 2>
Mar 06 15:14:11 t490-neon kwin_x11[4978]: kwin_core: XCB error: 3 (BadWindow), sequence: 7818, resource id: 73400972, major code: 129 (SHAPE), minor code: 6 (I>
Mar 06 15:28:13 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 24444, resource id: 34689670, major code: 143 (DAMAGE), minor code: >
Mar 06 15:28:20 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 35215, resource id: 34689945, major code: 143 (DAMAGE), minor code: >
Mar 06 15:29:29 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 17295, resource id: 34694728, major code: 143 (DAMAGE), minor code: >
Mar 06 15:49:27 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 45231, resource id: 34771666, major code: 143 (DAMAGE), minor code: >
Mar 06 15:49:27 t490-neon kwin_x11[4978]: kwin_core: XCB error: 3 (BadWindow), sequence: 45232, resource id: 111149233, major code: 129 (SHAPE), minor code: 6 >
Mar 06 21:59:37 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 16783, resource id: 34925416, major code: 143 (DAMAGE), minor code: >
Mar 06 22:01:26 t490-neon kwin_x11[4978]: kf.config.core: Watching absolute paths is not supported "/usr/share/color-schemes/BreezeLight.colors"
Mar 07 09:34:00 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 63865, resource id: 34427118, major code: 143 (DAMAGE), minor code: >
Mar 07 09:34:07 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 6995, resource id: 34427305, major code: 143 (DAMAGE), minor code: 3>
Mar 07 09:34:13 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 14454, resource id: 34428487, major code: 143 (DAMAGE), minor code: >
Mar 07 10:48:13 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 48221, resource id: 35295217, major code: 143 (DAMAGE), minor code: >
Mar 07 12:44:36 t490-neon kwin_x11[4978]: kwin_core: XCB error: 152 (BadDamage), sequence: 18383, resource id: 35443501, major code: 143 (DAMAGE), minor code: >
Mar 07 12:45:05 t490-neon kwin_x11[4978]: kwin_core: Failed to focus 0x5c02179 (error 8)
Mar 07 12:47:30 t490-neon kwin_x11[4978]: kwin_core: Failed to focus 0x5c009ed (error 3)
Comment 6 Anon 2024-03-07 23:13:24 UTC
Created attachment 166644 [details]
hotspot
Comment 7 Anon 2024-03-07 23:13:59 UTC
(In reply to Vlad Zahorodnii from comment #1)
> Can you run hotspot please and post a screenshot of the flame graph here?

Added. Let me know if it helps--I haven't used that tool before and don't know how to interpret the results.
Comment 8 Bug Janitor Service 2024-03-22 03:45:57 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 9 Bug Janitor Service 2024-04-06 03:47:10 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!