From 8ded7c9c8b0585727f21889fd7f8f892ccf84ace Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 19 Jul 2023 16:37:41 +0200 Subject: [PATCH] found a better workaround to avoid crashes on web01 --- modules/hetzner-ex101.nix | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/modules/hetzner-ex101.nix b/modules/hetzner-ex101.nix index 9d19c5e..436a824 100644 --- a/modules/hetzner-ex101.nix +++ b/modules/hetzner-ex101.nix @@ -9,24 +9,5 @@ # We are not limited by zfs, so we can use the latest kernel boot.kernelPackages = pkgs.linuxPackages_latest; - # looks like the Intel i9-13900 draws too much power and crashes the system - systemd.services.limit-cpu-freq = { - description = "Limit CPU frequency to 4GHz"; - wantedBy = [ "multi-user.target" ]; - after = [ "systemd-modules-load.service" ]; - # Some cores do have a scaling max freq less than 5GHz, so we need to - # check for that or else all cores will run at 800MHz - script = '' - #!/bin/sh - for f in /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq; do - old_val="$(<"$f")" - if [[ "$old_val" -gt 4000000 ]]; then - echo 4000000 > "$f" - fi - done - ''; - serviceConfig = { - Type = "oneshot"; - }; - }; + powerManagement.cpuFreqGovernor = "powersave"; }