1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-27 17:07:44 +00:00
Commit graph

168 commits

Author SHA1 Message Date
NotAShelf
32422f2b4f
treewide: streamline error handling; leverage thiserror and anyhow 2025-05-18 15:45:19 +03:00
NotAShelf
99fbfc0ea7
daemon: use internal error types 2025-05-18 14:26:42 +03:00
NotAShelf
38960ce8bc
daemon: don't store unused fields 2025-05-18 14:18:18 +03:00
NotAShelf
747362b88b
daemon: replace debug_assert with an actual error 2025-05-18 13:38:33 +03:00
NotAShelf
58273d89f4
daemon: get rid of config hot-reloading 2025-05-18 13:27:18 +03:00
NotAShelf
ee5bd8f80f
daemon: handle invalid config values gracefully 2025-05-18 12:20:19 +03:00
NotAShelf
fe93a50f9e
treewide: suppress clippy lint about Error suffix 2025-05-18 11:23:37 +03:00
NotAShelf
63cab6e631
daemon: clean up weighted average calculation 2025-05-18 08:36:51 +03:00
NotAShelf
2efc0e1a6b
daemon: use u128 arithmetic to prevent overflow in polling interval calc
Overflows are unlikely to happen, but easy to prevent. Let's fix it while we're at it.
2025-05-18 08:27:53 +03:00
NotAShelf
34862b28e1
daemon: enforce >= 1s minimum interval in clamping 2025-05-18 08:11:46 +03:00
NotAShelf
8c462868b6
daemon: use abs_diff to remove lossy casts 2025-05-18 07:52:32 +03:00
NotAShelf
ad70a85426
daemon: use integer arithmetic to avoid precision loss 2025-05-18 07:43:01 +03:00
NotAShelf
984793d445
daemon: historical interval blending 2025-05-18 07:28:07 +03:00
NotAShelf
59d234e3ce
ci: copy assets properly 2025-05-18 06:17:49 +03:00
NotAShelf
094a370422
chore: v0.3.1 2025-05-18 06:07:44 +03:00
raf
8050f91aa8
Merge pull request #27 from NotAShelf/fix-auto-turbo
engine: fix race condition in turbo state init
2025-05-18 06:08:00 +03:00
NotAShelf
64bebe9f47
config: simplify default value functions
Create a macro that generates constant-returning functions for default configuration
values to reduce code duplication. This macro takes a function name, return type,
and value.
2025-05-18 06:03:35 +03:00
NotAShelf
13bb434ff1
engine: fix race condition in turbo state init 2025-05-18 05:42:39 +03:00
NotAShelf
ed3ba94f74
engine: error on negative values 2025-05-18 05:32:27 +03:00
NotAShelf
9db1a028bf
engine: reduce sysfs writes 2025-05-18 05:28:52 +03:00
NotAShelf
aaa46e9223
chore: v0.3.0 2025-05-18 05:16:32 +03:00
raf
0b8551d34f
Merge pull request #26 from NotAShelf/auto-turbo
feature: dynamic CPU turbo management
2025-05-18 05:11:30 +03:00
NotAShelf
d687c037cb
config: add serde(default) to turbo settings for backward compat 2025-05-18 05:07:10 +03:00
NotAShelf
d7d6398041
engine: optimize turbo auto settings retrieval; improve validation errors 2025-05-18 05:03:34 +03:00
NotAShelf
f1a5ad0b6c
engine: improve AC state detection
I hate the number of possible hardware combinations...
2025-05-18 04:54:48 +03:00
NotAShelf
eb9fbdc681
engine: fix potential data race when previous state is outdated 2025-05-18 04:48:10 +03:00
NotAShelf
15cdf22557
engine: stronger validation for turbo auto settings thresholds 2025-05-18 04:39:09 +03:00
NotAShelf
4e7b2d405b
config: document default_initial_turbo_state semantics 2025-05-18 04:29:18 +03:00
NotAShelf
899d24d5c6
engine: optimize turbo state update logic 2025-05-18 04:24:14 +03:00
NotAShelf
535a045e8b
engine: streamline turbo state management 2025-05-18 04:18:29 +03:00
NotAShelf
5f1d2c9748
engine: simplify AC power status determination 2025-05-18 03:58:19 +03:00
NotAShelf
8a92c124b1
engine: simplify default handling 2025-05-18 03:52:21 +03:00
NotAShelf
1655886af0
engine: document data race in initialize_with 2025-05-18 03:44:26 +03:00
NotAShelf
044d6f2fa9
engine: get rid of unnecessary mutex wrapping
AtomicBooll in TurboHystersis already provides thread safety
2025-05-18 03:33:33 +03:00
NotAShelf
d671a9c73f
engine: deduplicate on_ac detection logic 2025-05-18 03:24:25 +03:00
NotAShelf
72c2842227
engine: maintain previous state when CPU data is missing 2025-05-18 03:19:09 +03:00
NotAShelf
c570a327ab
engine: fix race condition 2025-05-18 03:15:34 +03:00
NotAShelf
8866eb4485
cpu: fix turbo management on systems without batteries (desktops) 2025-05-18 02:51:26 +03:00
NotAShelf
ceeb33b17d
docs: update example config 2025-05-18 02:29:45 +03:00
NotAShelf
e6d8f8c2da
engine: allow configuring initial turbo state 2025-05-18 02:25:35 +03:00
NotAShelf
a084f4e7b1
cpu: implement TurboHysteresis for managing turbo boost state
Hysteresis mechanism to prevent state bleeding across different
engine instances.
2025-05-18 02:01:53 +03:00
NotAShelf
04b01aa070
cpu: enhance document set_turbo function and Auto mode behavior 2025-05-17 19:06:07 +03:00
NotAShelf
a1c8190c28
docs: update minimum required rust version 2025-05-17 19:04:27 +03:00
NotAShelf
9c692dd103
meta: populate Cargo manifest 2025-05-17 19:04:11 +03:00
NotAShelf
aec7c6b9d4
config: set default turbo auto settings 2025-05-17 18:44:31 +03:00
NotAShelf
65e380635f
cpu: remove unused import 2025-05-17 18:27:08 +03:00
NotAShelf
2be0f41924
docs: clarify turbo management options 2025-05-17 17:43:18 +03:00
NotAShelf
cbaab9f160
cpu: simplify turbo management 2025-05-17 17:42:10 +03:00
NotAShelf
806cf64d29
engine: improve atomic operations for turbo state management 2025-05-17 14:25:37 +03:00
NotAShelf
1b31dd9e1e
cli: pad output to prevent misaligned text 2025-05-17 11:48:09 +03:00