From 77b8a36fac5bdc8226e183d0d712cb9af3bd932f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 19 Jul 2023 15:45:37 +0200 Subject: [PATCH] limit to 4Ghz --- modules/hetzner-ex101.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/hetzner-ex101.nix b/modules/hetzner-ex101.nix index 1021dee..9d19c5e 100644 --- a/modules/hetzner-ex101.nix +++ b/modules/hetzner-ex101.nix @@ -11,7 +11,7 @@ # looks like the Intel i9-13900 draws too much power and crashes the system systemd.services.limit-cpu-freq = { - description = "Limit CPU frequency to 4.2GHz"; + 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 @@ -20,8 +20,8 @@ #!/bin/sh for f in /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq; do old_val="$(<"$f")" - if [[ "$old_val" -gt 4200000 ]]; then - echo 4200000 > "$f" + if [[ "$old_val" -gt 4000000 ]]; then + echo 4000000 > "$f" fi done '';