Commit graph

502 commits

Author SHA1 Message Date
Mario Limonciello
1b17e3c0de trivial: Update README.md to explain modes better
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/162
2024-09-02 08:32:39 -05:00
Mario Limonciello
29350383d4 amdgpu-dpm: Show log for uevents 2024-08-30 03:26:58 +02:00
Mario Limonciello
f98766fa1d Add support for setting DPM level on APUs
When in power-saver set DPM clocks explicitly down to "low".

Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/158
2024-08-30 03:22:53 +02:00
Mario Limonciello
842fcdd5fa amdgpu-panel-power: drop needless #defines 2024-08-30 03:20:14 +02:00
Mario Limonciello
9f7cea1b2e move CPU check to a helper
This will allow more actions to use a CPU check
2024-08-30 03:20:14 +02:00
Marco Trevisan (Treviño)
7acb7a17eb power-profiles-daemon: Style cleanups 2024-08-30 02:12:29 +02:00
Mario Limonciello
8277adb7cd Start the daemon after multi-user.target instead of before
It's not critical for the boot process in any way, and this should
help with any race conditions form kernel modules still setting
up anything related devices after the initial device uevent.
2024-08-04 13:27:59 -05:00
Mario Limonciello
c180150896 Add debug knobs for upower and logind 2024-07-30 05:21:46 +00:00
Mario Limonciello
04a5a0149b Move entire DebugOptions structure into PpdApp
Storing this information will be required to later support potentially
hotplugging drivers and features.
2024-07-30 05:21:46 +00:00
Mario Limonciello
0ce9b63d47 amdgpu_panel_power: Add support for progressive ABM levels
More users use power saver as their default value than expected, and
so ABM is a more negative experience for some of them.

Instead of a table of values, use "progressive" values that change
based on battery life.

The selected values:
* Balanced + AC:
  ABM 0
* Balanced + battery:
  >= 30% battery
    ABM 0
  < 30% battery
    ABM 1
* Power Saver + AC:
  ABM 0
* Power Saver + battery:
  >= 50% battery
    ABM 0
  30-49% battery
    ABM 1
  20-30% battery
    ABM 2
  <20% battery
    ABM 3
2024-07-30 00:18:25 -05:00
Mario Limonciello
69e90eeb50 Add support for a battery level changed callback for actions and drivers
This will allow actions and drivers to react to battery level changes.
2024-07-30 00:18:25 -05:00
Mario Limonciello
3c2d072231 Clear protected packages during dnf ops
This will help prevent some of the archive inconsistencies seen in
rawhide causing CI failures.

https://discussion.fedoraproject.org/t/psa-rawhide-what-to-do-if-switch-to-dnf5-fails-because-dnf-is-protected/84650/6
2024-07-30 00:01:02 -05:00
Mario Limonciello
5eb1248927 amd-pstate: Program minimum frequency to lowest non-linear frequency
Although the system will save more power at lower frequency, AMD SoCs
have a point when they can operate most efficiently called the lowest
non-linear frequency.

Program the minimum frequency to this value in balanced and performance
modes to improve responsiveness.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2024-07-02 23:14:55 -05:00
Mario Limonciello
05867e84a4 amd-pstate: Add support for core performance boost
Apply core performance boost in balanced and performance and
disable it when in power saver.
2024-06-21 14:56:58 -05:00
Mario Limonciello
ff7900812c Apply additional systemd hardening options 2024-04-17 16:15:33 +00:00
Mario Limonciello
9e25e84489 trivial: ci: for dist_install job put the results into ./dist 2024-04-17 10:43:43 -05:00
Kate Hsuan
a65b5002ba build: skip shtab for the system without shtab support
Skip python3-shtab for some system that dosen't provide shtab package.
2024-04-17 11:35:50 +08:00
Mario Limonciello
2e00350f92 trivial: Don't assume that turbo_pct is present
According to kernel documentation this file is only exposed if
the value will be the same for all CPUs.

"This attribute is present only if the value exposed by it is the same for all of the CPUs in the system."
Link: https://www.kernel.org/doc/html/v6.9-rc1/admin-guide/pm/intel_pstate.html
2024-04-06 15:05:11 -05:00
Marco Trevisan (Treviño)
ae9076ab19 Release power-profiles-daemon 0.21 2024-04-04 01:55:02 +02:00
Marco Trevisan (Treviño)
d41b0f0f81 ppd-profile: Write PpdPowerChangedReason as string in debug statements 2024-04-04 01:50:48 +02:00
Marco Trevisan (Treviño)
301af78dce build. Do not mention tests on python checks
They're generic now, and there's no need to add further comments
2024-04-04 01:50:48 +02:00
Marco Trevisan (Treviño)
ce02a8fba0 ppd-utils: Support versions earlier than GLib 2.76 2024-04-03 23:28:26 +00:00
Marco Trevisan (Treviño)
a86b9cda94 ppd-utils: Use simpler write without extra copies
Simplify our writing function by just using pure C open/write calls
since we don't really need to be able to create files.

In fact this made possible to spot a test issue where a file was not
present and in fact in some scenarios we had random valgrind errors in
CI.

Plus, since we just need to write the contents as it is, we can avoid
extra buffers.
2024-04-03 23:28:26 +00:00
Marco Trevisan (Treviño)
b41953681b ppd-profile: Use autopointers to hold class values 2024-04-04 00:34:01 +02:00
Marco Trevisan (Treviño)
b0b8e2f78f cleanup: Remove various unneeded "ret" values
We can just return directly most of the times
2024-04-04 00:34:01 +02:00
Marco Trevisan (Treviño)
88c062030b ppd-driver-amd-pstate: Call profile functions just once 2024-04-04 00:34:01 +02:00
Marco Trevisan (Treviño)
64bc68c797 ppd-utils: Add function to write the same value to multiple files 2024-04-04 00:34:01 +02:00
Marco Trevisan (Treviño)
fc340c9cba ppd-driver-intel-pstate: Indentation fix 2024-04-04 00:34:01 +02:00
Marco Trevisan (Treviño)
f7a90c751e cleanup: Use arrays to hold list of strings
Using GList is sub-optimal and eventually needs just more allocations
and iterations, so use arrays instead which provide a nicer API.
2024-04-04 00:34:01 +02:00
Marco Trevisan (Treviño)
73ab21910f ppd-driver-intel-pstate: Do not duplicate epp/epb devices validity check 2024-04-04 00:34:01 +02:00
Marco Trevisan (Treviño)
3054da9706 ppd-driver-amd-pstate: Do not duplicate epp_devices validity check 2024-04-04 00:34:01 +02:00
Marco Trevisan (Treviño)
e1d182c8b9 cleanup: Disconnect all signals on objects
This is not strictly needed because we don't have objects with multiple
references around, but it's still something nice to do, so disconnect
when we don't need an object anymore.
2024-04-03 23:09:22 +02:00
Marco Trevisan (Treviño)
bfc803236e power-profiles-manager: Use EXIT_FAILURE everywhere 2024-04-03 22:14:42 +02:00
Mario Limonciello
7c4f8342f7 trivial: Use EXIT_FAILURE on dbus setup failure instead of 1 2024-04-03 19:55:41 +00:00
Mario Limonciello
9dc15cef70 Add --driver-block and --action-block arguments
These will set the environment variables accordingly to block drivers
or actions from loading.
2024-04-03 19:55:41 +00:00
Mario Limonciello
acd40e54ca Distinguish differently between -v and -vv
Set the default log level to MESSAGE.
If launched with -v, upgrade to INFO.
If launched with -vv, upgrade to DEBUG.
2024-04-03 19:55:41 +00:00
Mario Limonciello
e66209e50b Add or upgrade to INFO level messages for -v argument 2024-04-03 19:55:41 +00:00
Marco Trevisan (Treviño)
2fb8f83d4b integration-tests: Use clearer logic to run initial condition check 2024-04-03 21:52:44 +02:00
Marco Trevisan (Treviño)
fb1039f9da integration-tests: Add more debugging bits if we can't connect to server 2024-04-03 21:49:18 +02:00
Marco Trevisan (Treviño)
5b74abb94f build: Unify the python dependencies lookup
And enable the dependency check when we need for dependencies
2024-04-03 19:30:18 +00:00
Marco Trevisan (Treviño)
7f9e26fd46 ci: Run dist and docs job only on merge requests 2024-04-03 19:30:18 +00:00
Marco Trevisan (Treviño)
3740860c71 qa: Split install from build/test job 2024-04-03 19:30:18 +00:00
Marco Trevisan (Treviño)
02898fbd44 build: Downgrade python3-shtab warning to a simple message 2024-04-03 19:30:18 +00:00
Mario Limonciello
4b172671cc Add unit tests for upower starting after ppd 2024-04-03 13:55:02 -05:00
Mario Limonciello
3b4249d8e9 intel-pstate: Use different EPP/EPB values for battery and AC.
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/145
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/71
2024-04-03 13:34:00 -05:00
Marco Trevisan (Treviño)
1ebc1ebe99 ppd-driver: Move Suspend/Resume detection inside the deamon
This was used just by one driver, but it's better to keep this in the
daemon and to be enabled only if a driver requires it
2024-04-03 20:15:17 +02:00
Marco Trevisan (Treviño)
542bfe137e ci: Properly install polkit-gobject symbols
They're in polkit-libs in fedora, not polkit-gnome
2024-04-03 20:15:17 +02:00
Marco Trevisan (Treviño)
96eef4b8eb tests: Write daemon stderr to system stderr 2024-04-03 20:15:17 +02:00
Marco Trevisan (Treviño)
0069f66355 ppd-driver-intel-pstate: Do not bother using a whole proxy for a signal
We don't really need a full dbus proxy here, but only to monitor a
signal change, so let's go cheap and use just a signal monitor.
2024-04-03 20:15:17 +02:00
Marco Trevisan (Treviño)
a3364ac61d ppd-driver-intel-pstate: Use correct check on profile activation
The value returns a boolean, not PpdProbeResult
2024-04-03 20:15:17 +02:00