Fix a bug in the backported patch (thanks Natalie, the original author)

epel9
Adam Williamson 1 year ago
parent d0c8ba538e
commit 6a57ca0cc4

@ -1,4 +1,4 @@
From 34f7c9315edf734a442bbf1ecf7f2264cc67c553 Mon Sep 17 00:00:00 2001
From ce233c616d8ec5141e24d4962739040b4c99d989 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Fri, 1 Sep 2023 17:09:16 -0700
Subject: [PATCH] profiledefaults: don't automatically suspend by default if
@ -144,25 +144,25 @@ index 481caa73..6f5ffb48 100644
}
diff --git a/kcmodule/profiles/EditPage.cpp b/kcmodule/profiles/EditPage.cpp
index 22ed5d0e..bb4bfb80 100644
index 22ed5d0e..119d818e 100644
--- a/kcmodule/profiles/EditPage.cpp
+++ b/kcmodule/profiles/EditPage.cpp
@@ -80,6 +80,7 @@ EditPage::EditPage(QWidget *parent, const QVariantList &args)
@@ -79,6 +79,7 @@ EditPage::EditPage(QWidget *parent, const QVariantList &args)
PowerDevil::ProfileGenerator::generateProfiles(
interface->isTabletMode(),
PowerDevil::PowerManagement::instance()->canSuspend(),
+ PowerDevil::PowerManagement::instance()->isVirtualMachine(),
PowerDevil::PowerManagement::instance()->canSuspend(),
PowerDevil::PowerManagement::instance()->canHibernate()
);
m_profilesConfig->reparseConfiguration();
@@ -199,6 +200,7 @@ void EditPage::restoreDefaultProfiles()
@@ -198,6 +199,7 @@ void EditPage::restoreDefaultProfiles()
PowerDevil::ProfileGenerator::generateProfiles(
interface->isTabletMode(),
PowerDevil::PowerManagement::instance()->canSuspend(),
+ PowerDevil::PowerManagement::instance()->isVirtualMachine(),
PowerDevil::PowerManagement::instance()->canSuspend(),
PowerDevil::PowerManagement::instance()->canHibernate()
);
--
2.41.0

@ -2,7 +2,7 @@
Name: powerdevil
Version: 5.27.7
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Manages the power consumption settings of a Plasma Shell
License: GPLv2+
@ -140,6 +140,9 @@ rm -fv %{buildroot}/%{_libdir}/libpowerdevil{configcommonprivate,core,ui}.so
%{_kf5_qtplugindir}/powerdevil/action/powerdevil_*.so
%changelog
* Fri Sep 01 2023 Adam Williamson <awilliam@redhat.com> - 5.27.7-3
- Fix a bug in the backported patch (thanks Natalie, the original author)
* Fri Sep 01 2023 Adam Williamson <awilliam@redhat.com> - 5.27.7-2
- Backport MR #230 to disable auto-suspend on VMs (#2232711)

Loading…
Cancel
Save