From 38d773ca46c5f9af9bb0b09da456591378941f4a Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 17 Jul 2023 23:12:03 +0800 Subject: [PATCH] Change default power management to Gnome Session Manager As seen on https://www.freedesktop.org/wiki/Specifications/power-management-spec/, the `org.freedesktop.PowerManagement` is obsolete. --- src/gui/powermanagement/powermanagement_x11.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/powermanagement/powermanagement_x11.cpp b/src/gui/powermanagement/powermanagement_x11.cpp index bfdb9da0b..c50b99bc3 100644 --- a/src/gui/powermanagement/powermanagement_x11.cpp +++ b/src/gui/powermanagement/powermanagement_x11.cpp @@ -48,7 +48,7 @@ PowerManagementInhibitor::PowerManagementInhibitor(QObject *parent) m_intendedState = Idle; m_cookie = 0; - m_useGSM = false; + m_useGSM = true; } void PowerManagementInhibitor::requestIdle() @@ -135,9 +135,9 @@ void PowerManagementInhibitor::onAsyncReply(QDBusPendingCallWatcher *call) if (reply.isError()) { qDebug("D-Bus: Reply: Error: %s", qUtf8Printable(reply.error().message())); - if (!m_useGSM) { - qDebug("D-Bus: Falling back to org.gnome.SessionManager"); - m_useGSM = true; + if (m_useGSM) { + qDebug("D-Bus: Falling back to org.freedesktop.PowerManagement"); + m_useGSM = false; m_state = Idle; if (m_intendedState == Busy) requestBusy();