Commit graph

17 commits

Author SHA1 Message Date
Bastien Nocera
ebf9e5b7c8 lenovo-dytc: Implement perfmode
Implement dytc_perfmode, as per https://patchwork.kernel.org/patch/11678983/
2020-09-09 12:33:20 +02:00
Bastien Nocera
953eb716fd tests: Fix tests for lenovo_dytc driver changes
We'll also need a dytc_perfmode sysfs file to have a working lenovo_dytc
PpdDriver.
2020-09-09 12:33:20 +02:00
Bastien Nocera
d6ef7bcfc8 tests: Fix one of the tests for slower machines
======================================================================
FAIL: test_intel_pstate_balance (__main__.Tests)
Intel P-State driver (balance)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/power-profiles-daemon-0.1/tests/integration-test", line 375, in test_intel_pstate_balance
    self.assertEqual(contents, b'balance_power')
AssertionError: b'' != b'balance_power'
----------------------------------------------------------------------
2020-09-09 11:39:45 +02:00
Bastien Nocera
95a67713cf intel-pstate: Inhibit perf mode when overheating
thermald can disable turbo altogether if needed to avoid reaching
too high operating temperatures, so make the p-state driver monitor
this, and mark the performance mode as inhibited if "no_turbo" is
set.

Closes: #14
2020-09-08 18:09:04 +02:00
Bastien Nocera
8243b945ce tests: Add tests for on-battery P-State driver 2020-09-04 15:10:16 +02:00
Bastien Nocera
3af71eb131 intel-pstate: Monitor battery status to choose right balanced pref
Prefer "balance_performance" p-state preference when the machine is on
mains, and "balance_power" when it's on battery.
2020-09-04 15:10:16 +02:00
Bastien Nocera
45ccd0b230 tests: Add Intel P-State driver tests 2020-09-04 15:10:16 +02:00
Bastien Nocera
8b3d366219 main: Get rid of "SelectedProfile" property
The original idea was to have a "SelectedProfile" property that would be
settable by the user, but could be different from the "ActiveProfile" if
the hardware's performance mode wasn't available for example.

It turns out that having 2 separate states makes for very confusing UI,
so if the performance profile becomes inhibited and it's the current one,
the active profile will automatically switch to balanced and stay there.
2020-08-12 16:55:58 +02:00
Bastien Nocera
a531044de4 main: Add fake performance driver 2020-08-12 15:31:54 +02:00
Bastien Nocera
f5b489aaf9 tests: Test previous commit fix
Test for "main: Fix PerformanceInhibited property not being up-to-date"
2020-08-12 15:22:41 +02:00
Bastien Nocera
97f449a497 main: Add "Actions" property
That allows API users to programmatically check whether a particular
functionality is implemented in the daemon, eg. if we wanted to move
GPU performance modes from gamemode to this daemon, gamemode could
query whether that feature was implemented and available in the backend.

Closes: #12
2020-08-12 11:31:34 +02:00
Bastien Nocera
e347845096 main: Rename Inhibited to PerformanceInhibited
Make it clear that we don't expect any profile to ever be inhibited,
apart from the performance profile.
2020-08-10 16:42:07 +02:00
Bastien Nocera
bc2961a406 tests: Test "Fix transitions if one profile is inhibited" 2020-08-10 15:43:20 +02:00
Bastien Nocera
b8798b5c20 lenovo-dytc: Handle power-saver profile as well 2020-08-06 14:42:48 +02:00
Bastien Nocera
17b655f9f5 main: Make PpdProfile into a bitmask
So that drivers can support multiple profiles.
2020-08-05 15:29:27 +02:00
Bastien Nocera
84c6470803 tests: Add trickle-charge action integration test 2020-07-20 17:04:17 +02:00
Bastien Nocera
46ea9c7875 tests: Add integration tests 2020-07-16 17:07:10 +02:00