From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kscreen/files/, kde-plasma/kscreen/
Date: Mon, 30 May 2022 16:09:33 +0000 (UTC) [thread overview]
Message-ID: <1653926943.591b28d3c215f9bab4ee3cc77087191b3403a08a.asturm@gentoo> (raw)
commit: 591b28d3c215f9bab4ee3cc77087191b3403a08a
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon May 30 15:25:40 2022 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon May 30 16:09:03 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=591b28d3
kde-plasma/kscreen: X11: fix kded xcb resource leak
Upstream commit 93cfd297506e4106a7b6e7bcc649442c5bf0f7d1
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=453280
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
...screen-5.24.5-fix-kded-xcb-resources-leak.patch | 61 ++++++++++++++++++++++
kde-plasma/kscreen/kscreen-5.24.5-r2.ebuild | 53 +++++++++++++++++++
2 files changed, 114 insertions(+)
diff --git a/kde-plasma/kscreen/files/kscreen-5.24.5-fix-kded-xcb-resources-leak.patch b/kde-plasma/kscreen/files/kscreen-5.24.5-fix-kded-xcb-resources-leak.patch
new file mode 100644
index 000000000000..ecba1664c51c
--- /dev/null
+++ b/kde-plasma/kscreen/files/kscreen-5.24.5-fix-kded-xcb-resources-leak.patch
@@ -0,0 +1,61 @@
+From 93cfd297506e4106a7b6e7bcc649442c5bf0f7d1 Mon Sep 17 00:00:00 2001
+From: Stefan Becker <chemobejk@gmail.com>
+Date: Sun, 29 May 2022 23:33:55 +0300
+Subject: [PATCH] X11: fix kded xcb resource leak
+
+This fixes commit 579358f501ae978aa527a25eb3ef9dd42557db46
+
+XOpenDisplay() internally calls xcb_connect(), creating a new XCB client
+connection. This means that on every KScreen configuration change event
+the kded5 process creates a new connection until XCB runs into the hard
+limit of 256 of clients, leading to the dreaded "Maximum number of
+clients reached" error.
+
+Re-use the display from QX11Info instead of calling XOpenDisplay().
+
+BUG: 453280
+
+
+(cherry picked from commit 0270a49328aa70b14dd08e2ed5a425ca3f8e4fd5)
+---
+ kded/daemon.cpp | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/kded/daemon.cpp b/kded/daemon.cpp
+index e8ed4ac..443d98d 100644
+--- a/kded/daemon.cpp
++++ b/kded/daemon.cpp
+@@ -361,6 +361,14 @@ void KScreenDaemon::alignX11TouchScreen()
+ if (qGuiApp->platformName() != QStringLiteral("xcb")) {
+ return;
+ }
++ auto *display = QX11Info::display();
++ if (!display) {
++ return;
++ }
++ auto *connection = QX11Info::connection();
++ if (!connection) {
++ return;
++ }
+
+ const QRect totalRect(QPoint(0, 0), m_monitoredConfig->data()->screen()->currentSize());
+ QRect internalOutputRect;
+@@ -411,15 +419,6 @@ void KScreenDaemon::alignX11TouchScreen()
+ break;
+ }
+
+- auto *display = XOpenDisplay(nullptr);
+- if (!display) {
+- return;
+- }
+- auto *connection = QX11Info::connection();
+- if (!connection) {
+- return;
+- }
+-
+ auto getAtom = [](xcb_connection_t *connection, const char *name) {
+ auto cookie = xcb_intern_atom(connection, true, strlen(name), name);
+ auto reply = xcb_intern_atom_reply(connection, cookie, nullptr);
+--
+GitLab
+
diff --git a/kde-plasma/kscreen/kscreen-5.24.5-r2.ebuild b/kde-plasma/kscreen/kscreen-5.24.5-r2.ebuild
new file mode 100644
index 000000000000..400f3ae8d7a2
--- /dev/null
+++ b/kde-plasma/kscreen/kscreen-5.24.5-r2.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="forceoptional"
+KFMIN=5.90.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+inherit ecm kde.org
+
+DESCRIPTION="KDE Plasma screen management"
+HOMEPAGE="https://invent.kde.org/plasma/kscreen"
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE=""
+
+# bug #580440, last checked 5.6.3
+RESTRICT="test"
+
+DEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5[widgets]
+ >=dev-qt/qtgui-${QTMIN}:5
+ >=dev-qt/qtsensors-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ >=kde-frameworks/kcmutils-${KFMIN}:5
+ >=kde-frameworks/kconfig-${KFMIN}:5
+ >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+ >=kde-frameworks/kcoreaddons-${KFMIN}:5
+ >=kde-frameworks/kdeclarative-${KFMIN}:5
+ >=kde-frameworks/kdbusaddons-${KFMIN}:5
+ >=kde-frameworks/kglobalaccel-${KFMIN}:5
+ >=kde-frameworks/ki18n-${KFMIN}:5
+ >=kde-frameworks/kiconthemes-${KFMIN}:5
+ >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+ >=kde-frameworks/kxmlgui-${KFMIN}:5
+ >=kde-frameworks/plasma-${KFMIN}:5
+ >=kde-plasma/libkscreen-${PVCUT}:5
+"
+RDEPEND="${DEPEND}
+ >=dev-qt/qtgraphicaleffects-${QTMIN}:5
+ >=kde-plasma/kde-cli-tools-${PVCUT}:5
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-kcm-fix-refresh-rate-list-not-updated.patch" # KDE-bug 453392
+ "${FILESDIR}/${P}-kcm-fix-choosing-refresh-rate.patch"
+ "${FILESDIR}/${P}-fix-connect-ext-monitors-when-a-monitor-is-rotated.patch"
+ "${FILESDIR}/${P}-fix-kded-xcb-resources-leak.patch" # KDE-bug 453280
+)
next reply other threads:[~2022-05-30 16:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 16:09 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-09-19 15:27 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kscreen/files/, kde-plasma/kscreen/ Andreas Sturmlechner
2023-04-18 17:40 Andreas Sturmlechner
2023-03-28 20:33 Andreas Sturmlechner
2021-11-23 14:59 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1653926943.591b28d3c215f9bab4ee3cc77087191b3403a08a.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox