This will allow DE environments to decide whether they want to allow
actions and profiles to dynamically change from the battery level or
AC adapter presence.
This information is stored in the new 'Actions' group in the keyfile.
If missing for any action, then use the value for 'optin' specified
in the action.
Actions now have additional fields:
* "Description": A user friendly string to explain what an action does
* "Optin": Whether an action should default enabled or disabled
* "Active": Whether an action is enabled or disabled
These fields will be used for controlling the lifecycle of action.
Matching helpers for the core to call are also provided.
The too-many-positional-arguments warning introduced in commit 4a367430
caused a regression in pylint-integration-tests for versions of pylint < 3.3.0,
as these versions do not support the too-many-positional-arguments check.
Added disable=unknown-option-value to the pylint disable line for compatibility
with pylint < 3.3.0, avoiding test failures.
Kept disable=too-many-positional-arguments for pylint >= 3.3.0, since the
function exceeds the maximum allowed positional arguments (R0917) and may cause
lint errors.
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/174
Rather than checking for active mode at startup and then never checking
it again check the mode when trying to write a value.
If it's not active, log something to the journal. This is intentionally
not failing because users could still have an ACPI platform-profile change
occur.
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/168
From systemd.unit(5):
Note that for drop-in files, if one wants to remove entries from a setting that is parsed as a list (and is
not a dependency), such as AssertPathExists= (or e.g. ExecStart= in service units), one needs to first
clear the list before re-adding all entries except the one that is to be removed. Dependencies (After=,
etc.) cannot be reset to an empty list, so dependencies can only be added in drop-ins. If you want to
remove dependencies, you have to override the entire unit.
https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html
PPD doesn't force the SoC to active mode or to load.
As the policy of whether amd-pstate is loaded is controlled by the
kernel having another policy whether power-profiles-daemon isn't
necessary.
We don't need to do it for each proxy since they're all monitoring
the same owner.
So basically make the first proxy to be setup to win, not connecting to
the signal if the other is already set
Due a firmware bug on some OEM systems the amd-pstate kernel driver
starts up in active mode but EPP writes don't work.
Admittedly this is a kernel bug that it still advertises support and
it could be handled better by the kernel, but PPD can also validate
writes with a no-op for each CPU at bootup.
Do this to ensure that the CPU driver is only setup if we know it works.