https://bugs.kde.org/show_bug.cgi?id=468715
Bug ID: 468715 Summary: High CPU usage w/ kwin_wayland while in VT (text console) Classification: Plasma Product: kwin Version: git-stable-Plasma/5.27 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: wayland-generic Assignee: kwin-bugs-n...@kde.org Reporter: ua_bugz_...@binary-island.eu Target Milestone: --- Created attachment 158230 --> https://bugs.kde.org/attachment.cgi?id=158230&action=edit a "perf record -g -T -P --running-time" for the kwin_wayland process w/ high cpu usage SUMMARY While I was working to fix a different kwin bug for the past several weeks, I came across this very annoying and consistent (as-in: happens almost 100% of time time) behavior: Switching to the VT (text console) while running kwin_wayland, will result in kwin_wayland eating betweet 40%-50% CPU until I switch back. STEPS TO REPRODUCE 1. Start kwin_wayland (as part of the plasma desktop) 2. Move the mouse around 3. Switch to the VT (text console) OBSERVED RESULT High CPU usage of kwin_wayland EXPECTED RESULT kwin_wayland should be idle SOFTWARE/OS VERSIONS KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.106.0 KWin Support Information: The following information should be used when requesting support on e.g. https://forum.kde.org. It provides information about the currently running instance, which options are used, what OpenGL driver and which effects are running. Please post the information provided underneath this introductory text to a paste bin service like https://paste.kde.org instead of pasting into support threads. ========================== Version ======= KWin version: 5.27.4 Qt Version: 5.15.9 Qt compile version: 5.15.9 XCB compile version: 1.15 Operation Mode: Xwayland Build Options ============= KWIN_BUILD_DECORATIONS: yes KWIN_BUILD_TABBOX: yes KWIN_BUILD_ACTIVITIES: yes HAVE_X11_XCB: yes HAVE_EPOXY_GLX: yes X11 === Vendor: The X.Org Foundation Vendor Release: 12301001 Protocol Version/Revision: 11/0 SHAPE: yes; Version: 0x11 RANDR: yes; Version: 0x14 DAMAGE: yes; Version: 0x11 Composite: yes; Version: 0x4 RENDER: yes; Version: 0xb XFIXES: yes; Version: 0x50 SYNC: yes; Version: 0x31 GLX: yes; Version: 0x0 Decoration ========== Plugin: org.kde.breeze Theme: Plugin recommends border size: None onAllDesktopsAvailable: true alphaChannelSupported: true closeOnDoubleClickOnMenu: false decorationButtonsLeft: 0, 2 decorationButtonsRight: 6, 3, 4, 5 borderSize: 0 gridUnit: 10 font: Noto Sans,10,-1,5,50,0,0,0,0,0 smallSpacing: 2 largeSpacing: 10 Output backend ============== Name: DRM Active: true Atomic Mode Setting on GPU 0: true Cursor ====== themeName: breeze_cursors themeSize: 24 Options ======= focusPolicy: 0 xwaylandCrashPolicy: xwaylandMaxCrashCount: 3 nextFocusPrefersMouse: false clickRaise: true autoRaise: false autoRaiseInterval: 0 delayFocusInterval: 0 shadeHover: false shadeHoverInterval: 250 separateScreenFocus: false activeMouseScreen: true placement: activationDesktopPolicy: 0 focusPolicyIsReasonable: true borderSnapZone: 10 windowSnapZone: 10 centerSnapZone: 0 snapOnlyWhenOverlapping: false rollOverDesktops: true focusStealingPreventionLevel: 1 operationTitlebarDblClick: 5000 operationMaxButtonLeftClick: 5000 operationMaxButtonMiddleClick: 5015 operationMaxButtonRightClick: 5014 commandActiveTitlebar1: 0 commandActiveTitlebar2: 28 commandActiveTitlebar3: 2 commandInactiveTitlebar1: 4 commandInactiveTitlebar2: 28 commandInactiveTitlebar3: 2 commandWindow1: 7 commandWindow2: 8 commandWindow3: 8 commandWindowWheel: 28 commandAll1: 10 commandAll2: 3 commandAll3: 14 keyCmdAllModKey: 16777250 condensedTitle: false electricBorderMaximize: true electricBorderTiling: true electricBorderCornerRatio: 0.25 borderlessMaximizedWindows: false killPingTimeout: 5000 hideUtilityWindowsForInactive: true compositingMode: 1 useCompositing: true hiddenPreviews: 1 glSmoothScale: 2 glStrictBinding: false glStrictBindingFollowsDriver: true glPreferBufferSwap: 99 glPlatformInterface: 2 windowsBlockCompositing: true latencyPolicy: renderTimeEstimator: allowTearing: true Screen Edges ============ desktopSwitching: true desktopSwitchingMovingClients: true cursorPushBackDistance: 1x1 timeThreshold: 300 reActivateThreshold: 350 actionTopLeft: 0 actionTop: 0 actionTopRight: 0 actionRight: 0 actionBottomRight: 0 actionBottom: 0 actionBottomLeft: 0 actionLeft: 0 Screens ======= Active screen follows mouse: yes Number of Screens: 1 Screen 0: --------- Name: HDMI-A-1 Enabled: 1 Geometry: 0,0,2560x1440 Scale: 1.5 Refresh Rate: 60000 Adaptive Sync: incapable Compositing =========== Compositing is active Compositing Type: OpenGL OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: NVIDIA GeForce GTX 1080/PCIe/SSE2 OpenGL version string: 3.1.0 NVIDIA 530.41.03 OpenGL platform interface: EGL OpenGL shading language version string: 1.40 NVIDIA via Cg compiler Driver: NVIDIA Driver version: 530.41.3 GPU class: Unknown OpenGL version: 3.1 GLSL version: 1.40 Linux kernel version: 6.2.2 Direct rendering: Requires strict binding: no GLSL shaders: yes Texture NPOT support: yes Virtual Machine: no OpenGL 2 Shaders are used Loaded Effects: --------------- colorpicker outputlocator screenshot kwin4_effect_sessionquit kwin4_effect_login kwin4_effect_logout kwin4_effect_windowaperture magiclamp slide slideback kwin4_effect_maximize kwin4_effect_fullscreen kwin4_effect_scale kwin4_effect_fadingpopups kwin4_effect_frozenapp kwin4_effect_morphingpopups kwin4_effect_dialogparent desktopgrid highlightwindow overview tileseditor windowview blendchanges startupfeedback kscreen screentransform Currently Active Effects: ------------------------- Effect Settings: ---------------- colorpicker: outputlocator: screenshot: kwin4_effect_sessionquit: pluginId: kwin4_effect_sessionquit isActiveFullScreenEffect: false kwin4_effect_login: pluginId: kwin4_effect_login isActiveFullScreenEffect: false kwin4_effect_logout: pluginId: kwin4_effect_logout isActiveFullScreenEffect: false kwin4_effect_windowaperture: pluginId: kwin4_effect_windowaperture isActiveFullScreenEffect: false magiclamp: slide: horizontalGap: 45 verticalGap: 20 slideBackground: false slideback: kwin4_effect_maximize: pluginId: kwin4_effect_maximize isActiveFullScreenEffect: false kwin4_effect_fullscreen: pluginId: kwin4_effect_fullscreen isActiveFullScreenEffect: false kwin4_effect_scale: pluginId: kwin4_effect_scale isActiveFullScreenEffect: false kwin4_effect_fadingpopups: pluginId: kwin4_effect_fadingpopups isActiveFullScreenEffect: false kwin4_effect_frozenapp: pluginId: kwin4_effect_frozenapp isActiveFullScreenEffect: false kwin4_effect_morphingpopups: pluginId: kwin4_effect_morphingpopups isActiveFullScreenEffect: false kwin4_effect_dialogparent: pluginId: kwin4_effect_dialogparent isActiveFullScreenEffect: false desktopgrid: activeView: gridRows: 2 gridColumns: 4 animationDuration: 300 layout: 1 partialActivationFactor: 0 gestureInProgress: false showAddRemove: true desktopNameAlignment: 0 desktopLayoutMode: 0 customLayoutRows: 2 highlightwindow: overview: activeView: animationDuration: 300 layout: 1 ignoreMinimized: false blurBackground: true partialActivationFactor: 0 gestureInProgress: false searchText: tileseditor: activeView: animationDuration: 200 windowview: activeView: animationDuration: 300 layout: 1 ignoreMinimized: false mode: 1 partialActivationFactor: 0 gestureInProgress: false searchText: blendchanges: startupfeedback: type: 1 kscreen: screentransform: Loaded Plugins: --------------- kwin5_plugin_buttonrebinds kwin5_plugin_colord kwin5_plugin_krunner kwin5_plugin_nightcolor kwin5_plugin_screencast Available Plugins: ------------------ kwin5_plugin_buttonrebinds kwin5_plugin_colord kwin5_plugin_krunner kwin5_plugin_nightcolor kwin5_plugin_screencast ADDITIONAL INFORMATION I have been trying to debug and fix this myself but since my knowledge of kwin in that area is rather basic, it would take me quite a bit more time than someone more experienced to properly figure out what is happening here. :-( What I was able to figure out is that kwin is still trying to commit the pipeline and present while in the VT. I assume that should not happen and kwin should be idle until it is in the foreground again? It is also spamming the log with while in the VT: Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: Atomic test failed! Invalid argument Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: Drm objects: Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "connector" 78 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_ID": 0->41 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "non-desktop": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "DPMS": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "EDID": 91 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "vrr_capable": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "link-status": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "crtc" 41 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "MODE_ID": 0->93 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "ACTIVE": 0->1 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "VRR_ENABLED": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "plane" 35 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "type": 1 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "SRC_X": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "SRC_Y": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "SRC_W": 3840 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "SRC_H": 2160 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_X": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_Y": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_W": 3840 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_H": 2160 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "FB_ID": 0->92 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_ID": 0->41 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "rotation": 1 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "IN_FORMATS": 36 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "plane" 38 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "type": 2 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "SRC_X": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "SRC_Y": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "SRC_W": 256 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "SRC_H": 256 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_X": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_Y": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_W": 256 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_H": 256 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "FB_ID": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "CRTC_ID": 0 Apr 20 14:53:27 TARDIS kwin_wayland[259273]: kwin_wayland_drm: "IN_FORMATS": 39 I have done a perf record (w/ call graph recording), that shows were the time is spent. I will attach it to this bug (and hope it does not contain any sensitive data). If there is anything further I can do to help, please just let me know... -- You are receiving this mail because: You are watching all bug changes.