[neon/neon/settings/Neon/release-lts] etc/xdg/plasma-workspace/env: add env script to disable qt generic bearer plugin

Harald Sitter null at kde.org
Tue Nov 17 12:06:56 GMT 2020


Git commit ef0bade6f616d58b3b9c75d85088674d2f7de0fd by Harald Sitter.
Committed on 16/11/2020 at 12:10.
Pushed by sitter into branch 'Neon/release-lts'.

add env script to disable qt generic bearer plugin

the plugin always gets loaded and then polls interface states every 10
seconds for all processes that want to monitor online states via
qnetworkconfigurationmanager. an utter waste since we always have
networkmanager installed anyway.

disable the plugin via env var

A  +23   -0    etc/xdg/plasma-workspace/env/neon_no_qtbearer_generic.sh

https://invent.kde.org/neon/neon/settings/commit/ef0bade6f616d58b3b9c75d85088674d2f7de0fd

diff --git a/etc/xdg/plasma-workspace/env/neon_no_qtbearer_generic.sh b/etc/xdg/plasma-workspace/env/neon_no_qtbearer_generic.sh
new file mode 100644
index 0000000..fc7c2d1
--- /dev/null
+++ b/etc/xdg/plasma-workspace/env/neon_no_qtbearer_generic.sh
@@ -0,0 +1,23 @@
+# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
+# SPDX-FileCopyrightText: 2020 Harald Sitter <sitter at kde.org>
+
+# Disable the generic bearer plugin. This is in lieu of diverging packaging 
+# from debian as all bearers are in the same package but in reality the generic
+# bearer has no reason for being used *at all* on neon as we ship with network
+# manager.
+# The generic bearer plugin is a polling-based plugin that will check the
+# network interfaces via ioctl() every 10 seconds. This effectively causes every
+# application with a QNetworkManagerConfiguration instance (for online state
+# tracking) to wake up, and there are a lot of those around!
+# QtBearer always loads all available plugins rather than trying to find the
+# best fitting one, so generic is always loaded and always gets polled.
+# The env var disables the plugin.
+#
+# This gets some notable background daemons (discover, kdeconnect, kded) out of
+# the top 20 power consumers on an idle system.
+#
+# Some further context on the option:
+# https://codereview.qt-project.org/c/qt/qtbase/+/126219
+# https://bugreports.qt.io/browse/QTBUG-41866
+
+export QT_EXCLUDE_GENERIC_BEARER=1


More information about the Neon-commits mailing list