Skip to content

Commit 8a4e246

Browse files
frap129sirlucjan
authored andcommitted
Document power-profiles-daemon integration
1 parent 725c27c commit 8a4e246

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

‎configs/scx_loader.toml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
# This field specifies the mode which will be used when scx_loader starts (e.g., on boot).
55
#default_mode = "Auto"
66

7+
# Follow power-profiles-daemon and map its profiles to scx-loader modes.
8+
# The integration is disabled by default, and every mapping is optional.
9+
#[power_profiles]
10+
#enabled = true
11+
#power_saver = "PowerSave"
12+
#balanced = "Auto"
13+
#performance = "Gaming"
14+
715
# This "structure" allows configuring flags for each scheduler mode of particular scx scheduler
816
#[scheds.'scheduler']
917
#auto_mode = []

‎crates/scx_loader/configuration.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ The configuration file has the following structure:
2121
default_sched = "scx_cosmos"
2222
default_mode = "Auto"
2323

24+
[power_profiles]
25+
enabled = true
26+
power_saver = "PowerSave"
27+
balanced = "Auto"
28+
performance = "Gaming"
29+
2430
[scheds.scx_bpfland]
2531
auto_mode = ["-m", "auto"]
2632
gaming_mode = ["-m", "all"]
@@ -125,6 +131,16 @@ server_mode = []
125131
* Possible values are: `"Auto"`, `"Gaming"`, `"LowLatency"`, `"PowerSave"`, `"Server"`.
126132
* If this field is not present, it defaults to `"Auto"`.
127133

134+
**`[power_profiles]`:**
135+
136+
* `enabled` controls whether the normal D-Bus daemon follows power-profiles-daemon. It defaults to `false`; `scx_loader --auto` never follows PPD.
137+
* `power_saver`, `balanced`, and `performance` map PPD's `power-saver`, `balanced`, and `performance` profiles to scx-loader modes. Each mapping is optional and has no built-in default.
138+
* Mapping values use `"Auto"`, `"Gaming"`, `"PowerSave"`, `"LowLatency"`, or `"Server"`.
139+
* When enabled, scx-loader applies PPD's current profile at startup and after reconnecting, then reacts to profile changes.
140+
* A mapped event switches the currently running scheduler to the configured mode, replacing custom scheduler arguments. If no scheduler is running, the event is discarded.
141+
* Manual scheduler or mode changes remain active until the next mapped PPD event. Unmapped and unknown profiles leave the scheduler unchanged.
142+
* PPD may be absent or restart without preventing scx-loader from running; the monitor reconnects automatically.
143+
128144
**`[scheds.scx_name]`:**
129145

130146
* This section defines the custom flags for a specific scheduler. Replace `scx_name` with the actual name of the scheduler (e.g., `scx_bpfland`, `scx_rusty`, `scx_lavd`, `scx_flash`, `scx_p2dq`, `scx_rustland`).

0 commit comments

Comments
 (0)