summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'kde-plasma')
-rw-r--r--kde-plasma/ksystemstats/Manifest1
-rw-r--r--kde-plasma/ksystemstats/files/ksystemstats-5.27.6-nvidia-data-fields.patch131
-rw-r--r--kde-plasma/ksystemstats/ksystemstats-5.27.6-r1.ebuild48
3 files changed, 0 insertions, 180 deletions
diff --git a/kde-plasma/ksystemstats/Manifest b/kde-plasma/ksystemstats/Manifest
index 7c9a5135b0b6..d0051b5d5bf5 100644
--- a/kde-plasma/ksystemstats/Manifest
+++ b/kde-plasma/ksystemstats/Manifest
@@ -1,2 +1 @@
-DIST ksystemstats-5.27.6.tar.xz 116232 BLAKE2B 1b9ef600ac13b9e925d12a9c936fbf06b106c5e203ea1c17da511a9611171a833135d62eedfa2c279c5af25ba920a7b3ca480038d0ebe69b78008de701bf5216 SHA512 1ecaffa1642d8761993606be938efd183dc0de39f8d15cb19fc96871fe6d5de03628e0bf5cffe59bdb32283f66890a7783de04ebc7da4960e3f90104f15bd5ba
DIST ksystemstats-5.27.7.tar.xz 116584 BLAKE2B bed1e8652ab91211a5f7a2a31d74fe685fdd915e89feb8e5b6a6b7743e942fe1f7d0102ce27abdc0e028396dc851d622fb250c194b14699e9f2f7cc1c86e6d73 SHA512 58dc0e61294ef23d1e4feb430872f47bb90e544cc12163dba917e8bcce5b9aa1248347203488c530eb56a56d41a3631ba3c971edda5b17ed3e74cddd81083625
diff --git a/kde-plasma/ksystemstats/files/ksystemstats-5.27.6-nvidia-data-fields.patch b/kde-plasma/ksystemstats/files/ksystemstats-5.27.6-nvidia-data-fields.patch
deleted file mode 100644
index 718bbd8c64e2..000000000000
--- a/kde-plasma/ksystemstats/files/ksystemstats-5.27.6-nvidia-data-fields.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From 4f7213e6e742b993feeaf300181a67923e60c0f4 Mon Sep 17 00:00:00 2001
-From: David Redondo <kde@david-redondo.de>
-Date: Wed, 10 May 2023 02:26:29 +0000
-Subject: [PATCH] gpu/nvidia: Discover data fields based on headers
-
-This guards us against the appearance of new fields or if they
-ever appear in a different order.
-BUG:470474
-FIXED-IN:5.27.7
-
-(cherry picked from commit 7f9ead6bddfdf6f13a1ea48791f8f5d5c80c6980)
-Because in Qt5 QVector<T>::indexOf only takes T's we have to provide
-our own indexOf here.
----
- plugins/gpu/NvidiaSmiProcess.cpp | 56 ++++++++++++++++++++++----------
- plugins/gpu/NvidiaSmiProcess.h | 14 ++++++++
- 2 files changed, 53 insertions(+), 17 deletions(-)
-
-diff --git a/plugins/gpu/NvidiaSmiProcess.cpp b/plugins/gpu/NvidiaSmiProcess.cpp
-index 7f8dd62..d92b396 100644
---- a/plugins/gpu/NvidiaSmiProcess.cpp
-+++ b/plugins/gpu/NvidiaSmiProcess.cpp
-@@ -155,19 +155,37 @@ void NvidiaSmiProcess::unref()
- void NvidiaSmiProcess::readStatisticsData()
- {
- while (m_process->canReadLine()) {
-- const QString line = m_process->readLine();
-- if (line.startsWith(QLatin1Char('#'))) {
-- continue;
-- }
-+ QString line = m_process->readLine();
- #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-- const QVector<QStringRef> parts = QStringRef(&line).trimmed().split(QLatin1Char(' '), Qt::SkipEmptyParts);
-+ QVector<QStringRef> parts = QStringRef(&line).trimmed().split(QLatin1Char(' '), Qt::SkipEmptyParts);
- #else
-- const QVector<QStringView> parts = QStringView(line).trimmed().split(QLatin1Char(' '), Qt::SkipEmptyParts);
-+ QVector<QStringView> parts = QStringView(line).trimmed().split(QLatin1Char(' '), Qt::SkipEmptyParts);
- #endif
--
-- // format at time of writing is
-- // # gpu pwr gtemp mtemp sm mem enc dec mclk pclk fb bar1
-- if (parts.count() != 12) {
-+ // Because in Qt5 indexOf of QVector<T> only takes T's, write our own indexOf taking arbitrary types
-+ auto indexOf = [](const auto &stack, const auto& needle) {
-+ auto it = std::find(stack.cbegin(), stack.cend(), needle);
-+ return it != stack.cend() ? std::distance(stack.cbegin(), it) : -1;
-+ };
-+
-+ // discover index of fields in the header format is something like
-+ //# gpu pwr gtemp mtemp sm mem enc dec mclk pclk fb bar1
-+ // # Idx W C C % % % % MHz MHz MB MB
-+ // 0 25 29 - 1 1 0 0 4006 1506 891 22
-+ if (line.startsWith(QLatin1Char('#'))) {
-+ if (m_dmonIndices.gpu == -1) {
-+ // Remove First part because of leading '# ';
-+ parts.removeFirst();
-+ m_dmonIndices.gpu = indexOf(parts, QLatin1String("gpu"));
-+ m_dmonIndices.power = indexOf(parts, QLatin1String("pwr"));
-+ m_dmonIndices.gtemp = indexOf(parts, QLatin1String("gtemp"));
-+ m_dmonIndices.sm = indexOf(parts, QLatin1String("sm"));
-+ m_dmonIndices.enc = indexOf(parts, QLatin1String("enc"));
-+ m_dmonIndices.dec = indexOf(parts, QLatin1String("dec"));
-+ m_dmonIndices.fb = indexOf(parts, QLatin1String("fb"));
-+ m_dmonIndices.bar1 = indexOf(parts, QLatin1String("bar1"));
-+ m_dmonIndices.mclk = indexOf(parts, QLatin1String("mclk"));
-+ m_dmonIndices.pclk = indexOf(parts, QLatin1String("pclk"));
-+ }
- continue;
- }
-
-@@ -177,19 +195,23 @@ void NvidiaSmiProcess::readStatisticsData()
- continue;
- }
-
-+ auto readDataIfFound = [&parts, this] (int index) {
-+ return index > 0 ? parts[index].toUInt() : 0;
-+ };
-+
- GpuData data;
-- data.index = index;
-- data.power = parts[1].toUInt();
-- data.temperature = parts[2].toUInt();
-+ data.index = readDataIfFound(m_dmonIndices.gpu);
-+ data.power = readDataIfFound(m_dmonIndices.power);
-+ data.temperature = readDataIfFound(m_dmonIndices.gtemp);
-
- // GPU usage equals "SM" usage + "ENC" usage + "DEC" usage
-- data.usage = parts[4].toUInt() + parts[6].toUInt() + parts[7].toUInt();
-+ data.usage = readDataIfFound(m_dmonIndices.sm) + readDataIfFound(m_dmonIndices.enc) + readDataIfFound(m_dmonIndices.dec);
-
- // Total memory used equals "FB" usage + "BAR1" usage
-- data.memoryUsed = parts[10].toUInt() + parts[11].toUInt();
-+ data.memoryUsed = readDataIfFound(m_dmonIndices.fb) + readDataIfFound(m_dmonIndices.bar1);
-
-- data.memoryFrequency = parts[8].toUInt();
-- data.coreFrequency = parts[9].toUInt();
-+ data.memoryFrequency = readDataIfFound(m_dmonIndices.mclk);
-+ data.coreFrequency = readDataIfFound(m_dmonIndices.pclk);
-
- Q_EMIT dataReceived(data);
- }
-diff --git a/plugins/gpu/NvidiaSmiProcess.h b/plugins/gpu/NvidiaSmiProcess.h
-index f39cc9d..2cd8504 100644
---- a/plugins/gpu/NvidiaSmiProcess.h
-+++ b/plugins/gpu/NvidiaSmiProcess.h
-@@ -49,8 +49,22 @@ public:
- private:
- void readStatisticsData();
-
-+ struct dmonIndices {
-+ int gpu = -1;
-+ int gtemp = -1;
-+ int power = -1;
-+ int sm = -1;
-+ int enc = -1;
-+ int dec = -1;
-+ int fb = -1;
-+ int bar1 = -1;
-+ int mclk = -1;
-+ int pclk = -1;
-+ };
-+
- QString m_smiPath;
- std::vector<GpuQueryResult> m_queryResult;
- std::unique_ptr<QProcess> m_process = nullptr;
- int m_references = 0;
-+ dmonIndices m_dmonIndices;
- };
---
-GitLab
-
diff --git a/kde-plasma/ksystemstats/ksystemstats-5.27.6-r1.ebuild b/kde-plasma/ksystemstats/ksystemstats-5.27.6-r1.ebuild
deleted file mode 100644
index d300cb176686..000000000000
--- a/kde-plasma/ksystemstats/ksystemstats-5.27.6-r1.ebuild
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ECM_HANDBOOK="forceoptional"
-ECM_TEST="forceoptional"
-KFMIN=5.106.0
-PVCUT=$(ver_cut 1-3)
-QTMIN=5.15.9
-VIRTUALX_REQUIRED="test" # bug 909312 (test fails)
-inherit ecm plasma.kde.org virtualx
-
-DESCRIPTION="Plugin-based system monitoring daemon"
-
-LICENSE="GPL-2+"
-SLOT="5"
-KEYWORDS="amd64 ~arm arm64 ~loong ~ppc64 ~riscv x86"
-IUSE="networkmanager"
-
-DEPEND="
- dev-libs/libnl:3
- >=dev-qt/qtdbus-${QTMIN}:5
- >=dev-qt/qtnetwork-${QTMIN}:5
- >=kde-frameworks/kcoreaddons-${KFMIN}:5
- >=kde-frameworks/kdbusaddons-${KFMIN}:5
- >=kde-frameworks/ki18n-${KFMIN}:5
- >=kde-frameworks/kio-${KFMIN}:5
- >=kde-frameworks/solid-${KFMIN}:5
- >=kde-plasma/libksysguard-${PVCUT}:5
- net-libs/libpcap
- sys-apps/lm-sensors:=
- sys-libs/libcap
- virtual/libudev:=
- networkmanager? ( >=kde-frameworks/networkmanager-qt-${KFMIN}:5 )
-"
-RDEPEND="${DEPEND}
- !<kde-plasma/ksysguard-5.21.90:5
-"
-
-PATCHES=( "${FILESDIR}/${P}-nvidia-data-fields.patch" ) # KDE-bug 470474
-
-src_configure() {
- local mycmakeargs=(
- $(cmake_use_find_package networkmanager KF5NetworkManagerQt)
- )
- ecm_src_configure
-}