summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-05-25 21:28:10 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2022-05-25 23:10:09 +0200
commitdbcebe7e36a1dbcf4215599ac69e93322383a641 (patch)
treee8cdda5ac8f011562c77250bcc124a1093aa33f1 /kde-plasma/libksysguard/files
parentdev-lang/rust: add llvm patches to 1.61.0 to fix SIGFPE (diff)
downloadgentoo-dbcebe7e36a1dbcf4215599ac69e93322383a641.tar.gz
gentoo-dbcebe7e36a1dbcf4215599ac69e93322383a641.tar.bz2
gentoo-dbcebe7e36a1dbcf4215599ac69e93322383a641.zip
kde-plasma/libksysguard: Backport several 5.24.6 fixes
Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-plasma/libksysguard/files')
-rw-r--r--kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-gpu-sensors.patch32
-rw-r--r--kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-1.patch35
-rw-r--r--kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-2.patch43
3 files changed, 110 insertions, 0 deletions
diff --git a/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-gpu-sensors.patch b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-gpu-sensors.patch
new file mode 100644
index 000000000000..bf81b8bf68eb
--- /dev/null
+++ b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-gpu-sensors.patch
@@ -0,0 +1,32 @@
+From 88722b18c92f3a688a69abef9022cbcdcb5163bb Mon Sep 17 00:00:00 2001
+From: David Redondo <kde@david-redondo.de>
+Date: Fri, 29 Apr 2022 13:59:38 +0200
+Subject: [PATCH] Fall back to power average if input is not available
+
+Some power sensors don't expose a current value most notably amdgpu.
+For those fall back to the average reading if available.
+BUG:445920
+
+
+(cherry picked from commit 7758d202eed28169c031e099e408ea258469e408)
+---
+ systemstats/SensorsFeatureSensor.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/systemstats/SensorsFeatureSensor.cpp b/systemstats/SensorsFeatureSensor.cpp
+index 6c8bdb34..3555115f 100644
+--- a/systemstats/SensorsFeatureSensor.cpp
++++ b/systemstats/SensorsFeatureSensor.cpp
+@@ -95,6 +95,9 @@ makeSensorsFeatureSensor(const QString &id, const sensors_chip_name *const chipN
+ break;
+ case SENSORS_FEATURE_POWER:
+ valueFeature = sensors_get_subfeature(chipName, feature, SENSORS_SUBFEATURE_POWER_INPUT);
++ if (!valueFeature) {
++ valueFeature = sensors_get_subfeature(chipName, feature, SENSORS_SUBFEATURE_POWER_AVERAGE);
++ }
+ unit = UnitWatt;
+ maximum = getValueOfFirstExisting({SENSORS_SUBFEATURE_POWER_CRIT, SENSORS_SUBFEATURE_POWER_MAX});
+ break;
+--
+GitLab
+
diff --git a/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-1.patch b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-1.patch
new file mode 100644
index 000000000000..61b981734fa7
--- /dev/null
+++ b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-1.patch
@@ -0,0 +1,35 @@
+From b94b0e11f9c0f718f109f37dad8a889301f3a59a Mon Sep 17 00:00:00 2001
+From: Arjen Hiemstra <ahiemstra@heimr.nl>
+Date: Mon, 9 May 2022 19:05:06 +0200
+Subject: [PATCH] Faces: Write preset faceproperties to the right location
+
+When loading presets we expect the faceproperties file to be located in
+"contents/config/" but when writing we are placing it in "contents/"
+which means that custom presets are not loaded properly.
+
+BUG: 450745
+
+
+(cherry picked from commit 05866a594198d8c76814d8cd4eb3e83cc9123c8d)
+---
+ faces/SensorFaceController.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/faces/SensorFaceController.cpp b/faces/SensorFaceController.cpp
+index d3daa87d..21fb2954 100644
+--- a/faces/SensorFaceController.cpp
++++ b/faces/SensorFaceController.cpp
+@@ -938,8 +938,8 @@ void SensorFaceController::savePreset()
+ cg.sync();
+
+ QDir subDir(dir.path());
+- subDir.mkdir(QStringLiteral("contents"));
+- KConfig faceConfig(subDir.path() % QStringLiteral("/contents/faceproperties"));
++ subDir.mkpath(QStringLiteral("contents/config"));
++ KConfig faceConfig(subDir.path() % QStringLiteral("/contents/config/faceproperties"));
+
+ KConfigGroup configGroup(&faceConfig, "Config");
+ configGroup.writeEntry(QStringLiteral("totalSensors"), QJsonDocument(totalSensors()).toJson(QJsonDocument::Compact));
+--
+GitLab
+
diff --git a/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-2.patch b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-2.patch
new file mode 100644
index 000000000000..35bf11ee6431
--- /dev/null
+++ b/kde-plasma/libksysguard/files/libksysguard-5.24.5-fix-missing-selfmade-presets-2.patch
@@ -0,0 +1,43 @@
+From 0d06f3fdda71e87d70a4ca8d45af6badb3ab4ee1 Mon Sep 17 00:00:00 2001
+From: Arjen Hiemstra <ahiemstra@heimr.nl>
+Date: Mon, 9 May 2022 19:08:10 +0200
+Subject: [PATCH] Faces: Do not write resolved sensors to preset file
+
+The three sensor properties of FaceController contain the resolved
+sensors. This means we are not writing group regular expressions to face
+presets but are wiriting only the local sensors that were found for that
+group, pretty much bypassing why we have the groups in the first place.
+The unresolved sensors are only contained in the sensor configuration,
+so read them from there and write that to the preset faceproperties.
+
+
+(cherry picked from commit 1ea0671de11ea51aa2e181deafb70d8da588a2af)
+---
+ faces/SensorFaceController.cpp | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/faces/SensorFaceController.cpp b/faces/SensorFaceController.cpp
+index 21fb2954..632b7dd4 100644
+--- a/faces/SensorFaceController.cpp
++++ b/faces/SensorFaceController.cpp
+@@ -942,9 +942,14 @@ void SensorFaceController::savePreset()
+ KConfig faceConfig(subDir.path() % QStringLiteral("/contents/config/faceproperties"));
+
+ KConfigGroup configGroup(&faceConfig, "Config");
+- configGroup.writeEntry(QStringLiteral("totalSensors"), QJsonDocument(totalSensors()).toJson(QJsonDocument::Compact));
+- configGroup.writeEntry(QStringLiteral("highPrioritySensorIds"), QJsonDocument(highPrioritySensorIds()).toJson(QJsonDocument::Compact));
+- configGroup.writeEntry(QStringLiteral("lowPrioritySensorIds"), QJsonDocument(lowPrioritySensorIds()).toJson(QJsonDocument::Compact));
++
++ auto sensors = d->readAndUpdateSensors(d->sensorsGroup, QStringLiteral("totalSensors"));
++ configGroup.writeEntry(QStringLiteral("totalSensors"), QJsonDocument(sensors).toJson(QJsonDocument::Compact));
++ sensors = d->readAndUpdateSensors(d->sensorsGroup, QStringLiteral("highPrioritySensorIds"));
++ configGroup.writeEntry(QStringLiteral("highPrioritySensorIds"), QJsonDocument(sensors).toJson(QJsonDocument::Compact));
++ sensors = d->readAndUpdateSensors(d->sensorsGroup, QStringLiteral("lowPrioritySensorIds"));
++ configGroup.writeEntry(QStringLiteral("lowPrioritySensorIds"), QJsonDocument(sensors).toJson(QJsonDocument::Compact));
++ configGroup.writeEntry(QStringLiteral("chartFace"), faceId());
+
+ KConfigGroup colorsGroup(&faceConfig, "SensorColors");
+ d->colorsGroup.copyTo(&colorsGroup);
+--
+GitLab
+