1
0

Compare commits

...

3 Commits

5 changed files with 23 additions and 70 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a030b25c4e86faab782a134cf7ac8e19d1e7edf2d2c0ed6f158750de10c1f8d5
size 66394

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a71f79e9cb1c184b7a8e25c3ae70d624ea4313edec3401495992c364b5f22599
size 66801

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Thu Jan 16 09:06:42 UTC 2025 - Thomas Renninger <trenn@suse.de>
- Introduce ppd-service as done by tuned-ppd and conflict with it
compare with fedora commit:
https://src.fedoraproject.org/rpms/power-profiles-daemon/c/
f6921ff236aecdf9726119ded97cb93215aa0232?branch=rawhide
-------------------------------------------------------------------
Mon Jan 13 09:54:13 UTC 2025 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 0.23:
* Bugfix release for a performance regression with users who
manually adjusted AMD dGPU settings using other software.
- Drop respect-dpm-manual.patch: incorporated upstream.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Sep 9 18:54:06 UTC 2024 - Enrico Belleri <kilgore.trout@idesmi.eu> Mon Sep 9 18:54:06 UTC 2024 - Enrico Belleri <kilgore.trout@idesmi.eu>

View File

@ -1,7 +1,7 @@
# #
# spec file for package power-profiles-daemon # spec file for package power-profiles-daemon
# #
# Copyright (c) 2024 SUSE LLC # Copyright (c) 2025 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,7 +17,7 @@
Name: power-profiles-daemon Name: power-profiles-daemon
Version: 0.22 Version: 0.23
Release: 0 Release: 0
Summary: Power profiles handling over D-Bus Summary: Power profiles handling over D-Bus
License: GPL-3.0-or-later License: GPL-3.0-or-later
@ -25,8 +25,6 @@ URL: https://gitlab.freedesktop.org/upower/power-profiles-daemon
Source: %{url}/-/archive/%{version}/%{name}-%{version}.tar.bz2 Source: %{url}/-/archive/%{version}/%{name}-%{version}.tar.bz2
# PATCH-FEATURE-OPENSUSE hold-profile-hardening.patch boo#1189900 -- Hardening of HoldProfile D-Bus method # PATCH-FEATURE-OPENSUSE hold-profile-hardening.patch boo#1189900 -- Hardening of HoldProfile D-Bus method
Patch0: hold-profile-hardening.patch Patch0: hold-profile-hardening.patch
# PATCH-FIX-UPSTREAM respect-dpm-manual.patch -- based on commit 21b58819 glfo#upower/power-profiles-daemon#163 : Don't override user settings for dpm if set to manual
Patch1: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/commit/21b58819edcbbd87fc161474d1501debfd9b84b7.patch#/respect-dpm-manual.patch
BuildRequires: c_compiler BuildRequires: c_compiler
BuildRequires: cmake BuildRequires: cmake
BuildRequires: gtk-doc BuildRequires: gtk-doc
@ -47,6 +45,8 @@ BuildRequires: pkgconfig(umockdev-1.0)
BuildRequires: pkgconfig(upower-glib) BuildRequires: pkgconfig(upower-glib)
Requires: polkit Requires: polkit
Requires: python3-gobject Requires: python3-gobject
Conflicts: ppd-service
Provides: ppd-service
%description %description
power-profiles-daemon offers to modify system behaviour based upon user-selected power-profiles-daemon offers to modify system behaviour based upon user-selected

View File

@ -1,63 +0,0 @@
From 21b58819edcbbd87fc161474d1501debfd9b84b7 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <mario.limonciello@amd.com>
Date: Thu, 5 Sep 2024 18:53:50 -0500
Subject: [PATCH] action-amdgpu-dpm: Don't override user settings for dpm if
set to `manual`
---
src/ppd-action-amdgpu-dpm.c | 5 +++++
tests/integration_test.py | 22 ++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/src/ppd-action-amdgpu-dpm.c b/src/ppd-action-amdgpu-dpm.c
index 7e141de..e8e34b9 100644
--- a/src/ppd-action-amdgpu-dpm.c
+++ b/src/ppd-action-amdgpu-dpm.c
@@ -99,6 +99,11 @@ ppd_action_amdgpu_dpm_update_target (PpdActionAmdgpuDpm *self, GError **error)
continue;
}
+ if (g_strcmp0 (value, "manual") == 0) {
+ g_info ("Device %s is in manual mode, not changing", g_udev_device_get_sysfs_path (dev));
+ continue;
+ }
+
g_info ("Setting device %s to %s", g_udev_device_get_sysfs_path (dev), target);
if (!ppd_utils_write_sysfs (dev, DPM_SYSFS_NAME, target, error))
return FALSE;
diff --git a/tests/integration_test.py b/tests/integration_test.py
index 30ae097..6c898fd 100644
--- a/tests/integration_test.py
+++ b/tests/integration_test.py
@@ -1646,6 +1646,28 @@ class Tests(dbusmock.DBusTestCase):
upowerd_obj.Set("org.freedesktop.UPower", "OnBattery", True)
self.assert_file_eventually_contains(energy_prefs, "balance_power")
+ def test_amdgpu_dpm_manual(self):
+ """Verify AMDGPU dpm power actions avoid manual"""
+ amdgpu_dpm = "device/power_dpm_force_performance_level"
+ card = self.testbed.add_device(
+ "drm",
+ "card0",
+ None,
+ [amdgpu_dpm, "manual\n"],
+ ["DEVTYPE", "drm_minor"],
+ )
+ self.create_amd_apu()
+
+ self.start_daemon()
+
+ self.assertIn("amdgpu_dpm", self.get_dbus_property("Actions"))
+
+ self.set_dbus_property("ActiveProfile", GLib.Variant.new_string("balanced"))
+ self.assert_sysfs_attr_eventually_is(card, amdgpu_dpm, "manual")
+
+ self.set_dbus_property("ActiveProfile", GLib.Variant.new_string("power-saver"))
+ self.assert_sysfs_attr_eventually_is(card, amdgpu_dpm, "manual")
+
def test_amdgpu_dpm(self):
"""Verify AMDGPU dpm power actions"""
amdgpu_dpm = "device/power_dpm_force_performance_level"
--
GitLab