try to use watt (and quickshell)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
@@ -15,44 +16,50 @@
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.watt.nixosModules.default
|
||||
];
|
||||
|
||||
|
||||
config = {
|
||||
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# processor chooses frequencies itself but respects the limits set by the user
|
||||
CPU_DRIVER_OPMODE_ON_AC = "guided";
|
||||
CPU_DRIVER_OPMODE_ON_BAT = "guided";
|
||||
# services.tlp = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# # processor chooses frequencies itself but respects the limits set by the user
|
||||
# CPU_DRIVER_OPMODE_ON_AC = "guided";
|
||||
# CPU_DRIVER_OPMODE_ON_BAT = "guided";
|
||||
|
||||
# governor dictates global behavior of the CPU
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
# # governor dictates global behavior of the CPU
|
||||
# CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
# CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
|
||||
# energy performance policy (EPP) sets the energy/performance balance
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
# # energy performance policy (EPP) sets the energy/performance balance
|
||||
# CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
# CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
|
||||
|
||||
# clock speeds reported by `sudo tlp-stat`
|
||||
# 623377 [kHz] and 5090910 [kHz]
|
||||
# CPU_SCALING_MIN_FREQ_ON_AC = 623377;
|
||||
# CPU_SCALING_MAX_FREQ_ON_AC = 5090910;
|
||||
# CPU_SCALING_MIN_FREQ_ON_BAT = 0;
|
||||
# # reduce max frequency on battery to save power
|
||||
# CPU_SCALING_MAX_FREQ_ON_BAT = 3000000;
|
||||
# # clock speeds reported by `sudo tlp-stat`
|
||||
# # 623377 [kHz] and 5090910 [kHz]
|
||||
# # CPU_SCALING_MIN_FREQ_ON_AC = 623377;
|
||||
# # CPU_SCALING_MAX_FREQ_ON_AC = 5090910;
|
||||
# # CPU_SCALING_MIN_FREQ_ON_BAT = 0;
|
||||
# # # reduce max frequency on battery to save power
|
||||
# # CPU_SCALING_MAX_FREQ_ON_BAT = 3000000;
|
||||
|
||||
# Allow the CPU to boost
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 1;
|
||||
# # Allow the CPU to boost
|
||||
# CPU_BOOST_ON_AC = 1;
|
||||
# CPU_BOOST_ON_BAT = 1;
|
||||
|
||||
|
||||
RADEON_DPM_PERF_LEVEL_ON_AC = "high";
|
||||
WIFI_PWR_ON_BAT = "off";
|
||||
# RADEON_DPM_PERF_LEVEL_ON_AC = "high";
|
||||
# WIFI_PWR_ON_BAT = "off";
|
||||
|
||||
# # enable battery charge thresholds on the default battery
|
||||
# STOP_CHARGE_THRESH_BAT0 = 1;
|
||||
# };
|
||||
# };
|
||||
|
||||
# enable battery charge thresholds on the default battery
|
||||
STOP_CHARGE_THRESH_BAT0 = 1;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
systemd.sleep.extraConfig = ''
|
||||
@@ -61,6 +68,28 @@
|
||||
AllowHybridSleep=yes
|
||||
AllowSuspendThenHibernate=yes
|
||||
'';
|
||||
|
||||
services.watt = {
|
||||
enable = true;
|
||||
settings = {
|
||||
battery_charge_thresholds = [
|
||||
40
|
||||
80
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# write the watt-config under /etc/watt.toml
|
||||
|
||||
|
||||
services.irqbalance = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.thermald = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user