Mario Limonciello
6e00edc587
Restart all drivers if platform profile show up late
2024-05-17 12:17:02 +02: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
Marco Trevisan (Treviño)
a766f9dd4d
ppd-driver-intel-pstate: Use async initialization of the logind proxy
2024-04-03 20:15:17 +02:00
Marco Trevisan (Treviño)
c12465f68a
ppd-driver-intel-pstate: Do not load logind properties or autostart it
2024-04-03 20:15:17 +02:00
Marco Trevisan (Treviño)
fd8f6a0f3c
integration-tests: Add test for resuming state after suspend on intel
2024-04-03 20:15:17 +02:00
Marco Trevisan (Treviño)
88941e5f2f
power-profiles-daemon: Do not start upower proxy if nothing requires it
2024-04-03 20:10:34 +02:00
Marco Trevisan (Treviño)
3168e86620
power-profiles-daemon: Remove goto statement being used only once
2024-04-03 20:10:34 +02:00
Marco Trevisan (Treviño)
928c4611d8
power-profiles-daemon: Only update battery value when it actually did
...
We might have notified the drivers even for no actual changes, so
let's refactor the code so that we only notify them when we really have
a battery state change.
2024-04-03 20:10:34 +02:00
Marco Trevisan (Treviño)
ae3a30da98
integration-tests: Use a lambda for assert_eventually messages
...
In this way we can show the actual value after we've finished the check
instead of the one that was read initially.
2024-04-03 20:10:34 +02:00
Marco Trevisan (Treviño)
df534c3911
integration-tests: Add ability to check if a condition persists
...
assert_eventually() can check if a condition eventually is true, but
this could change after a while. So add another function that allows
to check if a condition persists for a given time.
2024-04-03 20:10:34 +02:00
Marco Trevisan (Treviño)
50c3fd78aa
power-profiles-daemon: Unify code-path for stopping the drivers on cleanup
...
There's not need to duplicate most of the same actions, let's just stop
the drivers as first thing, then let's free the remaining data.
2024-04-03 20:10:34 +02:00
Marco Trevisan (Treviño)
e90b38e342
power-profiles-daemon: Just use a proxy to monitor upower state
...
A GDBus proxy monitors already for the name availability in the bus so
there's no need to create both a watcher and a proxy when available.
Just create a proxy (asynchronously) and use the name owner property to
check if it's in the bus.
2024-04-03 20:10:34 +02:00
Marco Trevisan (Treviño)
6866f1274a
cleanup: Indentation fixes
2024-04-03 20:10:34 +02:00
Marco Trevisan (Treviño)
d3199b3203
integration-tests: Simulate OnBattery changes while the daemon is running
2024-04-03 20:10:34 +02:00
Marco Trevisan (Treviño)
cf4321c85b
integration-tests: Use start_dbus_template everywhere
...
As it handles auto-cleanup better
2024-04-03 20:10:34 +02:00