diff options
author | Atemu <atemu.main@gmail.com> | 2023-10-21 15:02:37 +0200 |
---|---|---|
committer | Atemu <atemu.main@gmail.com> | 2023-10-21 18:29:25 +0200 |
commit | fb602e5608735f7cb427226f0d2ea539b5129cc2 (patch) | |
tree | 4d4f3a0ba8225070c153da34879863f201fa13ff | |
parent | 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0 (diff) | |
download | nixpkgs-fb602e5608735f7cb427226f0d2ea539b5129cc2.tar nixpkgs-fb602e5608735f7cb427226f0d2ea539b5129cc2.tar.gz nixpkgs-fb602e5608735f7cb427226f0d2ea539b5129cc2.tar.bz2 nixpkgs-fb602e5608735f7cb427226f0d2ea539b5129cc2.tar.lz nixpkgs-fb602e5608735f7cb427226f0d2ea539b5129cc2.tar.xz nixpkgs-fb602e5608735f7cb427226f0d2ea539b5129cc2.tar.zst nixpkgs-fb602e5608735f7cb427226f0d2ea539b5129cc2.zip |
installer/nixos-generate-config: don't set powersave cpuFreqGovernor
This script would always "detect" the "powersave" governor as it is available on practically all CPUs while the "ondemand" governor is only available on some old CPUs. IME the "powersave" governor barely provides any power savings but introduces massive performance deficits, including noticable stuttering. This is not the default experience we should offer users, even for those who use laptops. Use the kernel default (currently "performance", CPU makers may change it in future) instead.
-rw-r--r-- | nixos/modules/installer/tools/nixos-generate-config.pl | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 7d0c5898e23..85180bf2d1b 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -102,22 +102,6 @@ sub cpuManufacturer { return $cpuinfo =~ /^vendor_id\s*:.* $id$/m; } - -# Determine CPU governor to use -if (-e "/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors") { - my $governors = read_file("/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"); - # ondemand governor is not available on sandy bridge or later Intel CPUs - my @desired_governors = ("ondemand", "powersave"); - my $e; - - foreach $e (@desired_governors) { - if (index($governors, $e) != -1) { - last if (push @attrs, "powerManagement.cpuFreqGovernor = lib.mkDefault \"$e\";"); - } - } -} - - # Virtualization support? push @kernelModules, "kvm-intel" if hasCPUFeature "vmx"; push @kernelModules, "kvm-amd" if hasCPUFeature "svm"; |