Can't undervolting intel processor

I want to lower the voltage on the processor.

I’m using this setup:

    undervolt = {
      enable = true;
      coreOffset = -100;
    };

When running doas nixos-rebuild switch the following message appears


× undervolt.service - Intel Undervolting Service
     Loaded: loaded (/etc/systemd/system/undervolt.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Fri 2024-08-02 13:47:46 +04; 162ms ago
    Process: 8544 ExecStart=/nix/store/9ywk4h85q7ihy09272lmmbingzgdb4qv-undervolt-0.3.0/bin/undervolt --cache -100 --core -100 (code=exited, status=1/FAILURE)
   Main PID: 8544 (code=exited, status=1/FAILURE)
         IP: 0B in, 0B out
        CPU: 44ms

Aug 02 13:47:46 mmatvey systemd[1]: Starting Intel Undervolting Service...
Aug 02 13:47:46 mmatvey undervolt[8544]: ERROR:root:Failed to apply core: set -99.609375, read 0.0
Aug 02 13:47:46 mmatvey systemd[1]: undervolt.service: Main process exited, code=exited, status=1/FAILURE
Aug 02 13:47:46 mmatvey systemd[1]: undervolt.service: Failed with result 'exit-code'.
Aug 02 13:47:46 mmatvey systemd[1]: Failed to start Intel Undervolting Service.

When you try to perform the same operation manually: doas undervolt --core -100 --cache -100 the following message is displayed:

ERROR:root:Failed to apply core: set -99.609375, read 0.0

How can I fix this?

My processor is Intel i5-12500H.

Doesn’t seem Nix/NixOS specific. Perhaps you’d get better help upstream?

It’s a pretty common issue and seems to be firmware dependent.