diff --git a/powerdevil-5.21.5-systemd-248.patch b/powerdevil-5.21.5-systemd-248.patch new file mode 100644 index 0000000..fa07d83 --- /dev/null +++ b/powerdevil-5.21.5-systemd-248.patch @@ -0,0 +1,34 @@ +From d7c1181a5736bc5c6b2585fb0df9065510efcd7c Mon Sep 17 00:00:00 2001 +From: Yaroslav Sidlovsky +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 session = m_managerIface.data()->asyncCall(QLatin1String("GetSessionByPID"), (quint32) QCoreApplication::applicationPid()); ++ QDBusPendingReply session = m_managerIface.data()->asyncCall(QLatin1String("GetSession"), QLatin1String("auto")); + session.waitForFinished(); + + if (!session.isValid()) { +-- +GitLab + diff --git a/powerdevil.spec b/powerdevil.spec index 54f7705..d28f86e 100644 --- a/powerdevil.spec +++ b/powerdevil.spec @@ -2,7 +2,7 @@ Name: powerdevil Version: 5.21.5 -Release: 1mamba +Release: 2mamba Summary: KDE Plasma 5 power management Group: Graphical Desktop/Applications/Configuration Vendor: openmamba @@ -11,14 +11,14 @@ Packager: Silvan Calarco URL: https://www.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 License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel -BuildRequires: ldconfig BuildRequires: libbluez-qt-devel BuildRequires: libddcutil-devel BuildRequires: libgcc -BuildRequires: libkactivities5-devel +BuildRequires: libkactivities-devel BuildRequires: libkauth-devel BuildRequires: libkcodecs-devel BuildRequires: libkcompletion-devel @@ -38,6 +38,7 @@ BuildRequires: libkscreen-devel BuildRequires: libkservice-devel BuildRequires: libkwayland-devel BuildRequires: libkwidgetsaddons-devel +BuildRequires: libkwindowsystem-devel BuildRequires: libkxmlgui-devel BuildRequires: libnetworkmanager-qt5-devel BuildRequires: libplasma-workspace-devel @@ -68,6 +69,7 @@ This package contains shared libraries for %{name}. %prep %setup -q #%patch0 -p1 +%patch1 -p1 %build %cmake_kde5 -d build \ @@ -112,6 +114,9 @@ This package contains shared libraries for %{name}. %{_libexecdir}/org_kde_powerdevil %changelog +* Mon May 10 2021 Silvan Calarco 5.21.5-2mamba +- patched to fix power button actions, see https://bugs.kde.org/show_bug.cgi?id=433408 + * Wed May 05 2021 Automatic Build System 5.21.5-1mamba - automatic version update by autodist