From b893b67028c00760bd0a5586eaa3183660f89dc2 Mon Sep 17 00:00:00 2001 From: Lorenz Leutgeb Date: Mon, 16 Oct 2023 21:33:22 +0200 Subject: [PATCH] nixos/throttled: Use `hardware.cpu.x86.msr` --- nixos/modules/services/hardware/throttled.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/hardware/throttled.nix b/nixos/modules/services/hardware/throttled.nix index afca24d976e1..9fa495886119 100644 --- a/nixos/modules/services/hardware/throttled.nix +++ b/nixos/modules/services/hardware/throttled.nix @@ -29,8 +29,7 @@ in { # Kernel 5.9 spams warnings whenever userspace writes to CPU MSRs. # See https://github.com/erpalma/throttled/issues/215 - boot.kernelParams = - optional (versionAtLeast config.boot.kernelPackages.kernel.version "5.9") - "msr.allow_writes=on"; + hardware.cpu.x86.msr.settings.allow-writes = + mkIf (versionAtLeast config.boot.kernelPackages.kernel.version "5.9") "on"; }; }