Commit graph

10 commits

Author SHA1 Message Date
Ivailo Monev
086e08f00a kutils: start counting from 1 in KPowerManagerInhibitImpl::Inhibit()
because 0 should be invalid cookie, much like the inhibition cookie of the
org.freedesktop.ScreenSaver interface

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 16:56:56 +03:00
Ivailo Monev
9195193191 kutils: log debug messages when there is no valid inhibition interface
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-09-03 16:33:03 +03:00
Ivailo Monev
7a66e3e9f7 kutils: remove unused KPowerManagerImpl and KPowerManagerInhibitImpl slots
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-06-13 01:34:53 +03:00
Ivailo Monev
feae165d4f kutils: warn when power management is not supported
if it is not supported then one (or more) CPU governors required by
KPowerManager are not enabled or the host is not Linux

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-18 20:07:52 +02:00
Ivailo Monev
0cdb519ddc kutils: poll for state changes even if org.freedesktop.login1 interface is used
the state is tracked anyway and now the code path for both is the same

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-02 06:14:30 +02:00
Ivailo Monev
017c46542e kutils: warn when unhibition fails
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-04-22 01:13:46 +03:00
Ivailo Monev
3b388d2932 kutils: implement KPowerManager profiles and signals
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-04-20 11:51:03 +03:00
Ivailo Monev
28bf7489d7 kutils: fix uninhibition
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-04-20 05:38:40 +03:00
Ivailo Monev
15c9d77ea2 kutils: fallback to ConsoleKit for inhibition
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-04-20 03:42:20 +03:00
Ivailo Monev
98a4564326 generic: reimplement power manager
this was once on the TODO:
618622f767...fe9d951f17

the org.freedesktop.PowerManagement interface will be there for
compatibility only now since it is obsolete:
https://www.freedesktop.org/wiki/Specifications/power-management-spec/

side note:
powerdevil inhibition was broken

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-04-20 02:20:33 +03:00