patched to fix crash seend with ddcutil 2.1.0 [release 5.27.10-2mamba;Thu Jan 25 2024]

This commit is contained in:
Silvan Calarco 2024-01-26 01:28:05 +01:00
parent 0f347e2f70
commit 032e1ec20e
4 changed files with 19 additions and 50 deletions

View File

@ -1,11 +0,0 @@
--- powerdevil-5.19.5/daemon/backends/upower/ddcutilbrightness.cpp.orig 2020-09-02 09:38:36.855000000 +0200
+++ powerdevil-5.19.5/daemon/backends/upower/ddcutilbrightness.cpp 2020-09-02 09:37:12.911000000 +0200
@@ -56,7 +56,7 @@
DDCA_Feature_List vcpList;
ddca_get_feature_list_by_dref(DDCA_SUBSET_COLOR, dh, false, &vcpList);
- qCDebug(POWERDEVIL) << "ddca_feature_list: "<< ddca_feature_list_string(&vcpList, "0x", ",");
+ qCDebug(POWERDEVIL) << "ddca_feature_list: "<< ddca_feature_list_string(vcpList, "0x", ",");
QVector<uint16_t> tmpVcpList;
for (int iVcp = 0; iVcp < m_usedVcp.count(); ++iVcp) {
DDCA_Non_Table_Vcp_Value returnValue;

View File

@ -1,34 +0,0 @@
From d7c1181a5736bc5c6b2585fb0df9065510efcd7c Mon Sep 17 00:00:00 2001
From: Yaroslav Sidlovsky <zawertun@gmail.com>
Date: Wed, 5 May 2021 14:32:32 +0300
Subject: [PATCH] GetSessionByPID DBUS call always fails on newer systemd
versions
GetSessionByPID returns this error:
```
Error org.freedesktop.login1.NoSessionForPID: PID 2469 does not belong to any known session
```
So instead we will get session by calling GetSession("auto").
Tested on Fedora, should also work on openSUSE & KDE Neon.
BUG: 433408
---
daemon/powerdevilpolicyagent.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon/powerdevilpolicyagent.cpp b/daemon/powerdevilpolicyagent.cpp
index 653d1eef..d3993d78 100644
--- a/daemon/powerdevilpolicyagent.cpp
+++ b/daemon/powerdevilpolicyagent.cpp
@@ -236,7 +236,7 @@ void PolicyAgent::onSessionHandlerRegistered(const QString & serviceName)
return;
}
- QDBusPendingReply<QDBusObjectPath> session = m_managerIface.data()->asyncCall(QLatin1String("GetSessionByPID"), (quint32) QCoreApplication::applicationPid());
+ QDBusPendingReply<QDBusObjectPath> session = m_managerIface.data()->asyncCall(QLatin1String("GetSession"), QLatin1String("auto"));
session.waitForFinished();
if (!session.isValid()) {
--
GitLab

View File

@ -0,0 +1,12 @@
diff -Nru powerdevil-5.27.10.orig/daemon/backends/upower/ddcutilbrightness.cpp powerdevil-5.27.10/daemon/backends/upower/ddcutilbrightness.cpp
--- powerdevil-5.27.10.orig/daemon/backends/upower/ddcutilbrightness.cpp 2023-12-05 20:23:32.000000000 +0100
+++ powerdevil-5.27.10/daemon/backends/upower/ddcutilbrightness.cpp 2024-01-25 21:54:50.855340922 +0100
@@ -49,7 +49,7 @@
qCDebug(POWERDEVIL) << "Check for monitors using ddca_get_displays()...";
// Inquire about detected monitors.
DDCA_Display_Info_List * dlist = nullptr;
- ddca_get_display_info_list2(true, &dlist);
+ ddca_get_display_info_list2(false, &dlist);
qCInfo(POWERDEVIL) << "[DDCutilBrightness] " << dlist->ct << "display(s) were detected";
for (const DDCA_Display_Handle displayHandle : std::as_const(m_displayHandleList)) {

View File

@ -2,7 +2,7 @@
Name: powerdevil
Version: 5.27.10
Release: 1mamba
Release: 2mamba
Summary: KDE Plasma 5 power management
Group: Graphical Desktop/Applications/Configuration
Vendor: openmamba
@ -10,8 +10,7 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://kde.org/
Source: https://download.kde.org/stable/plasma/%{plasmaver}/powerdevil-%{version}.tar.xz
Patch0: powerdevil-5.19.5-libddcutil-0.9.9.patch
Patch1: powerdevil-5.21.5-systemd-248.patch
Patch0: powerdevil-5.27.10-ddcutil-2.1.0.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -73,8 +72,8 @@ This package contains shared libraries for %{name}.
%prep
%setup -q
#-D -T
#%patch0 -p1
#%patch1 -p1
%patch 0 -p1
%build
#:<< _EOF
@ -122,6 +121,9 @@ This package contains shared libraries for %{name}.
%{_libexecdir}/org_kde_powerdevil
%changelog
* Thu Jan 25 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 5.27.10-2mamba
- patched to fix crash seend with ddcutil 2.1.0
* Thu Dec 07 2023 Automatic Build System <autodist@mambasoft.it> 5.27.10-1mamba
- automatic version update by autodist