Desync between scalling_governeror and gnome power profile


I have this in hardware-configuration.nix:

  powerManagement.cpuFreqGovernor = lib.mkDefault "performance";

This is set:

$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
$ gsettings list-recursively org.gnome.settings-daemon.plugins.power
org.gnome.settings-daemon.plugins.power idle-dim true
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type 'suspend'
org.gnome.settings-daemon.plugins.power idle-brightness 30
org.gnome.settings-daemon.plugins.power power-saver-profile-on-low-battery true
org.gnome.settings-daemon.plugins.power ambient-enabled true
org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 1200
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 1200
org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type 'suspend'
org.gnome.settings-daemon.plugins.power power-button-action 'suspend'

But gnome shows this:


What am I doing wrong? What should I do to correctly set power management?

I see there is also TLP. Should I use it?

Maybe this is related to Problem with `xkbOptions` - it doesn't seem to take effect and nixos/dconf: Allow creating custom databases · Issue #54150 · NixOS/nixpkgs · GitHub?


1 Like

I believe platform_profile driver is used by default, which checks /sys/firmware/acpi/platform_profile. intel_pstate driver also exists but I have no idea if multiple drivers can be used at the same time.

You can find out the current driver by running powerprofilesctl.

You can also get more debug info by running:

sudo env G_MESSAGES_DEBUG=all $(nix-build -A power-profiles-daemon)/libexec/power-profiles-daemon -r -v

(Do not forget to restart the service with sudo systemctl start power-profiles-daemon.service afterwards.)

And there is some info about relationship with TLP in the README.