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