Mario Limonciello
5fd9d0e6dd
Disable loading amd-pstate when the PM profile is a server or undefined
...
This mirrors the behavior used by Kernel 6.5 and later where amd-pstate
is configured to default into 'performance' by the kernel. It's not
as useful in server to be changing it.
Link: 32f80b9adf
2024-01-15 06:28:23 +00:00
Mario Limonciello
bec7dfdf34
Add support for driver blocklist by environment variable
...
Drivers can be blocked from loading via `POWER_PROFILE_DAEMON_DRIVER_BLOCK`
which is a comma separated value listing the drivers to block.
This is an escape hatch in case CPU or platform driver are failing and a user
would like to block them.
2024-01-15 06:17:42 +00:00
Mario Limonciello
61f7650e35
Allow both CPU and platform drivers to be simultaneously active
...
This is done by designating all drivers as CPU drivers or platform drivers.
One of each driver can be active at any given time.
When setting an active profile CPU driver is set first as this is less likely to have
failures. If failures occur setting the platform driver then the CPU driver is undone.
If both profiles are degraded then the string for the reason from both drivers will be
comma separated to be compatible with existing API and users.
This is leveraged from https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/123
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/107
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/125
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/124
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/122
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/129
Fixes: https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/issues/131
2024-01-15 06:17:42 +00:00
Mario Limonciello
e1b53d1f64
Update G_DEFINE_TYPE whitespace
...
This is a macro not a function.
2024-01-15 06:17:42 +00:00
Mario Limonciello
462b91de55
tests: Split immutable control into a test helper
2024-01-15 06:17:42 +00:00
Mario Limonciello
e1813f29a9
docs: Remove references to files that don't exist
2024-01-15 06:17:42 +00:00
Mario Limonciello
8c1c4d77e8
update gitignore
2024-01-15 06:17:42 +00:00
Kate Hsuan
8ddf592c9a
ci-fixes: add python3-packaging
2024-01-15 13:59:42 +08:00
Mario Limonciello
1669b29661
Update whitespace in integration tests to be consistent
2024-01-06 10:07:48 -06:00
Bastien Nocera
be37aea01b
intel-pstate: Add more debug to driver probe
...
Make it easier to see which features are used on the system by
summarising the features the driver will use.
** (power-profiles-daemon:126721): DEBUG: Found Intel p-state settings
** (power-profiles-daemon:126721): DEBUG: Energy Performance Preference: yes
** (power-profiles-daemon:126721): DEBUG: Energy Performance Bias: yes
** (power-profiles-daemon:126721): DEBUG: Has Turbo: yes
Closes : #120
2023-11-21 14:24:09 +01:00
Bastien Nocera
3cb0e750c7
ci: More CI fixes
...
Support both dnf and dnf5 as we don't know which rawhide Fedora image
will ultimately be used.
2023-11-21 14:20:08 +01:00
Bastien Nocera
ef1d1c394b
ci: Fix CI
2023-11-21 14:02:40 +01:00
Bastien Nocera
c20e09a711
0.13
2023-04-26 14:53:07 +02:00
Bastien Nocera
6eaf337c33
intel-pstate: Remove unused variable
...
src/ppd-driver-intel-pstate.c:174:22: warning: unused variable 'gov_path' [-Wunused-variable]
g_autofree char *gov_path = NULL;
^
2023-04-26 14:28:14 +02:00
Prajna Sariputra
1b18784f12
README: Add documentation for the AMD P-State driver
2023-04-26 14:28:14 +02:00
Prajna Sariputra
ea0e2be53c
tests: Add tests for the AMD P-state driver
2023-04-26 14:23:18 +02:00
Prajna Sariputra
db60051aea
main: Add amd_pstate-based driver
...
The AMD P-states driver has added support for active mode in kernel 6.3,
which exposes a similar interface for controlling energy performance
preference as the Intel P-state driver, with the same presets present,
so make use of it.
See:
https://www.kernel.org/doc/html/v6.3/admin-guide/pm/amd-pstate.html
Closes : #108
2023-04-26 14:23:18 +02:00
Bastien Nocera
414543e881
ci: Use detached pipelines
...
See https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438#what-it-means-for-me-a-maintainer-of-a-project-part-of-gitlabfreedesktoporg
2023-03-16 15:11:19 +01:00
Bastien Nocera
0cb116f351
main: Fix pylint warnings
...
src/powerprofilesctl:137:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
src/powerprofilesctl:126:4: R1720: Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it (no-else-raise)
src/powerprofilesctl:134:4: R1720: Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it (no-else-raise)
src/powerprofilesctl:154:4: R1720: Unnecessary "else" after "raise", remove the "else" and de-indent the code inside it (no-else-raise)
2023-03-16 15:04:48 +01:00
Bastien Nocera
1116e54128
platform-profile: "cool" should be balanced
...
The "cool" profile isn't a low-power mode, but a mode where the fans are
always running to reduce the temperature, presumably to allow it to run
faster.
At the same time, we need to handle the lack of low-power profile on HP
machines as they only had a cool mode and no low-power mode.
Closes : #89
2023-02-08 16:06:48 +01:00
Bastien Nocera
cbdac3da5b
tests: Add tests for checking for profile existence
2022-09-08 11:44:19 +02:00
Bastien Nocera
eefb002ac5
main: Check that profile exists before switching to it
...
Don't allow switching to an unsupported profile, or holding that
unsupported profile, as that might cause problems for front-ends that
can't display that combination.
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1504
2022-09-08 11:44:19 +02:00
Bastien Nocera
674732919a
utils: Add debug to monitoring helper
...
As we don't have easy access to the full path of the attribute
we're monitoring elsewhere.
2022-09-08 11:37:28 +02:00
Bastien Nocera
1ddc98ecd8
0.12
2022-06-28 15:58:14 +02:00
Bastien Nocera
0005a190f0
README: Update README to mention EPB
...
See https://www.kernel.org/doc/html/v5.17/admin-guide/pm/intel_epb.html
2022-06-28 15:50:27 +02:00
Bastien Nocera
50eb7d3441
intel-pstate: Reapply energy_perf_bias on resume
...
From https://www.kernel.org/doc/html/v5.17/admin-guide/pm/intel_epb.html?highlight=energy_perf_bias :
"
There are systems where the platform firmware resets the EPB during
system-wide transitions from sleep states back into the working state
effectively causing the previous EPB updates by user space to be lost.
"
So reapply energy_perf_bias on resume.
2022-06-28 15:50:27 +02:00
Bastien Nocera
58d556e85b
tests: Add test for energy_perf_bias support
2022-06-28 15:50:27 +02:00
Bastien Nocera
d42af96f9d
intel-pstate: Probe EPB on startup
2022-06-28 15:50:27 +02:00
Bastien Nocera
6d03eddcf4
intel-pstate: Add EPB application
2022-06-28 15:50:27 +02:00
Bastien Nocera
f212ffdac9
intel-pstate: Factor out writing to sysfs files
2022-06-28 15:50:27 +02:00
Bastien Nocera
30ce9b1c68
intel-pstate: Rename profile_to_pref()
2022-06-28 15:50:27 +02:00
Bastien Nocera
bc5433e788
intel-pstate: Split probing EPP
2022-06-28 15:50:27 +02:00
Bastien Nocera
ade5c0e1b8
intel-pstate: Split EPP and EPB devices
...
Split energy_perf_bias and energy_performance_preference devices, as
they use different values.
2022-06-28 15:50:27 +02:00
Bastien Nocera
fbc7cad121
ci: Enable tests in the CI
2022-06-28 15:36:34 +02:00
Bastien Nocera
b0f6aa5e85
build: Make tests optional
...
And check for dbusmock and gi being available.
Closes : #95
2022-06-28 15:36:03 +02:00
Bastien Nocera
915f3dfc92
build: Install D-Bus config in /usr
...
/etc should be left for sysadmin overrides.
Closes : #94
2022-06-28 15:32:04 +02:00
Bastien Nocera
e2c4f6fec9
intel-pstate: Fix return type of ->probe() implementation
2022-06-28 14:40:05 +02:00
Bastien Nocera
4684a0ceb8
intel-pstate: Simplify opening policy dir
2022-06-28 14:34:37 +02:00
Bastien Nocera
785267939b
main: Add profile activation reason "Resume"
2022-06-28 14:21:00 +02:00
Bastien Nocera
4aa9922e2a
tests: Fix typo
2022-06-28 14:17:47 +02:00
Bastien Nocera
53d9f55edd
tests: Fix error running tests with Python 3.11
...
In 664448d81f
the "errors" attribute was removed from the _Outcome object. Adapt the
code to print the daemon log after a failed run().
2022-06-24 13:21:03 +02:00
Bastien Nocera
d72a30cff6
tests: Indent a hunk of code correctly
2022-06-24 10:24:36 +02:00
Bastien Nocera
8b6e96e727
tests: Disable MALLOC_PERTURB when running pylint
2022-06-23 17:28:51 +02:00
Bastien Nocera
e83b4556bf
0.11.1
2022-05-02 17:07:24 +02:00
Bastien Nocera
bd2d4202e8
README: Document how the Intel P-State driver works
...
It used to just tweak a single file, but it's now (unfortunately) complicated
enough that it needs to be documented.
2022-05-02 15:07:07 +02:00
Bastien Nocera
afed35451d
tests: Add test case for Intel P-State in passive mode
2022-05-02 14:47:22 +02:00
Bastien Nocera
23103bca59
intel-pstate: Don't change scaling_governor if P-State isn't active
...
On systems without HWP support, or when the Intel P-State driver runs in
"passive" mode, the CPU is effectively controlled by cpufreq governors.
Only modify the cpufreq scaling_governor if the Intel P-State driver is in
active mode.
See https://www.kernel.org/doc/html/v5.17/admin-guide/pm/intel_pstate.html#operation-modes
Closes : #91
2022-05-02 14:42:37 +02:00
Bastien Nocera
29151898b6
0.11
2022-04-29 14:29:31 +02:00
Bastien Nocera
5260fae7cf
tests: Test with a non-default scaling_governor
...
Check that the daemon is resetting the value on startup, and add
scaling_governor sysfs files for all the intel-pstate tests.
2022-04-28 15:25:52 +02:00
Bastien Nocera
fb41403b8e
main: Change default scaling_governor on startup
...
Otherwise energy_performance_preference might not be writable. This can
happen on systems where the default cpufreq scaling governor has been
changed.
See https://bugzilla.redhat.com/show_bug.cgi?id=2079898
Closes : #90
2022-04-28 15:17:45 +02:00