2025-04-16 20:36:08 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
|
|
|
|
{
|
|
|
|
imports = [ ];
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
powertop
|
|
|
|
];
|
|
|
|
|
|
|
|
boot.kernelParams = [
|
2025-04-19 21:44:48 -04:00
|
|
|
# Enable undervolting GPU.
|
|
|
|
# "amdgpu.ppfeaturemask=0xfff7ffff"
|
2025-04-16 20:36:08 -04:00
|
|
|
];
|
|
|
|
|
2025-04-19 21:44:48 -04:00
|
|
|
systemd.tmpfiles.rules = [
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy6/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy7/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy8/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy9/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy10/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy11/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy12/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy13/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy14/energy_performance_preference - - - - power"
|
|
|
|
# "w- /sys/devices/system/cpu/cpufreq/policy15/energy_performance_preference - - - - power"
|
|
|
|
];
|
2025-04-16 20:36:08 -04:00
|
|
|
|
2025-04-19 21:44:48 -04:00
|
|
|
# services.udev.packages = [
|
|
|
|
# (pkgs.writeTextFile {
|
|
|
|
# name = "amdgpu-low-power";
|
|
|
|
# text = ''
|
|
|
|
# ACTION=="add", SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="low"
|
|
|
|
# '';
|
|
|
|
# destination = "/etc/udev/rules.d/30-amdgpu-low-power.rules";
|
|
|
|
# })
|
|
|
|
# ];
|
2025-04-16 20:36:08 -04:00
|
|
|
}
|