Package: release.debian.org Severity: normal Tags: trixie X-Debbugs-Cc: [email protected], [email protected] Control: affects -1 + src:qt6-base User: [email protected] Usertags: pu
Hi Release Team, [ Reason ] When the screen gets locked in the Plasma 6 X11 session, it results in a very high CPU load until the screen is unlocked again. The Wayland session is not affected by this. The bug was reported originally at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1111957 and has since been fixed in both unstable and testing. [ Impact ] Users face very high CPU loads when locking their screen under Plasma 6 X11. [ Tests ] The patch comes from upstream and has gone through the usual Qt quality assurance. In addition, I experienced this bug myself and can confirm that the patch fixes the issue. [ Risks ] The risks are very low. The patch is trivial (2 lines are removed), comes directly from upstream and I have verified it myself. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in (old)stable [x] the issue is verified as fixed in unstable [ Changes ] Addad a 2-line patch that fixes the above-described issue. Thank you. -- Med vänliga hälsningar Patrick Franz
diff -Nru qt6-base-6.8.2+dfsg/debian/changelog qt6-base-6.8.2+dfsg/debian/changelog --- qt6-base-6.8.2+dfsg/debian/changelog 2025-07-18 15:28:20.000000000 +0200 +++ qt6-base-6.8.2+dfsg/debian/changelog 2025-09-02 21:04:45.000000000 +0200 @@ -1,3 +1,10 @@ +qt6-base (6.8.2+dfsg-9+deb13u1) trixie; urgency=medium + + * Backport patch to fix high CPU load of kwin_x11 when locking the + screen. + + -- Patrick Franz <[email protected]> Tue, 02 Sep 2025 21:04:45 +0200 + qt6-base (6.8.2+dfsg-9) unstable; urgency=medium [ Patrick Franz ] diff -Nru qt6-base-6.8.2+dfsg/debian/patches/series qt6-base-6.8.2+dfsg/debian/patches/series --- qt6-base-6.8.2+dfsg/debian/patches/series 2025-07-18 15:26:54.000000000 +0200 +++ qt6-base-6.8.2+dfsg/debian/patches/series 2025-09-02 21:03:17.000000000 +0200 @@ -1,6 +1,7 @@ # fixed in 6.8.4/6.9.2 upstream_QColorTransferGeneric_fix_BT2100PQEOTF.patch upstream_cve-2025-5992_input_range_qcolortransformation.diff +upstream_fix_high_cpu_load_kwin_x11.diff # fixed in 6.9.1 upstream_prevent_recursion_in_qsortfilterproxymodel.diff diff -Nru qt6-base-6.8.2+dfsg/debian/patches/upstream_fix_high_cpu_load_kwin_x11.diff qt6-base-6.8.2+dfsg/debian/patches/upstream_fix_high_cpu_load_kwin_x11.diff --- qt6-base-6.8.2+dfsg/debian/patches/upstream_fix_high_cpu_load_kwin_x11.diff 1970-01-01 01:00:00.000000000 +0100 +++ qt6-base-6.8.2+dfsg/debian/patches/upstream_fix_high_cpu_load_kwin_x11.diff 2025-08-24 13:08:47.000000000 +0200 @@ -0,0 +1,49 @@ +From e2b88612e5c8dfc3f4bf416dff7b1af3e1e4f0f6 Mon Sep 17 00:00:00 2001 +From: Vlad Zahorodnii <[email protected]> +Date: Sun, 27 Jul 2025 15:58:31 +0300 +Subject: [PATCH] XCB: Remove extra xcb_randr_select_input() calls + +This fixes high CPU usage in kwin. + +If there is a ConfigureNotify event for the root window, QtXCB will +call xcb_randr_select_input(). The problem is that the X server may send +an output change event in response to xcb_randr_select_input(). + +When kwin sees that output change event, it will process the event and +it can update its override redirect windows, which can produce a few +ConfigureNotify events for the root window and make kwin get stuck in an +update loop. + +Since the QXcbConnection constructor already subscribes to the RandR +events, these xcb_randr_select_input() function calls can be removed. +Also, `true` is not a valid argument for xcb_randr_select_input(). It +expects a mask of events to listen. For what it's worth, `true` +corresponds to XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE = 1, which +xrandrSelectEvents() already subscribes to. + +Pick-to: 6.10 6.9 6.8 +Change-Id: I950a0a6e2e34822ac3da8cd69b96670e4bf4b07d +Reviewed-by: Liang Qi <[email protected]> +--- + +diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp +index 2f00615..c1b8f84 100644 +--- a/src/plugins/platforms/xcb/qxcbscreen.cpp ++++ b/src/plugins/platforms/xcb/qxcbscreen.cpp +@@ -499,7 +499,6 @@ + , m_cursor(std::make_unique<QXcbCursor>(connection, this)) + { + if (connection->isAtLeastXRandR12()) { +- xcb_randr_select_input(xcb_connection(), screen()->root, true); + auto crtc = Q_XCB_REPLY_UNCHECKED(xcb_randr_get_crtc_info, xcb_connection(), + m_crtc, output ? output->timestamp : 0); + if (crtc) { +@@ -605,8 +604,6 @@ + return; + } + +- xcb_randr_select_input(xcb_connection(), screen()->root, true); +- + m_monitor = monitorInfo; + qCDebug(lcQpaScreen) << "xcb_randr_monitor_info_t: primary=" << m_monitor->primary << ", x=" << m_monitor->x << ", y=" << m_monitor->y + << ", width=" << m_monitor->width << ", height=" << m_monitor->height

