]> Git — Sourcephile - julm/julm-nix.git/blob - nixos/profiles/auto-cpufreq.nix
gnupg-agent: fix option name
[julm/julm-nix.git] / nixos / profiles / auto-cpufreq.nix
1 { lib, ... }:
2 {
3 # ExplanationNote: not compatible with auto-cpufreq
4 services.tlp.enable = false;
5 services.power-profiles-daemon.enable = false;
6 services.auto-cpufreq = {
7 enable = true;
8 settings = {
9 # settings for when connected to a power source
10 charger = {
11 # see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
12 # preferred governor.
13 governor = lib.mkDefault "ondemand";
14 # EPP: see available preferences by running: cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences
15 energy_performance_preference = lib.mkDefault "ondemand";
16
17 # EPB (Energy Performance Bias) for the intel_pstate driver
18 # see conversion info: https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_epb.html
19 # available EPB options include a numeric value between 0-15
20 # (where 0 = maximum performance and 15 = maximum power saving),
21 # or one of the following strings:
22 # performance (0), balance_performance (4), default (6), balance_power (8), or power (15)
23 # if the parameter is missing in the config and the hardware supports this setting, the default value will be used
24 # the default value is `balance_performance` (for charger)
25 # energy_perf_bias = balance_performance
26
27 # Platform Profiles
28 # https://www.kernel.org/doc/html/latest/userspace-api/sysfs-platform_profile.html
29 # See available options by running:
30 # cat /sys/firmware/acpi/platform_profile_choices
31 platform_profile = lib.mkDefault "balanced";
32
33 # minimum cpu frequency (in kHz)
34 # example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000
35 # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html
36 # to use this feature, uncomment the following line and set the value accordingly
37 # scaling_min_freq = 800000
38
39 # maximum cpu frequency (in kHz)
40 # example: for 1GHz = 1000 MHz = 1000000 kHz -> scaling_max_freq = 1000000
41 # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html
42 # to use this feature, uncomment the following line and set the value accordingly
43 # scaling_max_freq = 1000000
44
45 # turbo boost setting. possible values: always, auto, never
46 turbo = lib.mkDefault "auto";
47
48 # this is for ignoring controllers and other connected devices battery from affecting
49 # laptop preformence
50 # [power_supply_ignore_list]
51
52 # name1 = this
53 # name2 = is
54 # name3 = an
55 # name4 = example
56 };
57 # settings for when using battery power
58 battery = {
59 # see available governors by running: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
60 # preferred governor
61 governor = "powersave";
62
63 # EPP: see available preferences by running: cat /sys/devices/system/cpu/cpu0/cpufreq/energy_performance_available_preferences
64 energy_performance_preference = "power";
65
66 # EPB (Energy Performance Bias) for the intel_pstate driver
67 # see conversion info: https://www.kernel.org/doc/html/latest/admin-guide/pm/intel_epb.html
68 # available EPB options include a numeric value between 0-15
69 # (where 0 = maximum performance and 15 = maximum power saving),
70 # or one of the following strings:
71 # performance (0), balance_performance (4), default (6), balance_power (8), or power (15)
72 # if the parameter is missing in the config and the hardware supports this setting, the default value will be used
73 # the default value is `balance_power` (for battery)
74 # energy_perf_bias = balance_power
75
76 # Platform Profiles
77 # https://www.kernel.org/doc/html/latest/userspace-api/sysfs-platform_profile.html
78 # See available options by running:
79 # cat /sys/firmware/acpi/platform_profile_choices
80 platform_profile = "low-power";
81
82 # minimum cpu frequency (in kHz)
83 # example: for 800 MHz = 800000 kHz --> scaling_min_freq = 800000
84 # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html
85 # to use this feature, uncomment the following line and set the value accordingly
86 # scaling_min_freq = 800000
87
88 # maximum cpu frequency (in kHz)
89 # see conversion info: https://www.rapidtables.com/convert/frequency/mhz-to-hz.html
90 # example: for 1GHz = 1000 MHz = 1000000 kHz -> scaling_max_freq = 1000000
91 # to use this feature, uncomment the following line and set the value accordingly
92 # scaling_max_freq = 1000000
93
94 # turbo boost setting. possible values: always, auto, never
95 turbo = lib.mkDefault "auto";
96
97 # experimental
98
99 # Add battery charging threshold (currently only available to Lenovo)
100 # checkout README.md for more info
101
102 # enable thresholds true or false
103 enable_thresholds = lib.mkDefault false;
104 #
105 # start threshold (0 is off ) can be 0-99
106 start_threshold = lib.mkDefault 0;
107 #
108 # stop threshold (100 is off) can be 1-100
109 stop_threshold = lib.mkDefault 100;
110 };
111 };
112 };
113 }